LLVMFuzzerTestOneInput:
   26|  2.01k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   27|  2.01k|    igraph_t graph;
   28|  2.01k|    igraph_vector_int_t edges;
   29|       |
   30|  2.01k|    igraph_set_warning_handler(igraph_warning_handler_ignore);
   31|       |
   32|  2.01k|    if (Size % 2 == 0 || Size > 512+1 || Size < 1) {
  ------------------
  |  Branch (32:9): [True: 3, False: 2.01k]
  |  Branch (32:26): [True: 11, False: 2.00k]
  |  Branch (32:42): [True: 0, False: 2.00k]
  ------------------
   33|     14|        return 0;
   34|     14|    }
   35|       |
   36|  2.00k|    igraph_vector_int_init(&edges, Size-1);
   37|   151k|    for (size_t i=0; i < Size-1; ++i) {
  ------------------
  |  Branch (37:22): [True: 149k, False: 2.00k]
  ------------------
   38|   149k|        VECTOR(edges)[i] = Data[i+1];
  ------------------
  |  |   60|   149k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   39|   149k|    }
   40|       |
   41|  2.00k|    igraph_rng_seed(igraph_rng_default(), 42);
   42|       |
   43|       |    /* Directed */
   44|  2.00k|    if (igraph_create(&graph, &edges, Data[0], IGRAPH_DIRECTED) == IGRAPH_SUCCESS) {
  ------------------
  |  Branch (44:9): [True: 2.00k, False: 0]
  ------------------
   45|  2.00k|        igraph_vector_int_list_t ivl1, ivl2;
   46|  2.00k|        igraph_vector_int_t iv1, iv2, iv3, iv4, iv5;
   47|  2.00k|        igraph_graph_list_t gl;
   48|  2.00k|        igraph_vector_bool_t bv;
   49|  2.00k|        igraph_matrix_t m;
   50|  2.00k|        igraph_int_t i, i2;
   51|  2.00k|        igraph_bool_t b, b2;
   52|  2.00k|        igraph_bool_t loop, multi;
   53|  2.00k|        igraph_bool_t graphical;
   54|  2.00k|        igraph_bool_t weakly_connected, strongly_connected;
   55|  2.00k|        igraph_bool_t potentially_weakly_connected, potentially_strongly_connected;
   56|  2.00k|        igraph_real_t r;
   57|  2.00k|        igraph_t g;
   58|       |
   59|  2.00k|        igraph_vector_int_list_init(&ivl1, 0);
   60|  2.00k|        igraph_vector_int_list_init(&ivl2, 0);
   61|  2.00k|        igraph_vector_int_init(&iv1, 0);
   62|  2.00k|        igraph_vector_int_init(&iv2, 0);
   63|  2.00k|        igraph_vector_int_init(&iv3, 0);
   64|  2.00k|        igraph_vector_int_init(&iv4, 0);
   65|  2.00k|        igraph_vector_int_init(&iv5, 0);
   66|  2.00k|        igraph_vector_bool_init(&bv, 0);
   67|  2.00k|        igraph_matrix_init(&m, 0, 0);
   68|       |
   69|  2.00k|        igraph_find_cycle(&graph, &iv1, &iv2, IGRAPH_IN);
   70|  2.00k|        igraph_connected_components(&graph, &iv1, &iv2, &i, IGRAPH_STRONG);
   71|  2.00k|        igraph_coreness(&graph, &iv1, IGRAPH_OUT);
   72|  2.00k|        igraph_assortativity_degree(&graph, &r, IGRAPH_DIRECTED);
   73|  2.00k|        igraph_count_multiple(&graph, &iv1, igraph_ess_all(IGRAPH_EDGEORDER_ID));
   74|  2.00k|        igraph_is_loop(&graph, &bv, igraph_ess_all(IGRAPH_EDGEORDER_FROM));
   75|  2.00k|        igraph_is_multiple(&graph, &bv, igraph_ess_all(IGRAPH_EDGEORDER_TO));
   76|  2.00k|        igraph_is_mutual(&graph, &bv, igraph_ess_all(IGRAPH_EDGEORDER_TO), false);
   77|  2.00k|        igraph_maxdegree(&graph, &i, igraph_vss_all(), IGRAPH_IN, IGRAPH_LOOPS);
   78|  2.00k|        igraph_mean_degree(&graph, &r, IGRAPH_NO_LOOPS);
   79|  2.00k|        igraph_reciprocity(&graph, &r, true, IGRAPH_RECIPROCITY_DEFAULT);
   80|       |
   81|       |        /* Graphicality and graph realization based on the degrees of 'graph'. */
   82|  2.00k|        igraph_is_connected(&graph, &weakly_connected, IGRAPH_WEAK);
   83|  2.00k|        igraph_is_connected(&graph, &strongly_connected, IGRAPH_STRONG);
   84|  2.00k|        igraph_has_loop(&graph, &loop);
   85|  2.00k|        igraph_has_multiple(&graph, &multi);
   86|  2.00k|        igraph_degree(&graph, &iv1, igraph_vss_all(), IGRAPH_OUT, IGRAPH_LOOPS);
   87|  2.00k|        igraph_degree(&graph, &iv2, igraph_vss_all(), IGRAPH_IN, IGRAPH_LOOPS);
   88|  2.00k|        igraph_is_graphical(&iv1, &iv2, IGRAPH_SIMPLE_SW, &graphical);
   89|  2.00k|        igraph_is_potentially_connected(&iv1, &iv2, IGRAPH_SIMPLE_SW, IGRAPH_WEAK, &potentially_weakly_connected);
   90|  2.00k|        igraph_is_potentially_connected(&iv1, &iv2, IGRAPH_SIMPLE_SW, IGRAPH_STRONG, &potentially_strongly_connected);
   91|  2.00k|        if (!loop && !multi) {
  ------------------
  |  Branch (91:13): [True: 1.32k, False: 675]
  |  Branch (91:22): [True: 1.08k, False: 241]
  ------------------
   92|  1.08k|            IGRAPH_ASSERT(graphical);
  ------------------
  |  |  924|  1.08k|    do { \
  |  |  925|  1.08k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.08k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.08k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  1.08k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.08k]
  |  |  ------------------
  ------------------
   93|  1.08k|            if (weakly_connected) IGRAPH_ASSERT(potentially_weakly_connected);
  ------------------
  |  |  924|     39|    do { \
  |  |  925|     39|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|     39|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 39]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|     39|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 39]
  |  |  ------------------
  ------------------
  |  Branch (93:17): [True: 39, False: 1.04k]
  ------------------
   94|  1.08k|            if (strongly_connected) IGRAPH_ASSERT(potentially_strongly_connected);
  ------------------
  |  |  924|     14|    do { \
  |  |  925|     14|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|     14|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 14]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|     14|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 14]
  |  |  ------------------
  ------------------
  |  Branch (94:17): [True: 14, False: 1.07k]
  ------------------
   95|  1.08k|        }
   96|  2.00k|        if (graphical) {
  ------------------
  |  Branch (96:13): [True: 1.41k, False: 584]
  ------------------
   97|  1.41k|            igraph_realize_degree_sequence(&g, &iv1, &iv2, IGRAPH_SIMPLE_SW, IGRAPH_REALIZE_DEGSEQ_SMALLEST);
   98|  1.41k|            igraph_destroy(&g);
   99|  1.41k|            igraph_realize_degree_sequence(&g, &iv1, &iv2, IGRAPH_SIMPLE_SW, IGRAPH_REALIZE_DEGSEQ_LARGEST);
  100|  1.41k|            igraph_destroy(&g);
  101|  1.41k|            igraph_realize_degree_sequence(&g, &iv1, &iv2, IGRAPH_SIMPLE_SW, IGRAPH_REALIZE_DEGSEQ_INDEX);
  102|  1.41k|            igraph_destroy(&g);
  103|  1.41k|        } else {
  104|    584|            CHECK_ERROR(
  ------------------
  |  |    7|    584|    do { \
  |  |    8|    584|            igraph_error_handler_t *handler; \
  |  |    9|    584|            handler = igraph_set_error_handler(igraph_error_handler_ignore); \
  |  |   10|    584|            IGRAPH_ASSERT(funcall == expected_err); \
  |  |  ------------------
  |  |  |  |  924|    584|    do { \
  |  |  |  |  925|    584|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    584|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 584]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  |  |  ------------------
  |  |  |  |  927|      0|        } \
  |  |  |  |  928|    584|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (928:14): [Folded, False: 584]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   11|    584|            igraph_set_error_handler(handler); \
  |  |   12|    584|    } while (0)
  |  |  ------------------
  |  |  |  Branch (12:14): [Folded, False: 584]
  |  |  ------------------
  ------------------
  105|    584|                igraph_realize_degree_sequence(&g, &iv1, &iv2, IGRAPH_SIMPLE_SW, IGRAPH_REALIZE_DEGSEQ_SMALLEST),
  106|    584|                IGRAPH_EINVAL);
  107|    584|            CHECK_ERROR(
  ------------------
  |  |    7|    584|    do { \
  |  |    8|    584|            igraph_error_handler_t *handler; \
  |  |    9|    584|            handler = igraph_set_error_handler(igraph_error_handler_ignore); \
  |  |   10|    584|            IGRAPH_ASSERT(funcall == expected_err); \
  |  |  ------------------
  |  |  |  |  924|    584|    do { \
  |  |  |  |  925|    584|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    584|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 584]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  |  |  ------------------
  |  |  |  |  927|      0|        } \
  |  |  |  |  928|    584|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (928:14): [Folded, False: 584]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   11|    584|            igraph_set_error_handler(handler); \
  |  |   12|    584|    } while (0)
  |  |  ------------------
  |  |  |  Branch (12:14): [Folded, False: 584]
  |  |  ------------------
  ------------------
  108|    584|                igraph_realize_degree_sequence(&g, &iv1, &iv2, IGRAPH_SIMPLE_SW, IGRAPH_REALIZE_DEGSEQ_LARGEST),
  109|    584|                IGRAPH_EINVAL);
  110|    584|            CHECK_ERROR(
  ------------------
  |  |    7|    584|    do { \
  |  |    8|    584|            igraph_error_handler_t *handler; \
  |  |    9|    584|            handler = igraph_set_error_handler(igraph_error_handler_ignore); \
  |  |   10|    584|            IGRAPH_ASSERT(funcall == expected_err); \
  |  |  ------------------
  |  |  |  |  924|    584|    do { \
  |  |  |  |  925|    584|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    584|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 584]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  |  |  ------------------
  |  |  |  |  927|      0|        } \
  |  |  |  |  928|    584|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (928:14): [Folded, False: 584]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   11|    584|            igraph_set_error_handler(handler); \
  |  |   12|    584|    } while (0)
  |  |  ------------------
  |  |  |  Branch (12:14): [Folded, False: 584]
  |  |  ------------------
  ------------------
  111|    584|                igraph_realize_degree_sequence(&g, &iv1, &iv2, IGRAPH_SIMPLE_SW, IGRAPH_REALIZE_DEGSEQ_INDEX),
  112|    584|                IGRAPH_EINVAL);
  113|    584|        }
  114|  2.00k|        igraph_is_graphical(&iv1, &iv2, IGRAPH_LOOPS_SW, &graphical);
  115|  2.00k|        igraph_is_potentially_connected(&iv1, &iv2, IGRAPH_LOOPS_SW, IGRAPH_WEAK, &potentially_weakly_connected);
  116|       |        // Unimplemented:
  117|       |        // igraph_is_potentially_connected(&iv1, &iv2, IGRAPH_LOOPS_SW, IGRAPH_STRONG, &potentially_strongly_connected);
  118|  2.00k|        if (!multi) {
  ------------------
  |  Branch (118:13): [True: 1.35k, False: 651]
  ------------------
  119|  1.35k|            IGRAPH_ASSERT(graphical);
  ------------------
  |  |  924|  1.35k|    do { \
  |  |  925|  1.35k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.35k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.35k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  1.35k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.35k]
  |  |  ------------------
  ------------------
  120|  1.35k|            if (weakly_connected) IGRAPH_ASSERT(potentially_weakly_connected);
  ------------------
  |  |  924|     58|    do { \
  |  |  925|     58|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|     58|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 58]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|     58|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 58]
  |  |  ------------------
  ------------------
  |  Branch (120:17): [True: 58, False: 1.29k]
  ------------------
  121|       |            // Unimplemented:
  122|       |            // if (strongly_connected) IGRAPH_ASSERT(potentially_strongly_connected);
  123|  1.35k|        }
  124|  2.00k|        if (graphical) {
  ------------------
  |  Branch (124:13): [True: 1.56k, False: 439]
  ------------------
  125|       |            /* Directed realization with loops but no multi-edges is not yet implemented. */
  126|       |            /* Realize as bipartite (equivalent). */
  127|  1.56k|            igraph_realize_bipartite_degree_sequence(&g, &iv1, &iv2, IGRAPH_SIMPLE_SW, IGRAPH_REALIZE_DEGSEQ_SMALLEST);
  128|  1.56k|            igraph_destroy(&g);
  129|  1.56k|            igraph_realize_bipartite_degree_sequence(&g, &iv1, &iv2, IGRAPH_SIMPLE_SW, IGRAPH_REALIZE_DEGSEQ_LARGEST);
  130|  1.56k|            igraph_destroy(&g);
  131|  1.56k|            igraph_realize_bipartite_degree_sequence(&g, &iv1, &iv2, IGRAPH_SIMPLE_SW, IGRAPH_REALIZE_DEGSEQ_INDEX);
  132|  1.56k|            igraph_destroy(&g);
  133|  1.56k|        } else {
  134|    439|            CHECK_ERROR(
  ------------------
  |  |    7|    439|    do { \
  |  |    8|    439|            igraph_error_handler_t *handler; \
  |  |    9|    439|            handler = igraph_set_error_handler(igraph_error_handler_ignore); \
  |  |   10|    439|            IGRAPH_ASSERT(funcall == expected_err); \
  |  |  ------------------
  |  |  |  |  924|    439|    do { \
  |  |  |  |  925|    439|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    439|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 439]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  |  |  ------------------
  |  |  |  |  927|      0|        } \
  |  |  |  |  928|    439|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (928:14): [Folded, False: 439]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   11|    439|            igraph_set_error_handler(handler); \
  |  |   12|    439|    } while (0)
  |  |  ------------------
  |  |  |  Branch (12:14): [Folded, False: 439]
  |  |  ------------------
  ------------------
  135|    439|                igraph_realize_bipartite_degree_sequence(&g, &iv1, &iv2, IGRAPH_SIMPLE_SW, IGRAPH_REALIZE_DEGSEQ_SMALLEST),
  136|    439|                IGRAPH_EINVAL);
  137|    439|            CHECK_ERROR(
  ------------------
  |  |    7|    439|    do { \
  |  |    8|    439|            igraph_error_handler_t *handler; \
  |  |    9|    439|            handler = igraph_set_error_handler(igraph_error_handler_ignore); \
  |  |   10|    439|            IGRAPH_ASSERT(funcall == expected_err); \
  |  |  ------------------
  |  |  |  |  924|    439|    do { \
  |  |  |  |  925|    439|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    439|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 439]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  |  |  ------------------
  |  |  |  |  927|      0|        } \
  |  |  |  |  928|    439|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (928:14): [Folded, False: 439]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   11|    439|            igraph_set_error_handler(handler); \
  |  |   12|    439|    } while (0)
  |  |  ------------------
  |  |  |  Branch (12:14): [Folded, False: 439]
  |  |  ------------------
  ------------------
  138|    439|                igraph_realize_bipartite_degree_sequence(&g, &iv1, &iv2, IGRAPH_SIMPLE_SW, IGRAPH_REALIZE_DEGSEQ_LARGEST),
  139|    439|                IGRAPH_EINVAL);
  140|    439|            CHECK_ERROR(
  ------------------
  |  |    7|    439|    do { \
  |  |    8|    439|            igraph_error_handler_t *handler; \
  |  |    9|    439|            handler = igraph_set_error_handler(igraph_error_handler_ignore); \
  |  |   10|    439|            IGRAPH_ASSERT(funcall == expected_err); \
  |  |  ------------------
  |  |  |  |  924|    439|    do { \
  |  |  |  |  925|    439|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    439|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 439]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  |  |  ------------------
  |  |  |  |  927|      0|        } \
  |  |  |  |  928|    439|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (928:14): [Folded, False: 439]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   11|    439|            igraph_set_error_handler(handler); \
  |  |   12|    439|    } while (0)
  |  |  ------------------
  |  |  |  Branch (12:14): [Folded, False: 439]
  |  |  ------------------
  ------------------
  141|    439|                igraph_realize_bipartite_degree_sequence(&g, &iv1, &iv2, IGRAPH_SIMPLE_SW, IGRAPH_REALIZE_DEGSEQ_INDEX),
  142|    439|                IGRAPH_EINVAL);
  143|    439|        }
  144|  2.00k|        igraph_is_graphical(&iv1, &iv2, IGRAPH_MULTI_SW, &graphical);
  145|  2.00k|        igraph_is_potentially_connected(&iv1, &iv2, IGRAPH_MULTI_SW, IGRAPH_WEAK, &potentially_weakly_connected);
  146|  2.00k|        igraph_is_potentially_connected(&iv1, &iv2, IGRAPH_MULTI_SW, IGRAPH_STRONG, &potentially_strongly_connected);
  147|  2.00k|        if (!loop) {
  ------------------
  |  Branch (147:13): [True: 1.32k, False: 675]
  ------------------
  148|  1.32k|            IGRAPH_ASSERT(graphical);
  ------------------
  |  |  924|  1.32k|    do { \
  |  |  925|  1.32k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.32k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.32k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  1.32k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.32k]
  |  |  ------------------
  ------------------
  149|  1.32k|            if (weakly_connected) IGRAPH_ASSERT(potentially_weakly_connected);
  ------------------
  |  |  924|     83|    do { \
  |  |  925|     83|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|     83|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 83]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|     83|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 83]
  |  |  ------------------
  ------------------
  |  Branch (149:17): [True: 83, False: 1.24k]
  ------------------
  150|  1.32k|            if (strongly_connected) IGRAPH_ASSERT(potentially_strongly_connected);
  ------------------
  |  |  924|     34|    do { \
  |  |  925|     34|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|     34|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 34]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|     34|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 34]
  |  |  ------------------
  ------------------
  |  Branch (150:17): [True: 34, False: 1.29k]
  ------------------
  151|       |            /* Directed realization with multi-edges but no loops is not yet implemented. */
  152|  1.32k|        }
  153|  2.00k|        igraph_is_graphical(&iv1, &iv2, IGRAPH_LOOPS_SW | IGRAPH_MULTI_SW, &graphical);
  154|  2.00k|        igraph_is_potentially_connected(&iv1, &iv2, IGRAPH_LOOPS_SW | IGRAPH_MULTI_SW, IGRAPH_WEAK, &potentially_weakly_connected);
  155|  2.00k|        igraph_is_potentially_connected(&iv1, &iv2, IGRAPH_LOOPS_SW | IGRAPH_MULTI_SW, IGRAPH_STRONG, &potentially_strongly_connected);
  156|  2.00k|        IGRAPH_ASSERT(graphical);
  ------------------
  |  |  924|  2.00k|    do { \
  |  |  925|  2.00k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  157|  2.00k|        if (weakly_connected) IGRAPH_ASSERT(potentially_weakly_connected);
  ------------------
  |  |  924|    240|    do { \
  |  |  925|    240|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    240|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 240]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|    240|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 240]
  |  |  ------------------
  ------------------
  |  Branch (157:13): [True: 240, False: 1.76k]
  ------------------
  158|  2.00k|        if (strongly_connected) IGRAPH_ASSERT(potentially_strongly_connected);
  ------------------
  |  |  924|    119|    do { \
  |  |  925|    119|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    119|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 119]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|    119|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 119]
  |  |  ------------------
  ------------------
  |  Branch (158:13): [True: 119, False: 1.88k]
  ------------------
  159|       |        /* Directed realization with loops and multi-edges is not yet implemented. */
  160|       |        /* Realize as bipartite (equivalent). */
  161|  2.00k|        igraph_realize_bipartite_degree_sequence(&g, &iv1, &iv2, IGRAPH_MULTI_SW, IGRAPH_REALIZE_DEGSEQ_SMALLEST);
  162|  2.00k|        igraph_destroy(&g);
  163|  2.00k|        igraph_realize_bipartite_degree_sequence(&g, &iv1, &iv2, IGRAPH_MULTI_SW, IGRAPH_REALIZE_DEGSEQ_LARGEST);
  164|  2.00k|        igraph_destroy(&g);
  165|  2.00k|        igraph_realize_bipartite_degree_sequence(&g, &iv1, &iv2, IGRAPH_MULTI_SW, IGRAPH_REALIZE_DEGSEQ_INDEX);
  166|  2.00k|        igraph_destroy(&g);
  167|       |
  168|       |        // These algorithms require a starting vertex,
  169|       |        // so we require the graph to have at least one vertex.
  170|  2.00k|        if (igraph_vcount(&graph) >= 1) {
  ------------------
  |  Branch (170:13): [True: 2.00k, False: 1]
  ------------------
  171|  2.00k|            igraph_distances(&graph, NULL, &m, igraph_vss_1(0), igraph_vss_all(), IGRAPH_OUT);
  172|  2.00k|            igraph_get_shortest_paths(&graph, NULL, &ivl1, &ivl2, 0, igraph_vss_all(), IGRAPH_OUT, &iv1, &iv2);
  173|  2.00k|            igraph_pseudo_diameter(&graph, NULL, &r, 0, &i, &i2, IGRAPH_DIRECTED, true);
  174|  2.00k|            igraph_bfs(&graph, 0, NULL, IGRAPH_OUT, true, NULL, &iv1, &iv2, &iv3, &iv4, NULL, &iv5, NULL, NULL);
  175|       |
  176|  2.00k|            igraph_reverse_edges(&graph, igraph_ess_all(IGRAPH_EDGEORDER_ID));
  177|       |
  178|  2.00k|            igraph_dfs(&graph, 0, IGRAPH_OUT, true, &iv1, &iv2, &iv3, &iv4, NULL, NULL, NULL);
  179|  2.00k|            igraph_bfs_simple(&graph, 0, IGRAPH_OUT, &iv1, &iv2, &iv3);
  180|  2.00k|            igraph_dominator_tree(&graph, 0, &iv1, NULL, &iv2, IGRAPH_OUT);
  181|  2.00k|            igraph_subcomponent(&graph, &iv1, 0, IGRAPH_OUT);
  182|  2.00k|            igraph_degree_1(&graph, &i, 0, IGRAPH_OUT, IGRAPH_LOOPS);
  183|  2.00k|            igraph_degree_1(&graph, &i, 0, IGRAPH_OUT, IGRAPH_NO_LOOPS);
  184|       |
  185|  2.00k|            igraph_vector_int_resize(&iv1, 1);
  186|  2.00k|            VECTOR(iv1)[0] = 0;
  ------------------
  |  |   60|  2.00k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  187|  2.00k|            igraph_unfold_tree(&graph, &g, IGRAPH_IN, &iv1, &iv2);
  188|  2.00k|            igraph_destroy(&g);
  189|  2.00k|        }
  190|       |
  191|  2.00k|        igraph_is_dag(&graph, &b);
  192|  2.00k|        if (b) {
  ------------------
  |  Branch (192:13): [True: 718, False: 1.28k]
  ------------------
  193|    718|            igraph_topological_sorting(&graph, &iv1, IGRAPH_OUT);
  194|    718|        }
  195|       |
  196|  2.00k|        igraph_feedback_arc_set(&graph, &iv1, NULL, IGRAPH_FAS_APPROX_EADES);
  197|       |
  198|  2.00k|        igraph_is_eulerian(&graph, &b, &b2);
  199|  2.00k|        if (b) igraph_eulerian_path(&graph, &iv1, &iv2);
  ------------------
  |  Branch (199:13): [True: 751, False: 1.25k]
  ------------------
  200|  2.00k|        if (b2) igraph_eulerian_cycle(&graph, &iv1, &iv2);
  ------------------
  |  Branch (200:13): [True: 389, False: 1.61k]
  ------------------
  201|       |
  202|  2.00k|        igraph_graph_list_init(&gl, 0);
  203|  2.00k|        igraph_decompose(&graph, &gl, IGRAPH_STRONG, 10, 5);
  204|  2.00k|        igraph_graph_list_destroy(&gl);
  205|       |
  206|  2.00k|        if (igraph_vcount(&graph) >= 2) {
  ------------------
  |  Branch (206:13): [True: 1.97k, False: 24]
  ------------------
  207|  1.97k|            igraph_get_all_eids_between(&graph, &iv2, 0, 1, IGRAPH_DIRECTED);
  208|  1.97k|            igraph_get_all_eids_between(&graph, &iv2, 1, 0, IGRAPH_UNDIRECTED);
  209|  1.97k|            igraph_get_all_eids_between(&graph, &iv2, 0, 0, IGRAPH_UNDIRECTED);
  210|       |
  211|  1.97k|            igraph_edges(&graph, igraph_ess_all(IGRAPH_EDGEORDER_FROM), &iv1, 0);
  212|  1.97k|            igraph_vector_int_push_back(&iv1, 0);
  213|  1.97k|            igraph_vector_int_push_back(&iv1, 1);
  214|  1.97k|            igraph_vector_int_push_back(&iv1, 1);
  215|  1.97k|            igraph_vector_int_push_back(&iv1, 0);
  216|  1.97k|            igraph_vector_int_push_back(&iv1, 1);
  217|  1.97k|            igraph_vector_int_push_back(&iv1, 1);
  218|  1.97k|            igraph_get_eids(&graph, &iv2, &iv1, IGRAPH_DIRECTED, false);
  219|  1.97k|        }
  220|       |
  221|  2.00k|        igraph_simplify(&graph, true, true, NULL);
  222|       |
  223|  2.00k|        if (igraph_vcount(&graph) >=1) {
  ------------------
  |  Branch (223:13): [True: 2.00k, False: 1]
  ------------------
  224|       |            // Run only on the simplified graph to avoid a very large number of
  225|       |            // shortest paths due to multi-edges.
  226|  2.00k|            igraph_get_all_shortest_paths(&graph, NULL, &ivl1, &ivl2, &iv1, 0, igraph_vss_all(), IGRAPH_ALL);
  227|  2.00k|        }
  228|       |
  229|       |        /* Basic graph modification */
  230|  2.00k|        igraph_add_vertices(&graph, 3, NULL);
  231|  2.00k|        igraph_degree_1(&graph, &i, 0, IGRAPH_IN, IGRAPH_NO_LOOPS);
  232|  2.00k|        igraph_delete_vertices(&graph, igraph_vss_1(0));
  233|  2.00k|        igraph_add_edge(&graph, 0, 1);
  234|  2.00k|        igraph_count_multiple_1(&graph, &i, 0);
  235|  2.00k|        igraph_delete_edges(&graph, igraph_ess_1(0));
  236|       |
  237|  2.00k|        if (igraph_vcount(&graph) >= 4) {
  ------------------
  |  Branch (237:13): [True: 1.97k, False: 24]
  ------------------
  238|  1.97k|            igraph_rewire(&graph, igraph_ecount(&graph) + 1, IGRAPH_SIMPLE_SW, NULL);
  239|  1.97k|        }
  240|       |
  241|  2.00k|        igraph_matrix_destroy(&m);
  242|  2.00k|        igraph_vector_bool_destroy(&bv);
  243|  2.00k|        igraph_vector_int_destroy(&iv5);
  244|  2.00k|        igraph_vector_int_destroy(&iv4);
  245|  2.00k|        igraph_vector_int_destroy(&iv3);
  246|  2.00k|        igraph_vector_int_destroy(&iv2);
  247|  2.00k|        igraph_vector_int_destroy(&iv1);
  248|  2.00k|        igraph_vector_int_list_destroy(&ivl2);
  249|  2.00k|        igraph_vector_int_list_destroy(&ivl1);
  250|       |
  251|  2.00k|        igraph_destroy(&graph);
  252|  2.00k|    }
  253|       |
  254|  2.00k|    igraph_vector_int_destroy(&edges);
  255|       |
  256|  2.00k|    IGRAPH_ASSERT(IGRAPH_FINALLY_STACK_EMPTY);
  ------------------
  |  |  924|  2.00k|    do { \
  |  |  925|  2.00k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  257|       |
  258|  2.00k|    return 0;  // Non-zero return values are reserved for future use.
  259|  2.00k|}

igraph_coreness:
   56|  2.00k|        igraph_vector_int_t *cores, igraph_neimode_t mode) {
   57|       |
   58|  2.00k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
   59|  2.00k|    igraph_int_t *bin, *vert, *pos;
   60|  2.00k|    igraph_int_t maxdeg;
   61|  2.00k|    igraph_vector_int_t neis;
   62|  2.00k|    igraph_neimode_t omode;
   63|       |
   64|  2.00k|    if (mode != IGRAPH_ALL && mode != IGRAPH_OUT && mode != IGRAPH_IN) {
  ------------------
  |  Branch (64:9): [True: 2.00k, False: 0]
  |  Branch (64:31): [True: 0, False: 2.00k]
  |  Branch (64:53): [True: 0, False: 0]
  ------------------
   65|      0|        IGRAPH_ERROR("Invalid mode in k-cores.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   66|      0|    }
   67|  2.00k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 2.00k]
  ------------------
   68|      0|        mode = IGRAPH_ALL;
   69|      0|    }
   70|  2.00k|    omode = IGRAPH_REVERSE_MODE(mode);
  ------------------
  |  |  110|  2.00k|    ((mode) == IGRAPH_IN ? IGRAPH_OUT : ((mode) == IGRAPH_OUT ? IGRAPH_IN : (mode)))
  |  |  ------------------
  |  |  |  Branch (110:6): [True: 0, False: 2.00k]
  |  |  |  Branch (110:42): [True: 2.00k, False: 0]
  |  |  ------------------
  ------------------
   71|       |
   72|       |    /* catch null graph */
   73|  2.00k|    if (no_of_nodes == 0) {
  ------------------
  |  Branch (73:9): [True: 1, False: 2.00k]
  ------------------
   74|      1|        igraph_vector_int_clear(cores);
   75|      1|        return IGRAPH_SUCCESS;
   76|      1|    }
   77|       |
   78|  2.00k|    vert = IGRAPH_CALLOC(no_of_nodes, igraph_int_t);
  ------------------
  |  |   33|  2.00k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.00k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.00k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.00k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.00k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   79|  2.00k|    IGRAPH_CHECK_OOM(vert, "Insufficient memory for k-cores.");
  ------------------
  |  |  709|  2.00k|    do { \
  |  |  710|  2.00k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   80|  2.00k|    IGRAPH_FINALLY(igraph_free, vert);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   81|       |
   82|  2.00k|    pos = IGRAPH_CALLOC(no_of_nodes, igraph_int_t);
  ------------------
  |  |   33|  2.00k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.00k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.00k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.00k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.00k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   83|  2.00k|    IGRAPH_CHECK_OOM(pos, "Insufficient memory for k-cores.");
  ------------------
  |  |  709|  2.00k|    do { \
  |  |  710|  2.00k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   84|  2.00k|    IGRAPH_FINALLY(igraph_free, pos);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   85|       |
   86|       |    /* maximum degree + degree of vertices */
   87|  2.00k|    IGRAPH_CHECK(igraph_degree(graph, cores, igraph_vss_all(), mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   88|       |
   89|       |    /* null graph was already handled earlier, 'cores' is not empty */
   90|  2.00k|    maxdeg = igraph_vector_int_max(cores);
   91|       |
   92|  2.00k|    bin = IGRAPH_CALLOC(maxdeg + 1, igraph_int_t);
  ------------------
  |  |   33|  2.00k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.00k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.00k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.00k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.00k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   93|  2.00k|    IGRAPH_CHECK_OOM(bin, "Insufficient memory for k-cores.");
  ------------------
  |  |  709|  2.00k|    do { \
  |  |  710|  2.00k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   94|  2.00k|    IGRAPH_FINALLY(igraph_free, bin);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   95|       |
   96|       |    /* degree histogram */
   97|   334k|    for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (97:30): [True: 332k, False: 2.00k]
  ------------------
   98|   332k|        bin[ VECTOR(*cores)[i] ] += 1;
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   99|   332k|    }
  100|       |
  101|       |    /* start pointers */
  102|  33.5k|    for (igraph_int_t d = 0, start = 0; d <= maxdeg; d++) {
  ------------------
  |  Branch (102:41): [True: 31.5k, False: 2.00k]
  ------------------
  103|  31.5k|        igraph_int_t k = bin[d];
  104|  31.5k|        bin[d] = start;
  105|  31.5k|        start += k;
  106|  31.5k|    }
  107|       |
  108|       |    /* sort in vert (and corrupt bin) */
  109|   334k|    for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (109:30): [True: 332k, False: 2.00k]
  ------------------
  110|   332k|        pos[i] = bin[VECTOR(*cores)[i]];
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  111|   332k|        vert[pos[i]] = i;
  112|   332k|        bin[VECTOR(*cores)[i]] += 1;
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  113|   332k|    }
  114|       |
  115|       |    /* correct bin */
  116|  31.5k|    for (igraph_int_t d = maxdeg; d > 0; d--) {
  ------------------
  |  Branch (116:35): [True: 29.5k, False: 2.00k]
  ------------------
  117|  29.5k|        bin[d] = bin[d - 1];
  118|  29.5k|    }
  119|  2.00k|    bin[0] = 0;
  120|       |
  121|       |    /* this is the main algorithm */
  122|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, maxdeg);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  123|   334k|    for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (123:30): [True: 332k, False: 2.00k]
  ------------------
  124|   332k|        igraph_int_t v = vert[i];
  125|   332k|        IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|   332k|    do { \
  |  |  657|   332k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   332k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   332k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 332k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   332k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 332k]
  |  |  ------------------
  ------------------
  126|   332k|            graph, &neis, v, omode, IGRAPH_LOOPS, IGRAPH_MULTIPLE
  127|   332k|        ));
  128|   332k|        igraph_int_t nei_count = igraph_vector_int_size(&neis);
  129|   407k|        for (igraph_int_t j = 0; j < nei_count; j++) {
  ------------------
  |  Branch (129:34): [True: 74.9k, False: 332k]
  ------------------
  130|  74.9k|            igraph_int_t u = VECTOR(neis)[j];
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  131|  74.9k|            if (VECTOR(*cores)[u] > VECTOR(*cores)[v]) {
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (VECTOR(*cores)[u] > VECTOR(*cores)[v]) {
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (131:17): [True: 32.9k, False: 41.9k]
  ------------------
  132|  32.9k|                igraph_int_t du = VECTOR(*cores)[u];
  ------------------
  |  |   60|  32.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  133|  32.9k|                igraph_int_t pu = pos[u];
  134|  32.9k|                igraph_int_t pw = bin[du];
  135|  32.9k|                igraph_int_t w = vert[pw];
  136|  32.9k|                if (u != w) {
  ------------------
  |  Branch (136:21): [True: 11.4k, False: 21.5k]
  ------------------
  137|  11.4k|                    pos[u] = pw;
  138|  11.4k|                    pos[w] = pu;
  139|  11.4k|                    vert[pu] = w;
  140|  11.4k|                    vert[pw] = u;
  141|  11.4k|                }
  142|  32.9k|                bin[du] += 1;
  143|  32.9k|                VECTOR(*cores)[u] -= 1;
  ------------------
  |  |   60|  32.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  144|  32.9k|            }
  145|  74.9k|        }
  146|   332k|    }
  147|       |
  148|  2.00k|    igraph_vector_int_destroy(&neis);
  149|  2.00k|    IGRAPH_FINALLY_CLEAN(1);
  150|       |
  151|  2.00k|    igraph_free(bin);
  152|  2.00k|    igraph_free(pos);
  153|  2.00k|    igraph_free(vert);
  154|  2.00k|    IGRAPH_FINALLY_CLEAN(3);
  155|       |
  156|  2.00k|    return IGRAPH_SUCCESS;
  157|  2.00k|}

igraph_connected_components:
   87|  4.76k|) {
   88|  4.76k|    if (mode == IGRAPH_WEAK || !igraph_is_directed(graph)) {
  ------------------
  |  Branch (88:9): [True: 2.75k, False: 2.00k]
  |  Branch (88:32): [True: 0, False: 2.00k]
  ------------------
   89|  2.75k|        return igraph_i_connected_components_weak(graph, membership, csize, no);
   90|  2.75k|    } else if (mode == IGRAPH_STRONG) {
  ------------------
  |  Branch (90:16): [True: 2.00k, False: 0]
  ------------------
   91|  2.00k|        return igraph_i_connected_components_strong(graph, membership, csize, no);
   92|  2.00k|    }
   93|       |
   94|      0|    IGRAPH_ERROR("Invalid connectedness mode.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   95|      0|}
igraph_is_connected:
  435|  4.00k|                        igraph_connectedness_t mode) {
  436|       |
  437|  4.00k|    igraph_cached_property_t prop;
  438|  4.00k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  439|  4.00k|    igraph_int_t no;
  440|       |
  441|  4.00k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (441:9): [True: 0, False: 4.00k]
  ------------------
  442|      0|        mode = IGRAPH_WEAK;
  443|      0|    }
  444|       |
  445|  4.00k|    switch (mode) {
  446|  2.00k|        case IGRAPH_WEAK:
  ------------------
  |  Branch (446:9): [True: 2.00k, False: 2.00k]
  ------------------
  447|  2.00k|            prop = IGRAPH_PROP_IS_WEAKLY_CONNECTED;
  448|  2.00k|            break;
  449|       |
  450|  2.00k|        case IGRAPH_STRONG:
  ------------------
  |  Branch (450:9): [True: 2.00k, False: 2.00k]
  ------------------
  451|  2.00k|            prop = IGRAPH_PROP_IS_STRONGLY_CONNECTED;
  452|  2.00k|            break;
  453|       |
  454|      0|        default:
  ------------------
  |  Branch (454:9): [True: 0, False: 4.00k]
  ------------------
  455|      0|            IGRAPH_ERROR("Invalid connectedness mode.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  456|  4.00k|    }
  457|       |
  458|  4.00k|    IGRAPH_RETURN_IF_CACHED_BOOL(graph, prop, res);
  ------------------
  |  |   97|  4.00k|    do { \
  |  |   98|  4.00k|        if (igraph_i_property_cache_has((graphptr), (prop))) { \
  |  |  ------------------
  |  |  |  Branch (98:13): [True: 2.12k, False: 1.88k]
  |  |  ------------------
  |  |   99|  2.12k|            *(resptr) = igraph_i_property_cache_get_bool((graphptr), (prop)); \
  |  |  100|  2.12k|            return IGRAPH_SUCCESS; \
  |  |  101|  2.12k|        } \
  |  |  102|  4.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (102:14): [Folded, False: 1.88k]
  |  |  ------------------
  ------------------
  459|       |
  460|  1.88k|    if (no_of_nodes == 0) {
  ------------------
  |  Branch (460:9): [True: 1, False: 1.88k]
  ------------------
  461|       |        /* Changed in igraph 0.9; see https://github.com/igraph/igraph/issues/1539
  462|       |         * for the reasoning behind the change */
  463|      1|        *res = false;
  464|  1.88k|    } else if (no_of_nodes == 1) {
  ------------------
  |  Branch (464:16): [True: 0, False: 1.88k]
  ------------------
  465|      0|        *res = true;
  466|  1.88k|    } else if (mode == IGRAPH_WEAK) {
  ------------------
  |  Branch (466:16): [True: 1.88k, False: 0]
  ------------------
  467|  1.88k|        IGRAPH_CHECK(igraph_i_is_connected_weak(graph, res));
  ------------------
  |  |  656|  1.88k|    do { \
  |  |  657|  1.88k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.88k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.88k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.88k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.88k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.88k]
  |  |  ------------------
  ------------------
  468|  1.88k|    } else {   /* mode == IGRAPH_STRONG */
  469|       |        /* A strongly connected graph has at least as many edges as vertices,
  470|       |         * except for the singleton graph, which is handled above. */
  471|      0|        if (igraph_ecount(graph) < no_of_nodes) {
  ------------------
  |  Branch (471:13): [True: 0, False: 0]
  ------------------
  472|      0|            *res = false;
  473|      0|        } else {
  474|      0|            IGRAPH_CHECK(igraph_i_connected_components_strong(graph, NULL, NULL, &no));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  475|      0|            *res = (no == 1);
  476|      0|        }
  477|      0|    }
  478|       |
  479|       |    /* Cache updates are done in igraph_i_connected_components_strong() and
  480|       |     * igraph_i_is_connected_weak() because those might be called from other
  481|       |     * places and we want to make use of the caching if so */
  482|       |
  483|  1.88k|    return IGRAPH_SUCCESS;
  484|  1.88k|}
igraph_decompose:
  607|  2.00k|                     igraph_int_t maxcompno, igraph_int_t minelements) {
  608|  2.00k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (608:9): [True: 0, False: 2.00k]
  ------------------
  609|      0|        mode = IGRAPH_WEAK;
  610|      0|    }
  611|       |
  612|  2.00k|    switch (mode) {
  613|      0|    case IGRAPH_WEAK:
  ------------------
  |  Branch (613:5): [True: 0, False: 2.00k]
  ------------------
  614|      0|        return igraph_i_decompose_weak(graph, components, maxcompno, minelements);
  615|  2.00k|    case IGRAPH_STRONG:
  ------------------
  |  Branch (615:5): [True: 2.00k, False: 0]
  ------------------
  616|  2.00k|        return igraph_i_decompose_strong(graph, components, maxcompno, minelements);
  617|      0|    default:
  ------------------
  |  Branch (617:5): [True: 0, False: 2.00k]
  ------------------
  618|      0|        IGRAPH_ERROR("Invalid connectedness mode.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  619|  2.00k|    }
  620|  2.00k|}
igraph_subcomponent:
 1559|  2.00k|) {
 1560|       |
 1561|  2.00k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
 1562|  2.00k|    igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   56|  2.00k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
 1563|  2.00k|    igraph_bitset_t already_added;
 1564|  2.00k|    igraph_int_t i, vsize;
 1565|  2.00k|    igraph_vector_int_t tmp = IGRAPH_VECTOR_NULL;
  ------------------
  |  |   99|  2.00k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
 1566|       |
 1567|  2.00k|    if (vertex < 0 || vertex >= no_of_nodes) {
  ------------------
  |  Branch (1567:9): [True: 0, False: 2.00k]
  |  Branch (1567:23): [True: 0, False: 2.00k]
  ------------------
 1568|      0|        IGRAPH_ERROR("Vertex ID out of range.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1569|      0|    }
 1570|  2.00k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (1570:9): [True: 0, False: 2.00k]
  |  Branch (1570:31): [True: 0, False: 0]
  ------------------
 1571|      0|        mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1571:9): [True: 0, False: 0]
  ------------------
 1572|      0|        IGRAPH_ERROR("Invalid mode argument.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1573|      0|    }
 1574|       |
 1575|  2.00k|    igraph_vector_int_clear(res);
 1576|       |
 1577|  2.00k|    IGRAPH_BITSET_INIT_FINALLY(&already_added, no_of_nodes);
  ------------------
  |  |  265|  2.00k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  266|  2.00k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  267|  2.00k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (267:62): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
 1578|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&tmp, 0);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
 1579|  2.00k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  2.00k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.00k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
 1580|       |
 1581|  2.00k|    IGRAPH_CHECK(igraph_dqueue_int_push(&q, vertex));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
 1582|  2.00k|    IGRAPH_CHECK(igraph_vector_int_push_back(res, vertex));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
 1583|  2.00k|    IGRAPH_BIT_SET(already_added, vertex);
  ------------------
  |  |  103|  2.00k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  2.00k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  2.00k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  2.00k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  2.00k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  2.00k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1584|       |
 1585|  26.6k|    while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (1585:12): [True: 24.6k, False: 2.00k]
  ------------------
 1586|  24.6k|        igraph_int_t actnode = igraph_dqueue_int_pop(&q);
 1587|       |
 1588|  24.6k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  24.6k|    do { \
  |  |   47|  24.6k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 24.6k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  24.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 24.6k]
  |  |  ------------------
  ------------------
 1589|       |
 1590|  24.6k|        IGRAPH_CHECK(igraph_neighbors(graph, &tmp, actnode, mode, IGRAPH_NO_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  24.6k|    do { \
  |  |  657|  24.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  24.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  24.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 24.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  24.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 24.6k]
  |  |  ------------------
  ------------------
 1591|  24.6k|        vsize = igraph_vector_int_size(&tmp);
 1592|  59.1k|        for (i = 0; i < vsize; i++) {
  ------------------
  |  Branch (1592:21): [True: 34.4k, False: 24.6k]
  ------------------
 1593|  34.4k|            igraph_int_t neighbor = VECTOR(tmp)[i];
  ------------------
  |  |   60|  34.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1594|       |
 1595|  34.4k|            if (IGRAPH_BIT_TEST(already_added, neighbor)) {
  ------------------
  |  |  142|  34.4k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  34.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  34.4k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  34.4k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  34.4k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  34.4k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (142:36): [True: 11.8k, False: 22.6k]
  |  |  ------------------
  ------------------
 1596|  11.8k|                continue;
 1597|  11.8k|            }
 1598|  22.6k|            IGRAPH_BIT_SET(already_added, neighbor);
  ------------------
  |  |  103|  22.6k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  22.6k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  22.6k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  22.6k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  22.6k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1599|  22.6k|            IGRAPH_CHECK(igraph_vector_int_push_back(res, neighbor));
  ------------------
  |  |  656|  22.6k|    do { \
  |  |  657|  22.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  22.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  22.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 22.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  22.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 22.6k]
  |  |  ------------------
  ------------------
 1600|  22.6k|            IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  22.6k|    do { \
  |  |  657|  22.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  22.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  22.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 22.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  22.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 22.6k]
  |  |  ------------------
  ------------------
 1601|  22.6k|        }
 1602|  24.6k|    }
 1603|       |
 1604|  2.00k|    igraph_dqueue_int_destroy(&q);
 1605|  2.00k|    igraph_vector_int_destroy(&tmp);
 1606|  2.00k|    igraph_bitset_destroy(&already_added);
 1607|  2.00k|    IGRAPH_FINALLY_CLEAN(3);
 1608|       |
 1609|  2.00k|    return IGRAPH_SUCCESS;
 1610|  2.00k|}
components.c:igraph_i_connected_components_weak:
  100|  2.75k|) {
  101|       |
  102|  2.75k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  103|  2.75k|    igraph_int_t no_of_components;
  104|  2.75k|    igraph_bitset_t already_added;
  105|  2.75k|    igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   56|  2.75k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
  106|  2.75k|    igraph_vector_int_t neis = IGRAPH_VECTOR_NULL;
  ------------------
  |  |   99|  2.75k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
  107|       |
  108|       |    /* Memory for result, csize is dynamically allocated */
  109|  2.75k|    if (membership) {
  ------------------
  |  Branch (109:9): [True: 0, False: 2.75k]
  ------------------
  110|      0|        IGRAPH_CHECK(igraph_vector_int_resize(membership, no_of_nodes));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  111|      0|    }
  112|  2.75k|    if (csize) {
  ------------------
  |  Branch (112:9): [True: 2.75k, False: 0]
  ------------------
  113|  2.75k|        igraph_vector_int_clear(csize);
  114|  2.75k|    }
  115|       |
  116|       |    /* Try to make use of cached information. */
  117|  2.75k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED) &&
  ------------------
  |  Branch (117:9): [True: 2.75k, False: 0]
  ------------------
  118|  2.75k|        igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED)) {
  ------------------
  |  Branch (118:9): [True: 340, False: 2.41k]
  ------------------
  119|       |        /* If we know that the graph is weakly connected from the cache,
  120|       |         * we can return the result right away. We keep in mind that
  121|       |         * the null graph is considered disconnected, therefore any connected
  122|       |         * graph has precisely one component. */
  123|    340|        if (membership) {
  ------------------
  |  Branch (123:13): [True: 0, False: 340]
  ------------------
  124|       |            /* All vertices are members of the same component,
  125|       |             * component number 0. */
  126|      0|            igraph_vector_int_null(membership);
  127|      0|        }
  128|    340|        if (csize) {
  ------------------
  |  Branch (128:13): [True: 340, False: 0]
  ------------------
  129|       |            /* The size of the single component is the same as the vertex count. */
  130|    340|            IGRAPH_CHECK(igraph_vector_int_push_back(csize, no_of_nodes));
  ------------------
  |  |  656|    340|    do { \
  |  |  657|    340|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    340|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    340|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 340]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    340|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 340]
  |  |  ------------------
  ------------------
  131|    340|        }
  132|    340|        if (no) {
  ------------------
  |  Branch (132:13): [True: 0, False: 340]
  ------------------
  133|       |            /* There is one component. */
  134|      0|            *no = 1;
  135|      0|        }
  136|    340|        return IGRAPH_SUCCESS;
  137|    340|    }
  138|       |
  139|  2.41k|    IGRAPH_BITSET_INIT_FINALLY(&already_added, no_of_nodes);
  ------------------
  |  |  265|  2.41k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  266|  2.41k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.41k|    do { \
  |  |  |  |  657|  2.41k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.41k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.41k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.41k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.41k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  267|  2.41k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.41k|    do { \
  |  |  |  |  604|  2.41k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.41k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.41k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.41k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.41k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.41k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.41k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (267:62): [Folded, False: 2.41k]
  |  |  ------------------
  ------------------
  140|  2.41k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, no_of_nodes > 100000 ? 10000 : no_of_nodes / 10);
  ------------------
  |  |   61|  2.41k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.41k|    do { \
  |  |  |  |  657|  4.83k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (657:40): [True: 0, False: 2.41k]
  |  |  |  |  ------------------
  |  |  |  |  658|  2.41k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.41k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.41k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.41k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.41k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.41k|    do { \
  |  |  |  |  604|  2.41k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.41k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.41k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.41k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.41k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.41k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.41k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.41k]
  |  |  ------------------
  ------------------
  141|  2.41k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  119|  2.41k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.41k|    do { \
  |  |  |  |  657|  2.41k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.41k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.41k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.41k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.41k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.41k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.41k|    do { \
  |  |  |  |  604|  2.41k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.41k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.41k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.41k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.41k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.41k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.41k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.41k]
  |  |  ------------------
  ------------------
  142|       |
  143|       |    /* The algorithm */
  144|       |
  145|  2.41k|    no_of_components = 0;
  146|   447k|    for (igraph_int_t first_node = 0; first_node < no_of_nodes; ++first_node) {
  ------------------
  |  Branch (146:39): [True: 445k, False: 2.41k]
  ------------------
  147|   445k|        igraph_int_t act_component_size;
  148|       |
  149|   445k|        if (IGRAPH_BIT_TEST(already_added, first_node)) {
  ------------------
  |  |  142|   445k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   445k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|   445k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   445k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|   445k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   445k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (142:36): [True: 50.9k, False: 394k]
  |  |  ------------------
  ------------------
  150|  50.9k|            continue;
  151|  50.9k|        }
  152|   394k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   394k|    do { \
  |  |   47|   394k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 394k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   394k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 394k]
  |  |  ------------------
  ------------------
  153|       |
  154|   394k|        IGRAPH_BIT_SET(already_added, first_node);
  ------------------
  |  |  103|   394k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   394k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|   394k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   394k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|   394k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   394k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|   394k|        act_component_size = 1;
  156|   394k|        if (membership) {
  ------------------
  |  Branch (156:13): [True: 0, False: 394k]
  ------------------
  157|      0|            VECTOR(*membership)[first_node] = no_of_components;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  158|      0|        }
  159|   394k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, first_node));
  ------------------
  |  |  656|   394k|    do { \
  |  |  657|   394k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   394k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   394k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 394k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   394k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 394k]
  |  |  ------------------
  ------------------
  160|       |
  161|   839k|        while ( !igraph_dqueue_int_empty(&q) ) {
  ------------------
  |  Branch (161:17): [True: 445k, False: 394k]
  ------------------
  162|   445k|            igraph_int_t act_node = igraph_dqueue_int_pop(&q);
  163|   445k|            IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|   445k|    do { \
  |  |  657|   445k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   445k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   445k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 445k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   445k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 445k]
  |  |  ------------------
  ------------------
  164|   445k|                graph, &neis, act_node, IGRAPH_ALL, IGRAPH_NO_LOOPS, IGRAPH_MULTIPLE
  165|   445k|            ));
  166|   445k|            igraph_int_t nei_count = igraph_vector_int_size(&neis);
  167|   584k|            for (igraph_int_t i = 0; i < nei_count; i++) {
  ------------------
  |  Branch (167:38): [True: 139k, False: 445k]
  ------------------
  168|   139k|                igraph_int_t neighbor = VECTOR(neis)[i];
  ------------------
  |  |   60|   139k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  169|   139k|                if (IGRAPH_BIT_TEST(already_added, neighbor)) {
  ------------------
  |  |  142|   139k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   139k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|   139k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   139k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|   139k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   139k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (142:36): [True: 88.1k, False: 50.9k]
  |  |  ------------------
  ------------------
  170|  88.1k|                    continue;
  171|  88.1k|                }
  172|  50.9k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  50.9k|    do { \
  |  |  657|  50.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  50.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  50.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 50.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  50.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 50.9k]
  |  |  ------------------
  ------------------
  173|  50.9k|                IGRAPH_BIT_SET(already_added, neighbor);
  ------------------
  |  |  103|  50.9k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  50.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  50.9k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  50.9k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  50.9k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  50.9k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  174|  50.9k|                act_component_size++;
  175|  50.9k|                if (membership) {
  ------------------
  |  Branch (175:21): [True: 0, False: 50.9k]
  ------------------
  176|      0|                    VECTOR(*membership)[neighbor] = no_of_components;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  177|      0|                }
  178|  50.9k|            }
  179|   445k|        }
  180|       |
  181|   394k|        no_of_components++;
  182|   394k|        if (csize) {
  ------------------
  |  Branch (182:13): [True: 394k, False: 0]
  ------------------
  183|   394k|            IGRAPH_CHECK(igraph_vector_int_push_back(csize, act_component_size));
  ------------------
  |  |  656|   394k|    do { \
  |  |  657|   394k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   394k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   394k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 394k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   394k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 394k]
  |  |  ------------------
  ------------------
  184|   394k|        }
  185|   394k|    }
  186|       |
  187|       |    /* Cleaning up */
  188|       |
  189|  2.41k|    if (no) {
  ------------------
  |  Branch (189:9): [True: 0, False: 2.41k]
  ------------------
  190|      0|        *no = no_of_components;
  191|      0|    }
  192|       |
  193|       |    /* Clean up */
  194|  2.41k|    igraph_bitset_destroy(&already_added);
  195|  2.41k|    igraph_dqueue_int_destroy(&q);
  196|  2.41k|    igraph_vector_int_destroy(&neis);
  197|  2.41k|    IGRAPH_FINALLY_CLEAN(3);
  198|       |
  199|       |    /* Update cache */
  200|  2.41k|    igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED, no_of_components == 1);
  201|       |
  202|  2.41k|    return IGRAPH_SUCCESS;
  203|  2.41k|}
components.c:igraph_i_connected_components_strong:
  208|  2.00k|) {
  209|  2.00k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  210|  2.00k|    igraph_vector_int_t next_nei = IGRAPH_VECTOR_NULL;
  ------------------
  |  |   99|  2.00k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
  211|  2.00k|    igraph_int_t num_seen;
  212|  2.00k|    igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   56|  2.00k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
  213|  2.00k|    igraph_int_t no_of_components = 0;
  214|  2.00k|    igraph_vector_int_t out = IGRAPH_VECTOR_NULL;
  ------------------
  |  |   99|  2.00k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
  215|  2.00k|    igraph_adjlist_t adjlist;
  216|       |
  217|       |    /* Memory for result, csize is dynamically allocated */
  218|  2.00k|    if (membership) {
  ------------------
  |  Branch (218:9): [True: 2.00k, False: 0]
  ------------------
  219|  2.00k|        IGRAPH_CHECK(igraph_vector_int_resize(membership, no_of_nodes));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  220|  2.00k|    }
  221|  2.00k|    if (csize) {
  ------------------
  |  Branch (221:9): [True: 2.00k, False: 0]
  ------------------
  222|  2.00k|        igraph_vector_int_clear(csize);
  223|  2.00k|    }
  224|       |
  225|       |    /* Try to make use of cached information. */
  226|  2.00k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_IS_STRONGLY_CONNECTED) &&
  ------------------
  |  Branch (226:9): [True: 0, False: 2.00k]
  ------------------
  227|      0|        igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_IS_STRONGLY_CONNECTED)) {
  ------------------
  |  Branch (227:9): [True: 0, False: 0]
  ------------------
  228|       |        /* If we know that the graph is strongly connected from the cache,
  229|       |         * we can return the result right away. We keep in mind that
  230|       |         * the null graph is considered disconnected, therefore any connected
  231|       |         * graph has precisely one component. */
  232|      0|        if (membership) {
  ------------------
  |  Branch (232:13): [True: 0, False: 0]
  ------------------
  233|       |            /* All vertices are members of the same component,
  234|       |             * component number 0. */
  235|      0|            igraph_vector_int_null(membership);
  236|      0|        }
  237|      0|        if (csize) {
  ------------------
  |  Branch (237:13): [True: 0, False: 0]
  ------------------
  238|       |            /* The size of the single component is the same as the vertex count. */
  239|      0|            IGRAPH_CHECK(igraph_vector_int_push_back(csize, no_of_nodes));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  240|      0|        }
  241|      0|        if (no) {
  ------------------
  |  Branch (241:13): [True: 0, False: 0]
  ------------------
  242|       |            /* There is one component. */
  243|      0|            *no = 1;
  244|      0|        }
  245|      0|        return IGRAPH_SUCCESS;
  246|      0|    }
  247|       |
  248|       |    /* The result */
  249|       |
  250|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&next_nei, no_of_nodes);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  251|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&out, 0);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  252|  2.00k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  2.00k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.00k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  253|       |
  254|  2.00k|    IGRAPH_CHECK(igraph_vector_int_reserve(&out, no_of_nodes));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  255|       |
  256|  2.00k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, IGRAPH_OUT, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  257|  2.00k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  258|       |
  259|  2.00k|    num_seen = 0;
  260|   334k|    for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (260:30): [True: 332k, False: 2.00k]
  ------------------
  261|   332k|        const igraph_vector_int_t *tmp;
  262|       |
  263|   332k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   332k|    do { \
  |  |   47|   332k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 332k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   332k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 332k]
  |  |  ------------------
  ------------------
  264|       |
  265|   332k|        tmp = igraph_adjlist_get(&adjlist, i);
  ------------------
  |  |   73|   332k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  266|   332k|        if (VECTOR(next_nei)[i] > igraph_vector_int_size(tmp)) {
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (266:13): [True: 32.7k, False: 299k]
  ------------------
  267|  32.7k|            continue;
  268|  32.7k|        }
  269|       |
  270|   299k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, i));
  ------------------
  |  |  656|   299k|    do { \
  |  |  657|   299k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   299k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   299k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 299k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   299k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 299k]
  |  |  ------------------
  ------------------
  271|  1.04M|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (271:16): [True: 740k, False: 299k]
  ------------------
  272|   740k|            igraph_int_t act_node = igraph_dqueue_int_back(&q);
  273|   740k|            tmp = igraph_adjlist_get(&adjlist, act_node);
  ------------------
  |  |   73|   740k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  274|   740k|            if (VECTOR(next_nei)[act_node] == 0) {
  ------------------
  |  |   60|   740k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (274:17): [True: 332k, False: 407k]
  ------------------
  275|       |                /* this is the first time we've met this vertex */
  276|   332k|                VECTOR(next_nei)[act_node]++;
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  277|   407k|            } else if (VECTOR(next_nei)[act_node] <= igraph_vector_int_size(tmp)) {
  ------------------
  |  |   60|   407k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (277:24): [True: 74.9k, False: 332k]
  ------------------
  278|       |                /* we've already met this vertex but it has more children */
  279|  74.9k|                igraph_int_t neighbor = VECTOR(*tmp)[VECTOR(next_nei)[act_node] - 1];
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_int_t neighbor = VECTOR(*tmp)[VECTOR(next_nei)[act_node] - 1];
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  280|  74.9k|                if (VECTOR(next_nei)[neighbor] == 0) {
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (280:21): [True: 32.7k, False: 42.2k]
  ------------------
  281|  32.7k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  32.7k|    do { \
  |  |  657|  32.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  32.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  32.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 32.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  32.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 32.7k]
  |  |  ------------------
  ------------------
  282|  32.7k|                }
  283|  74.9k|                VECTOR(next_nei)[act_node]++;
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  284|   332k|            } else {
  285|       |                /* we've met this vertex and it has no more children */
  286|   332k|                IGRAPH_CHECK(igraph_vector_int_push_back(&out, act_node));
  ------------------
  |  |  656|   332k|    do { \
  |  |  657|   332k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   332k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   332k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 332k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   332k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 332k]
  |  |  ------------------
  ------------------
  287|   332k|                igraph_dqueue_int_pop_back(&q);
  288|   332k|                num_seen++;
  289|       |
  290|   332k|                if (num_seen % 10000 == 0) {
  ------------------
  |  Branch (290:21): [True: 0, False: 332k]
  ------------------
  291|       |                    /* time to report progress and allow the user to interrupt */
  292|      0|                    IGRAPH_PROGRESS("Strongly connected components: ",
  ------------------
  |  |  169|      0|    do { \
  |  |  170|      0|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  293|      0|                                    num_seen * 50.0 / no_of_nodes, NULL);
  294|      0|                    IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|      0|    do { \
  |  |   47|      0|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  295|      0|                }
  296|   332k|            }
  297|   740k|        } /* while q */
  298|   299k|    }  /* for */
  299|       |
  300|  2.00k|    IGRAPH_PROGRESS("Strongly connected components: ", 50.0, NULL);
  ------------------
  |  |  169|  2.00k|    do { \
  |  |  170|  2.00k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  301|       |
  302|  2.00k|    igraph_adjlist_destroy(&adjlist);
  303|  2.00k|    IGRAPH_FINALLY_CLEAN(1);
  304|       |
  305|  2.00k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, IGRAPH_IN, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  306|  2.00k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  307|       |
  308|       |    /* OK, we've the 'out' values for the nodes, let's use them in
  309|       |       decreasing order with the help of a heap */
  310|       |
  311|  2.00k|    igraph_vector_int_null(&next_nei);             /* mark already added vertices */
  312|  2.00k|    num_seen = 0;
  313|       |
  314|   334k|    while (!igraph_vector_int_empty(&out)) {
  ------------------
  |  Branch (314:12): [True: 332k, False: 2.00k]
  ------------------
  315|   332k|        igraph_int_t act_component_size;
  316|   332k|        igraph_int_t grandfather = igraph_vector_int_pop_back(&out);
  317|       |
  318|   332k|        if (VECTOR(next_nei)[grandfather] != 0) {
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (318:13): [True: 21.3k, False: 311k]
  ------------------
  319|  21.3k|            continue;
  320|  21.3k|        }
  321|   311k|        VECTOR(next_nei)[grandfather] = 1;
  ------------------
  |  |   60|   311k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  322|   311k|        act_component_size = 1;
  323|   311k|        if (membership) {
  ------------------
  |  Branch (323:13): [True: 311k, False: 0]
  ------------------
  324|   311k|            VECTOR(*membership)[grandfather] = no_of_components;
  ------------------
  |  |   60|   311k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  325|   311k|        }
  326|   311k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, grandfather));
  ------------------
  |  |  656|   311k|    do { \
  |  |  657|   311k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   311k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   311k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 311k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   311k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 311k]
  |  |  ------------------
  ------------------
  327|       |
  328|   311k|        num_seen++;
  329|   311k|        if (num_seen % 10000 == 0) {
  ------------------
  |  Branch (329:13): [True: 0, False: 311k]
  ------------------
  330|       |            /* time to report progress and allow the user to interrupt */
  331|      0|            IGRAPH_PROGRESS("Strongly connected components: ",
  ------------------
  |  |  169|      0|    do { \
  |  |  170|      0|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  332|      0|                            50.0 + num_seen * 50.0 / no_of_nodes, NULL);
  333|      0|            IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|      0|    do { \
  |  |   47|      0|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  334|      0|        }
  335|       |
  336|   643k|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (336:16): [True: 332k, False: 311k]
  ------------------
  337|   332k|            igraph_int_t act_node = igraph_dqueue_int_pop_back(&q);
  338|   332k|            const igraph_vector_int_t *tmp = igraph_adjlist_get(&adjlist, act_node);
  ------------------
  |  |   73|   332k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  339|   332k|            const igraph_int_t n = igraph_vector_int_size(tmp);
  340|   407k|            for (igraph_int_t i = 0; i < n; i++) {
  ------------------
  |  Branch (340:38): [True: 74.9k, False: 332k]
  ------------------
  341|  74.9k|                igraph_int_t neighbor = VECTOR(*tmp)[i];
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  342|  74.9k|                if (VECTOR(next_nei)[neighbor] != 0) {
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (342:21): [True: 53.5k, False: 21.3k]
  ------------------
  343|  53.5k|                    continue;
  344|  53.5k|                }
  345|  21.3k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  21.3k|    do { \
  |  |  657|  21.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  21.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  21.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 21.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  21.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 21.3k]
  |  |  ------------------
  ------------------
  346|  21.3k|                VECTOR(next_nei)[neighbor] = 1;
  ------------------
  |  |   60|  21.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  347|  21.3k|                act_component_size++;
  348|  21.3k|                if (membership) {
  ------------------
  |  Branch (348:21): [True: 21.3k, False: 0]
  ------------------
  349|  21.3k|                    VECTOR(*membership)[neighbor] = no_of_components;
  ------------------
  |  |   60|  21.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  350|  21.3k|                }
  351|       |
  352|  21.3k|                num_seen++;
  353|  21.3k|                if (num_seen % 10000 == 0) {
  ------------------
  |  Branch (353:21): [True: 0, False: 21.3k]
  ------------------
  354|       |                    /* time to report progress and allow the user to interrupt */
  355|      0|                    IGRAPH_PROGRESS("Strongly connected components: ",
  ------------------
  |  |  169|      0|    do { \
  |  |  170|      0|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  356|      0|                                    50.0 + num_seen * 50.0 / no_of_nodes, NULL);
  357|      0|                    IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|      0|    do { \
  |  |   47|      0|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  358|      0|                }
  359|  21.3k|            }
  360|   332k|        }
  361|       |
  362|   311k|        no_of_components++;
  363|   311k|        if (csize) {
  ------------------
  |  Branch (363:13): [True: 311k, False: 0]
  ------------------
  364|   311k|            IGRAPH_CHECK(igraph_vector_int_push_back(csize, act_component_size));
  ------------------
  |  |  656|   311k|    do { \
  |  |  657|   311k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   311k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   311k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 311k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   311k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 311k]
  |  |  ------------------
  ------------------
  365|   311k|        }
  366|   311k|    }
  367|       |
  368|  2.00k|    IGRAPH_PROGRESS("Strongly connected components: ", 100.0, NULL);
  ------------------
  |  |  169|  2.00k|    do { \
  |  |  170|  2.00k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  369|       |
  370|  2.00k|    if (no) {
  ------------------
  |  Branch (370:9): [True: 2.00k, False: 0]
  ------------------
  371|  2.00k|        *no = no_of_components;
  372|  2.00k|    }
  373|       |
  374|       |    /* Clean up */
  375|  2.00k|    igraph_adjlist_destroy(&adjlist);
  376|  2.00k|    igraph_vector_int_destroy(&out);
  377|  2.00k|    igraph_dqueue_int_destroy(&q);
  378|  2.00k|    igraph_vector_int_destroy(&next_nei);
  379|  2.00k|    IGRAPH_FINALLY_CLEAN(4);
  380|       |
  381|       |    /* Update cache */
  382|  2.00k|    igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_STRONGLY_CONNECTED, no_of_components == 1);
  383|  2.00k|    if (no_of_components == 1) {
  ------------------
  |  Branch (383:9): [True: 119, False: 1.88k]
  ------------------
  384|    119|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED, true);
  385|    119|    }
  386|       |
  387|  2.00k|    return IGRAPH_SUCCESS;
  388|  2.00k|}
components.c:igraph_i_is_connected_weak:
  486|  1.88k|static igraph_error_t igraph_i_is_connected_weak(const igraph_t *graph, igraph_bool_t *res) {
  487|  1.88k|    const igraph_int_t no_of_nodes = igraph_vcount(graph);
  488|  1.88k|    const igraph_int_t no_of_edges = igraph_ecount(graph);
  489|  1.88k|    igraph_int_t added_count;
  490|  1.88k|    igraph_bitset_t already_added;
  491|  1.88k|    igraph_vector_int_t neis;
  492|  1.88k|    igraph_dqueue_int_t q;
  493|       |
  494|       |    /* By convention, the null graph is not considered connected.
  495|       |     * See https://github.com/igraph/igraph/issues/1538 */
  496|  1.88k|    if (no_of_nodes == 0) {
  ------------------
  |  Branch (496:9): [True: 0, False: 1.88k]
  ------------------
  497|      0|        *res = false;
  498|      0|        goto exit;
  499|      0|    }
  500|       |
  501|       |    /* A connected graph has at least |V| - 1 edges. */
  502|  1.88k|    if (no_of_edges < no_of_nodes - 1) {
  ------------------
  |  Branch (502:9): [True: 1.63k, False: 253]
  ------------------
  503|  1.63k|        *res = false;
  504|  1.63k|        goto exit;
  505|  1.63k|    }
  506|       |
  507|    253|    IGRAPH_BITSET_INIT_FINALLY(&already_added, no_of_nodes);
  ------------------
  |  |  265|    253|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  266|    253|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|    253|    do { \
  |  |  |  |  657|    253|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    253|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    253|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 253]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    253|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 253]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  267|    253|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|    253|    do { \
  |  |  |  |  604|    253|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    253|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    253|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    253|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 253]
  |  |  |  |  ------------------
  |  |  |  |  608|    253|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    253|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 253]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (267:62): [Folded, False: 253]
  |  |  ------------------
  ------------------
  508|    253|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 10);
  ------------------
  |  |   61|    253|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|    253|    do { \
  |  |  |  |  657|    253|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    253|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    253|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 253]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    253|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 253]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|    253|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|    253|    do { \
  |  |  |  |  604|    253|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    253|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    253|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    253|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 253]
  |  |  |  |  ------------------
  |  |  |  |  608|    253|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    253|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 253]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 253]
  |  |  ------------------
  ------------------
  509|    253|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  119|    253|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    253|    do { \
  |  |  |  |  657|    253|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    253|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    253|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 253]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    253|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 253]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    253|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    253|    do { \
  |  |  |  |  604|    253|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    253|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    253|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    253|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 253]
  |  |  |  |  ------------------
  |  |  |  |  608|    253|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    253|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 253]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 253]
  |  |  ------------------
  ------------------
  510|       |
  511|       |    /* Try to find at least two components */
  512|    253|    IGRAPH_BIT_SET(already_added, 0);
  ------------------
  |  |  103|    253|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|    253|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|    253|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|    253|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|    253|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|    253|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  513|    253|    IGRAPH_CHECK(igraph_dqueue_int_push(&q, 0));
  ------------------
  |  |  656|    253|    do { \
  |  |  657|    253|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    253|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    253|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 253]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    253|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 253]
  |  |  ------------------
  ------------------
  514|       |
  515|    253|    added_count = 1;
  516|  1.61k|    while (! igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (516:12): [True: 1.47k, False: 132]
  ------------------
  517|  1.47k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  1.47k|    do { \
  |  |   47|  1.47k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 1.47k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  1.47k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 1.47k]
  |  |  ------------------
  ------------------
  518|       |
  519|  1.47k|        const igraph_int_t actnode = igraph_dqueue_int_pop(&q);
  520|       |
  521|  1.47k|        IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|  1.47k|    do { \
  |  |  657|  1.47k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.47k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.47k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.47k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.47k]
  |  |  ------------------
  ------------------
  522|  1.47k|            graph, &neis, actnode, IGRAPH_ALL, IGRAPH_NO_LOOPS, IGRAPH_MULTIPLE
  523|  1.47k|        ));
  524|  1.47k|        const igraph_int_t nei_count = igraph_vector_int_size(&neis);
  525|       |
  526|  11.0k|        for (igraph_int_t i = 0; i < nei_count; i++) {
  ------------------
  |  Branch (526:34): [True: 9.65k, False: 1.35k]
  ------------------
  527|  9.65k|            const igraph_int_t neighbor = VECTOR(neis)[i];
  ------------------
  |  |   60|  9.65k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  528|  9.65k|            if (IGRAPH_BIT_TEST(already_added, neighbor)) {
  ------------------
  |  |  142|  9.65k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  9.65k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  9.65k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  9.65k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  9.65k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  9.65k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (142:36): [True: 8.13k, False: 1.52k]
  |  |  ------------------
  ------------------
  529|  8.13k|                continue;
  530|  8.13k|            }
  531|       |
  532|  1.52k|            IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  1.52k|    do { \
  |  |  657|  1.52k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.52k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.52k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.52k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.52k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.52k]
  |  |  ------------------
  ------------------
  533|  1.52k|            added_count++;
  534|  1.52k|            IGRAPH_BIT_SET(already_added, neighbor);
  ------------------
  |  |  103|  1.52k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  1.52k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  1.52k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  1.52k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  1.52k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  1.52k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  535|       |
  536|  1.52k|            if (added_count == no_of_nodes) {
  ------------------
  |  Branch (536:17): [True: 121, False: 1.39k]
  ------------------
  537|       |                /* We have already reached all nodes: the graph is connected.
  538|       |                 * We can stop the traversal now. */
  539|    121|                goto done;
  540|    121|            }
  541|  1.52k|        }
  542|  1.47k|    }
  543|       |
  544|    253|done:
  545|       |    /* Connected? */
  546|    253|    *res = (added_count == no_of_nodes);
  547|       |
  548|    253|    igraph_bitset_destroy(&already_added);
  549|    253|    igraph_dqueue_int_destroy(&q);
  550|    253|    igraph_vector_int_destroy(&neis);
  551|    253|    IGRAPH_FINALLY_CLEAN(3);
  552|       |
  553|  1.88k|exit:
  554|  1.88k|    igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED, *res);
  555|  1.88k|    if (igraph_is_directed(graph) && !(*res)) {
  ------------------
  |  Branch (555:9): [True: 1.88k, False: 0]
  |  Branch (555:38): [True: 1.76k, False: 121]
  ------------------
  556|       |        /* If the graph is not weakly connected, it is not strongly connected
  557|       |         * either so we can also cache that */
  558|  1.76k|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_STRONGLY_CONNECTED, *res);
  559|  1.76k|    }
  560|       |
  561|  1.88k|    return IGRAPH_SUCCESS;
  562|    253|}
components.c:igraph_i_decompose_strong:
  729|  2.00k|                                     igraph_int_t maxcompno, igraph_int_t minelements) {
  730|       |
  731|       |
  732|  2.00k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  733|       |
  734|       |    /* this is a heap used twice for checking what nodes have
  735|       |     * been counted already */
  736|  2.00k|    igraph_vector_int_t next_nei = IGRAPH_VECTOR_NULL;
  ------------------
  |  |   99|  2.00k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
  737|       |
  738|  2.00k|    igraph_int_t i, n, num_seen;
  739|  2.00k|    igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   56|  2.00k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
  740|       |
  741|  2.00k|    igraph_int_t no_of_components = 0;
  742|       |
  743|  2.00k|    igraph_vector_int_t out = IGRAPH_VECTOR_NULL;
  ------------------
  |  |   99|  2.00k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
  744|  2.00k|    const igraph_vector_int_t* tmp;
  745|       |
  746|  2.00k|    igraph_adjlist_t adjlist;
  747|  2.00k|    igraph_vector_int_t verts;
  748|  2.00k|    igraph_vector_int_t vids_old2new;
  749|  2.00k|    igraph_t newg;
  750|       |
  751|  2.00k|    if (maxcompno < 0) {
  ------------------
  |  Branch (751:9): [True: 0, False: 2.00k]
  ------------------
  752|      0|        maxcompno = IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  753|      0|    }
  754|       |
  755|  2.00k|    igraph_graph_list_clear(components);
  756|       |
  757|       |    /* The result */
  758|       |
  759|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&vids_old2new, no_of_nodes);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  760|  2.00k|    igraph_vector_int_fill(&vids_old2new, -1);
  761|       |
  762|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&verts, 0);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  763|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&next_nei, no_of_nodes);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  764|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&out, 0);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  765|  2.00k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  2.00k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.00k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  766|       |
  767|  2.00k|    IGRAPH_CHECK(igraph_vector_int_reserve(&out, no_of_nodes));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  768|       |
  769|  2.00k|    igraph_vector_int_null(&out);
  770|       |
  771|  2.00k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, IGRAPH_OUT, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  772|  2.00k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  773|       |
  774|       |    /* vids_old2new would have been created internally in igraph_induced_subgraph(),
  775|       |       but it is slow if the graph is large and consists of many small components,
  776|       |       so we create it once here and then re-use it */
  777|       |
  778|       |    /* number of components seen */
  779|  2.00k|    num_seen = 0;
  780|       |    /* populate the 'out' vector by browsing a node and following up
  781|       |       all its neighbors recursively, then switching to the next
  782|       |       unassigned node */
  783|   334k|    for (i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (783:17): [True: 332k, False: 2.00k]
  ------------------
  784|   332k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   332k|    do { \
  |  |   47|   332k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 332k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   332k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 332k]
  |  |  ------------------
  ------------------
  785|       |
  786|       |        /* get all the 'out' neighbors of this node
  787|       |         * NOTE: next_nei is initialized [0, 0, ...] */
  788|   332k|        tmp = igraph_adjlist_get(&adjlist, i);
  ------------------
  |  |   73|   332k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  789|   332k|        if (VECTOR(next_nei)[i] > igraph_vector_int_size(tmp)) {
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (789:13): [True: 31.0k, False: 301k]
  ------------------
  790|  31.0k|            continue;
  791|  31.0k|        }
  792|       |
  793|       |        /* add this node to the queue for this component */
  794|   301k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, i));
  ------------------
  |  |  656|   301k|    do { \
  |  |  657|   301k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   301k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   301k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 301k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   301k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 301k]
  |  |  ------------------
  ------------------
  795|       |
  796|       |        /* consume the tree from this node ("root") recursively
  797|       |         * until there is no more */
  798|  1.04M|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (798:16): [True: 740k, False: 301k]
  ------------------
  799|       |            /* this looks up but does NOT consume the queue */
  800|   740k|            igraph_int_t act_node = igraph_dqueue_int_back(&q);
  801|       |
  802|       |            /* get all neighbors of this node */
  803|   740k|            tmp = igraph_adjlist_get(&adjlist, act_node);
  ------------------
  |  |   73|   740k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  804|   740k|            if (VECTOR(next_nei)[act_node] == 0) {
  ------------------
  |  |   60|   740k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (804:17): [True: 332k, False: 407k]
  ------------------
  805|       |                /* this is the first time we've met this vertex,
  806|       |                     * because next_nei is initialized [0, 0, ...] */
  807|   332k|                VECTOR(next_nei)[act_node]++;
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  808|       |                /* back to the queue, same vertex is up again */
  809|       |
  810|   407k|            } else if (VECTOR(next_nei)[act_node] <= igraph_vector_int_size(tmp)) {
  ------------------
  |  |   60|   407k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (810:24): [True: 74.9k, False: 332k]
  ------------------
  811|       |                /* we've already met this vertex but it has more children */
  812|  74.9k|                igraph_int_t neighbor = VECTOR(*tmp)[VECTOR(next_nei)[act_node] - 1];
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_int_t neighbor = VECTOR(*tmp)[VECTOR(next_nei)[act_node] - 1];
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  813|  74.9k|                if (VECTOR(next_nei)[neighbor] == 0) {
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (813:21): [True: 31.0k, False: 43.9k]
  ------------------
  814|       |                    /* add the root of the other children to the queue */
  815|  31.0k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  31.0k|    do { \
  |  |  657|  31.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  31.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  31.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 31.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  31.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 31.0k]
  |  |  ------------------
  ------------------
  816|  31.0k|                }
  817|  74.9k|                VECTOR(next_nei)[act_node]++;
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  818|   332k|            } else {
  819|       |                /* we've met this vertex and it has no more children */
  820|   332k|                IGRAPH_CHECK(igraph_vector_int_push_back(&out, act_node));
  ------------------
  |  |  656|   332k|    do { \
  |  |  657|   332k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   332k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   332k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 332k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   332k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 332k]
  |  |  ------------------
  ------------------
  821|       |                /* this consumes the queue, since there's nowhere to go */
  822|   332k|                igraph_dqueue_int_pop_back(&q);
  823|   332k|                num_seen++;
  824|       |
  825|   332k|                if (num_seen % 10000 == 0) {
  ------------------
  |  Branch (825:21): [True: 0, False: 332k]
  ------------------
  826|       |                    /* time to report progress and allow the user to interrupt */
  827|      0|                    IGRAPH_PROGRESS("Strongly connected components: ",
  ------------------
  |  |  169|      0|    do { \
  |  |  170|      0|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  828|      0|                                    num_seen * 50.0 / no_of_nodes, NULL);
  829|      0|                    IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|      0|    do { \
  |  |   47|      0|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  830|      0|                }
  831|   332k|            }
  832|   740k|        } /* while q */
  833|   301k|    }  /* for */
  834|       |
  835|  2.00k|    IGRAPH_PROGRESS("Strongly connected components: ", 50.0, NULL);
  ------------------
  |  |  169|  2.00k|    do { \
  |  |  170|  2.00k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  836|       |
  837|  2.00k|    igraph_adjlist_destroy(&adjlist);
  838|  2.00k|    IGRAPH_FINALLY_CLEAN(1);
  839|       |
  840|  2.00k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, IGRAPH_IN, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  841|  2.00k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  842|       |
  843|       |    /* OK, we've the 'out' values for the nodes, let's use them in
  844|       |     * decreasing order with the help of the next_nei heap */
  845|       |
  846|  2.00k|    igraph_vector_int_null(&next_nei);             /* mark already added vertices */
  847|       |
  848|       |    /* number of components built */
  849|  2.00k|    num_seen = 0;
  850|   334k|    while (!igraph_vector_int_empty(&out) && no_of_components < maxcompno) {
  ------------------
  |  Branch (850:12): [True: 332k, False: 2.00k]
  |  Branch (850:46): [True: 332k, False: 0]
  ------------------
  851|       |        /* consume the vector from the last element */
  852|   332k|        igraph_int_t grandfather = igraph_vector_int_pop_back(&out);
  853|       |
  854|       |        /* been here, done that
  855|       |         * NOTE: next_nei is initialized as [0, 0, ...] */
  856|   332k|        if (VECTOR(next_nei)[grandfather] != 0) {
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (856:13): [True: 21.3k, False: 311k]
  ------------------
  857|  21.3k|            continue;
  858|  21.3k|        }
  859|       |
  860|       |        /* collect all the members of this component */
  861|   311k|        igraph_vector_int_clear(&verts);
  862|       |
  863|       |        /* this node is gone for any future components */
  864|   311k|        VECTOR(next_nei)[grandfather] = 1;
  ------------------
  |  |   60|   311k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  865|       |
  866|       |        /* add to component */
  867|   311k|        IGRAPH_CHECK(igraph_vector_int_push_back(&verts, grandfather));
  ------------------
  |  |  656|   311k|    do { \
  |  |  657|   311k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   311k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   311k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 311k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   311k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 311k]
  |  |  ------------------
  ------------------
  868|   311k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, grandfather));
  ------------------
  |  |  656|   311k|    do { \
  |  |  657|   311k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   311k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   311k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 311k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   311k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 311k]
  |  |  ------------------
  ------------------
  869|       |
  870|   311k|        num_seen++;
  871|   311k|        if (num_seen % 10000 == 0) {
  ------------------
  |  Branch (871:13): [True: 0, False: 311k]
  ------------------
  872|       |            /* time to report progress and allow the user to interrupt */
  873|      0|            IGRAPH_PROGRESS("Strongly connected components: ",
  ------------------
  |  |  169|      0|    do { \
  |  |  170|      0|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  874|      0|                            50.0 + num_seen * 50.0 / no_of_nodes, NULL);
  875|      0|            IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|      0|    do { \
  |  |   47|      0|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  876|      0|        }
  877|       |
  878|   643k|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (878:16): [True: 332k, False: 311k]
  ------------------
  879|       |            /* consume the queue from this node */
  880|   332k|            igraph_int_t act_node = igraph_dqueue_int_pop_back(&q);
  881|   332k|            tmp = igraph_adjlist_get(&adjlist, act_node);
  ------------------
  |  |   73|   332k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  882|   332k|            n = igraph_vector_int_size(tmp);
  883|   407k|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (883:25): [True: 74.9k, False: 332k]
  ------------------
  884|  74.9k|                igraph_int_t neighbor = VECTOR(*tmp)[i];
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  885|  74.9k|                if (VECTOR(next_nei)[neighbor] != 0) {
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (885:21): [True: 53.5k, False: 21.3k]
  ------------------
  886|  53.5k|                    continue;
  887|  53.5k|                }
  888|  21.3k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  21.3k|    do { \
  |  |  657|  21.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  21.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  21.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 21.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  21.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 21.3k]
  |  |  ------------------
  ------------------
  889|  21.3k|                VECTOR(next_nei)[neighbor] = 1;
  ------------------
  |  |   60|  21.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  890|       |
  891|       |                /* add to component */
  892|  21.3k|                IGRAPH_CHECK(igraph_vector_int_push_back(&verts, neighbor));
  ------------------
  |  |  656|  21.3k|    do { \
  |  |  657|  21.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  21.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  21.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 21.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  21.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 21.3k]
  |  |  ------------------
  ------------------
  893|       |
  894|  21.3k|                num_seen++;
  895|  21.3k|                if (num_seen % 10000 == 0) {
  ------------------
  |  Branch (895:21): [True: 0, False: 21.3k]
  ------------------
  896|       |                    /* time to report progress and allow the user to interrupt */
  897|      0|                    IGRAPH_PROGRESS("Strongly connected components: ",
  ------------------
  |  |  169|      0|    do { \
  |  |  170|      0|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  898|      0|                                    50.0 + num_seen * 50.0 / no_of_nodes, NULL);
  899|      0|                    IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|      0|    do { \
  |  |   47|      0|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  900|      0|                }
  901|  21.3k|            }
  902|   332k|        }
  903|       |
  904|       |        /* ok, we have a component */
  905|   311k|        if (igraph_vector_int_size(&verts) < minelements) {
  ------------------
  |  Branch (905:13): [True: 310k, False: 658]
  ------------------
  906|   310k|            continue;
  907|   310k|        }
  908|       |
  909|    658|        IGRAPH_CHECK(igraph_i_induced_subgraph_map(
  ------------------
  |  |  656|    658|    do { \
  |  |  657|    658|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    658|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    658|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 658]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    658|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 658]
  |  |  ------------------
  ------------------
  910|    658|            graph, &newg, igraph_vss_vector(&verts),
  911|    658|            IGRAPH_SUBGRAPH_AUTO, &vids_old2new,
  912|    658|            /* invmap = */ 0, /* map_is_prepared = */ 1
  913|    658|        ));
  914|    658|        IGRAPH_FINALLY(igraph_destroy, &newg);
  ------------------
  |  |  603|    658|    do { \
  |  |  604|    658|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    658|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    658|         * incorrect destructor function with the pointer */ \
  |  |  607|    658|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 658]
  |  |  ------------------
  |  |  608|    658|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    658|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 658]
  |  |  ------------------
  ------------------
  915|    658|        IGRAPH_CHECK(igraph_graph_list_push_back(components, &newg));
  ------------------
  |  |  656|    658|    do { \
  |  |  657|    658|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    658|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    658|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 658]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    658|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 658]
  |  |  ------------------
  ------------------
  916|    658|        IGRAPH_FINALLY_CLEAN(1);  /* ownership of newg now taken by 'components' */
  917|       |
  918|       |        /* vids_old2new has to be cleaned up here because a vertex may appear
  919|       |         * in multiple strongly connected components. Simply calling
  920|       |         * igraph_vector_int_fill() would be an O(n) operation where n is the number
  921|       |         * of vertices in the large graph so we cannot do that; we have to
  922|       |         * iterate over 'verts' instead */
  923|    658|        n = igraph_vector_int_size(&verts);
  924|  22.1k|        for (i = 0; i < n; i++) {
  ------------------
  |  Branch (924:21): [True: 21.5k, False: 658]
  ------------------
  925|  21.5k|            VECTOR(vids_old2new)[VECTOR(verts)[i]] = 0;
  ------------------
  |  |   60|  21.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(vids_old2new)[VECTOR(verts)[i]] = 0;
  ------------------
  |  |   60|  21.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  926|  21.5k|        }
  927|       |
  928|    658|        no_of_components++;
  929|    658|    }
  930|       |
  931|  2.00k|    IGRAPH_PROGRESS("Strongly connected components: ", 100.0, NULL);
  ------------------
  |  |  169|  2.00k|    do { \
  |  |  170|  2.00k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  932|       |
  933|       |    /* Clean up, return */
  934|       |
  935|  2.00k|    igraph_vector_int_destroy(&vids_old2new);
  936|  2.00k|    igraph_vector_int_destroy(&verts);
  937|  2.00k|    igraph_adjlist_destroy(&adjlist);
  938|  2.00k|    igraph_vector_int_destroy(&out);
  939|  2.00k|    igraph_dqueue_int_destroy(&q);
  940|  2.00k|    igraph_vector_int_destroy(&next_nei);
  941|  2.00k|    IGRAPH_FINALLY_CLEAN(6);
  942|       |
  943|  2.00k|    return IGRAPH_SUCCESS;
  944|       |
  945|  2.00k|}

igraph_create:
   54|  20.2k|                             igraph_int_t n, igraph_bool_t directed) {
   55|  20.2k|    igraph_bool_t has_edges = igraph_vector_int_size(edges) > 0;
   56|  20.2k|    igraph_int_t max;
   57|       |
   58|  20.2k|    if (igraph_vector_int_size(edges) % 2 != 0) {
  ------------------
  |  Branch (58:9): [True: 0, False: 20.2k]
  ------------------
   59|      0|        IGRAPH_ERROR("Invalid (odd) edges vector.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   60|      0|    }
   61|  20.2k|    if (!igraph_vector_int_isininterval(edges, 0, IGRAPH_VCOUNT_MAX-1)) {
  ------------------
  |  |  102|  20.2k|#define IGRAPH_VCOUNT_MAX (IGRAPH_INTEGER_MAX-1)
  |  |  ------------------
  |  |  |  |   74|  20.2k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  |  |  ------------------
  ------------------
  |  Branch (61:9): [True: 0, False: 20.2k]
  ------------------
   62|      0|        IGRAPH_ERROR("Invalid (negative or too large) vertex ID.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   63|      0|    }
   64|       |
   65|       |    /* The + 1 here cannot overflow as above we have already
   66|       |     * checked that vertex IDs are within range. */
   67|  20.2k|    max = has_edges ? igraph_vector_int_max(edges) + 1 : 0;
  ------------------
  |  Branch (67:11): [True: 18.2k, False: 1.95k]
  ------------------
   68|       |
   69|  20.2k|    IGRAPH_CHECK(igraph_empty(graph, n, directed));
  ------------------
  |  |  656|  20.2k|    do { \
  |  |  657|  20.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  20.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  20.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  20.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 20.2k]
  |  |  ------------------
  ------------------
   70|  20.2k|    IGRAPH_FINALLY(igraph_destroy, graph);
  ------------------
  |  |  603|  20.2k|    do { \
  |  |  604|  20.2k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  20.2k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  20.2k|         * incorrect destructor function with the pointer */ \
  |  |  607|  20.2k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 20.2k]
  |  |  ------------------
  |  |  608|  20.2k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  20.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 20.2k]
  |  |  ------------------
  ------------------
   71|  20.2k|    if (has_edges) {
  ------------------
  |  Branch (71:9): [True: 18.2k, False: 1.95k]
  ------------------
   72|  18.2k|        n = igraph_vcount(graph);
   73|  18.2k|        if (n < max) {
  ------------------
  |  Branch (73:13): [True: 1.62k, False: 16.6k]
  ------------------
   74|  1.62k|            IGRAPH_CHECK(igraph_add_vertices(graph, (max - n), 0));
  ------------------
  |  |  656|  1.62k|    do { \
  |  |  657|  1.62k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.62k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.62k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.62k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.62k]
  |  |  ------------------
  ------------------
   75|  1.62k|        }
   76|  18.2k|        IGRAPH_CHECK(igraph_add_edges(graph, edges, 0));
  ------------------
  |  |  656|  18.2k|    do { \
  |  |  657|  18.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  18.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  18.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 18.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  18.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 18.2k]
  |  |  ------------------
  ------------------
   77|  18.2k|    }
   78|       |
   79|  20.2k|    IGRAPH_FINALLY_CLEAN(1);
   80|  20.2k|    return IGRAPH_SUCCESS;
   81|  20.2k|}

igraph_bitset_init:
  193|  17.6k|igraph_error_t igraph_bitset_init(igraph_bitset_t *bitset, igraph_int_t size) {
  194|  17.6k|    igraph_int_t alloc_size = IGRAPH_BIT_NSLOTS(size);
  ------------------
  |  |  161|  17.6k|#define IGRAPH_BIT_NSLOTS(nbits) ((nbits + IGRAPH_INTEGER_SIZE - (igraph_int_t)(1)) / IGRAPH_INTEGER_SIZE)
  |  |  ------------------
  |  |  |  |   32|  17.6k|#define IGRAPH_INTEGER_SIZE 64
  |  |  ------------------
  |  |               #define IGRAPH_BIT_NSLOTS(nbits) ((nbits + IGRAPH_INTEGER_SIZE - (igraph_int_t)(1)) / IGRAPH_INTEGER_SIZE)
  |  |  ------------------
  |  |  |  |   32|  17.6k|#define IGRAPH_INTEGER_SIZE 64
  |  |  ------------------
  ------------------
  195|  17.6k|    bitset->stor_begin = IGRAPH_CALLOC(alloc_size, igraph_uint_t);
  ------------------
  |  |   33|  17.6k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  35.3k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 17.6k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 17.6k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 17.5k, False: 105]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  196|  17.6k|    IGRAPH_CHECK_OOM(bitset->stor_begin, "Cannot initialize bitset.");
  ------------------
  |  |  709|  17.6k|    do { \
  |  |  710|  17.6k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  17.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 17.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  17.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 17.6k]
  |  |  ------------------
  ------------------
  197|  17.6k|    bitset->size = size;
  198|  17.6k|    bitset->stor_end = bitset->stor_begin + alloc_size;
  199|  17.6k|    return IGRAPH_SUCCESS;
  200|  17.6k|}
igraph_bitset_destroy:
  218|  17.6k|void igraph_bitset_destroy(igraph_bitset_t *bitset) {
  219|  17.6k|    IGRAPH_ASSERT(bitset != NULL);
  ------------------
  |  |  924|  17.6k|    do { \
  |  |  925|  17.6k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  17.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 17.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  17.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 17.6k]
  |  |  ------------------
  ------------------
  220|  17.6k|    IGRAPH_FREE(bitset->stor_begin);
  ------------------
  |  |   36|  17.6k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  221|  17.6k|    bitset->size = 0;
  222|  17.6k|}

igraph_dqueue_int_init:
   75|  35.9k|igraph_error_t FUNCTION(igraph_dqueue, init)(TYPE(igraph_dqueue)* q, igraph_int_t capacity) {
   76|  35.9k|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  35.9k|    do { \
  |  |  925|  35.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  35.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 35.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  35.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 35.9k]
  |  |  ------------------
  ------------------
   77|  35.9k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  35.9k|    do { \
  |  |  925|  35.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  35.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 35.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  35.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 35.9k]
  |  |  ------------------
  ------------------
   78|       |
   79|  35.9k|    if (capacity == 0) capacity = 1;
  ------------------
  |  Branch (79:9): [True: 6.20k, False: 29.7k]
  ------------------
   80|       |
   81|  35.9k|    q->stor_begin = IGRAPH_CALLOC(capacity, BASE);
  ------------------
  |  |   33|  35.9k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  71.8k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 35.9k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 35.9k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 35.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   82|  35.9k|    IGRAPH_CHECK_OOM(q->stor_begin, "Cannot initialize dqueue.");
  ------------------
  |  |  709|  35.9k|    do { \
  |  |  710|  35.9k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  35.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 35.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  35.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 35.9k]
  |  |  ------------------
  ------------------
   83|  35.9k|    q->stor_end = q->stor_begin + capacity;
   84|  35.9k|    q->begin = q->stor_begin;
   85|  35.9k|    q->end = NULL;
   86|       |
   87|  35.9k|    return IGRAPH_SUCCESS;
   88|  35.9k|}
igraph_dqueue_int_destroy:
  100|  35.9k|void FUNCTION(igraph_dqueue, destroy)(TYPE(igraph_dqueue)* q) {
  101|  35.9k|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  35.9k|    do { \
  |  |  925|  35.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  35.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 35.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  35.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 35.9k]
  |  |  ------------------
  ------------------
  102|  35.9k|    IGRAPH_FREE(q->stor_begin); /* sets to NULL */
  ------------------
  |  |   36|  35.9k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  103|  35.9k|}
igraph_dqueue_int_empty:
  117|  5.84M|igraph_bool_t FUNCTION(igraph_dqueue, empty)(const TYPE(igraph_dqueue)* q) {
  118|  5.84M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  5.84M|    do { \
  |  |  925|  5.84M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  5.84M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.84M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  5.84M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 5.84M]
  |  |  ------------------
  ------------------
  119|  5.84M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  5.84M|    do { \
  |  |  925|  5.84M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  5.84M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.84M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  5.84M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 5.84M]
  |  |  ------------------
  ------------------
  120|  5.84M|    return q->end == NULL;
  121|  5.84M|}
igraph_dqueue_int_head:
  196|  32.7k|BASE FUNCTION(igraph_dqueue, head)(const TYPE(igraph_dqueue)* q) {
  197|  32.7k|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  32.7k|    do { \
  |  |  925|  32.7k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  32.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 32.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  32.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 32.7k]
  |  |  ------------------
  ------------------
  198|  32.7k|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  32.7k|    do { \
  |  |  925|  32.7k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  32.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 32.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  32.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 32.7k]
  |  |  ------------------
  ------------------
  199|  32.7k|    IGRAPH_ASSERT(q->stor_end != NULL); /* queue is not empty */
  ------------------
  |  |  924|  32.7k|    do { \
  |  |  925|  32.7k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  32.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 32.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  32.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 32.7k]
  |  |  ------------------
  ------------------
  200|  32.7k|    return *(q->begin);
  201|  32.7k|}
igraph_dqueue_int_back:
  216|  1.48M|BASE FUNCTION(igraph_dqueue, back)(const TYPE(igraph_dqueue)* q) {
  217|  1.48M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  1.48M|    do { \
  |  |  925|  1.48M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.48M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.48M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.48M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.48M]
  |  |  ------------------
  ------------------
  218|  1.48M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  1.48M|    do { \
  |  |  925|  1.48M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.48M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.48M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.48M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.48M]
  |  |  ------------------
  ------------------
  219|  1.48M|    IGRAPH_ASSERT(q->stor_end != NULL); /* queue is not empty */
  ------------------
  |  |  924|  1.48M|    do { \
  |  |  925|  1.48M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.48M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.48M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.48M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.48M]
  |  |  ------------------
  ------------------
  220|  1.48M|    if (q->end == q->stor_begin) {
  ------------------
  |  Branch (220:9): [True: 677, False: 1.48M]
  ------------------
  221|    677|        return *(q->stor_end - 1);
  222|    677|    }
  223|  1.48M|    return *(q->end - 1);
  224|  1.48M|}
igraph_dqueue_int_pop:
  240|  1.96M|BASE FUNCTION(igraph_dqueue, pop)(TYPE(igraph_dqueue)* q) {
  241|  1.96M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  1.96M|    do { \
  |  |  925|  1.96M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.96M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.96M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.96M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.96M]
  |  |  ------------------
  ------------------
  242|  1.96M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  1.96M|    do { \
  |  |  925|  1.96M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.96M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.96M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.96M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.96M]
  |  |  ------------------
  ------------------
  243|  1.96M|    IGRAPH_ASSERT(q->stor_end != NULL); /* queue is not empty */
  ------------------
  |  |  924|  1.96M|    do { \
  |  |  925|  1.96M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.96M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.96M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.96M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.96M]
  |  |  ------------------
  ------------------
  244|  1.96M|    BASE tmp = *(q->begin);
  ------------------
  |  |   69|  1.96M|    #define BASE igraph_int_t
  ------------------
  245|  1.96M|    (q->begin)++;
  246|  1.96M|    if (q->begin == q->stor_end) {
  ------------------
  |  Branch (246:9): [True: 43.6k, False: 1.92M]
  ------------------
  247|  43.6k|        q->begin = q->stor_begin;
  248|  43.6k|    }
  249|  1.96M|    if (q->begin == q->end) {
  ------------------
  |  Branch (249:9): [True: 842k, False: 1.12M]
  ------------------
  250|   842k|        q->end = NULL;
  251|   842k|    }
  252|       |
  253|  1.96M|    return tmp;
  254|  1.96M|}
igraph_dqueue_int_pop_back:
  270|  1.33M|BASE FUNCTION(igraph_dqueue, pop_back)(TYPE(igraph_dqueue)* q) {
  271|  1.33M|    BASE tmp;
  ------------------
  |  |   69|  1.33M|    #define BASE igraph_int_t
  ------------------
  272|  1.33M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  1.33M|    do { \
  |  |  925|  1.33M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.33M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.33M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.33M]
  |  |  ------------------
  ------------------
  273|  1.33M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  1.33M|    do { \
  |  |  925|  1.33M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.33M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.33M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.33M]
  |  |  ------------------
  ------------------
  274|  1.33M|    IGRAPH_ASSERT(q->stor_end != NULL); /* queue is not empty */
  ------------------
  |  |  924|  1.33M|    do { \
  |  |  925|  1.33M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.33M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.33M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.33M]
  |  |  ------------------
  ------------------
  275|  1.33M|    if (q->end != q->stor_begin) {
  ------------------
  |  Branch (275:9): [True: 1.33M, False: 102]
  ------------------
  276|  1.33M|        tmp = *((q->end) - 1);
  277|  1.33M|        q->end = (q->end) - 1;
  278|  1.33M|    } else {
  279|    102|        tmp = *((q->stor_end) - 1);
  280|    102|        q->end = (q->stor_end) - 1;
  281|    102|    }
  282|  1.33M|    if (q->begin == q->end) {
  ------------------
  |  Branch (282:9): [True: 1.24M, False: 90.3k]
  ------------------
  283|  1.24M|        q->end = NULL;
  284|  1.24M|    }
  285|       |
  286|  1.33M|    return tmp;
  287|  1.33M|}
igraph_dqueue_int_push:
  307|  3.29M|igraph_error_t FUNCTION(igraph_dqueue, push)(TYPE(igraph_dqueue)* q, BASE elem) {
  308|  3.29M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  3.29M|    do { \
  |  |  925|  3.29M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.29M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.29M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.29M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.29M]
  |  |  ------------------
  ------------------
  309|  3.29M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  3.29M|    do { \
  |  |  925|  3.29M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.29M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.29M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.29M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.29M]
  |  |  ------------------
  ------------------
  310|  3.29M|    if (q->begin != q->end) {
  ------------------
  |  Branch (310:9): [True: 3.27M, False: 18.8k]
  ------------------
  311|       |        /* not full */
  312|  3.27M|        if (q->end == NULL) {
  ------------------
  |  Branch (312:13): [True: 2.08M, False: 1.19M]
  ------------------
  313|  2.08M|            q->end = q->begin;
  314|  2.08M|        }
  315|  3.27M|        *(q->end) = elem;
  316|  3.27M|        (q->end)++;
  317|  3.27M|        if (q->end == q->stor_end) {
  ------------------
  |  Branch (317:13): [True: 58.9k, False: 3.21M]
  ------------------
  318|  58.9k|            q->end = q->stor_begin;
  319|  58.9k|        }
  320|  3.27M|    } else {
  321|       |        /* full, allocate more storage */
  322|       |
  323|  18.8k|        BASE *bigger = NULL, *old = q->stor_begin;
  ------------------
  |  |   69|  18.8k|    #define BASE igraph_int_t
  ------------------
  324|  18.8k|        igraph_int_t old_size = q->stor_end - q->stor_begin;
  325|  18.8k|        igraph_int_t new_capacity = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|  18.8k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_capacity = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|  18.8k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (325:37): [True: 18.8k, False: 0]
  ------------------
  326|       |
  327|  18.8k|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   74|  18.8k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (327:13): [True: 0, False: 18.8k]
  ------------------
  328|      0|            IGRAPH_ERROR("Cannot push to dqueue, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  329|      0|        }
  330|  18.8k|        if (new_capacity == 0) {
  ------------------
  |  Branch (330:13): [True: 0, False: 18.8k]
  ------------------
  331|      0|            new_capacity = 1;
  332|      0|        }
  333|       |
  334|  18.8k|        bigger = IGRAPH_CALLOC(new_capacity, BASE);
  ------------------
  |  |   33|  18.8k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  37.6k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 18.8k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 18.8k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 18.8k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  335|  18.8k|        IGRAPH_CHECK_OOM(bigger, "Cannot push to dqueue.");
  ------------------
  |  |  709|  18.8k|    do { \
  |  |  710|  18.8k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  18.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 18.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  18.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 18.8k]
  |  |  ------------------
  ------------------
  336|       |
  337|  18.8k|        if (q->stor_end - q->begin > 0) {
  ------------------
  |  Branch (337:13): [True: 18.8k, False: 0]
  ------------------
  338|  18.8k|            memcpy(bigger, q->begin,
  339|  18.8k|                   (size_t)(q->stor_end - q->begin) * sizeof(BASE));
  340|  18.8k|        }
  341|  18.8k|        if (q->end - q->stor_begin > 0) {
  ------------------
  |  Branch (341:13): [True: 768, False: 18.0k]
  ------------------
  342|    768|            memcpy(bigger + (q->stor_end - q->begin), q->stor_begin,
  343|    768|                   (size_t)(q->end - q->stor_begin) * sizeof(BASE));
  344|    768|        }
  345|       |
  346|  18.8k|        q->end        = bigger + old_size;
  347|  18.8k|        q->stor_end   = bigger + new_capacity;
  348|  18.8k|        q->stor_begin = bigger;
  349|  18.8k|        q->begin      = bigger;
  350|       |
  351|  18.8k|        *(q->end) = elem;
  352|  18.8k|        (q->end)++;
  353|  18.8k|        if (q->end == q->stor_end) {
  ------------------
  |  Branch (353:13): [True: 3.63k, False: 15.1k]
  ------------------
  354|  3.63k|            q->end = q->stor_begin;
  355|  3.63k|        }
  356|       |
  357|  18.8k|        IGRAPH_FREE(old);
  ------------------
  |  |   36|  18.8k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  358|  18.8k|    }
  359|       |
  360|  3.29M|    return IGRAPH_SUCCESS;
  361|  3.29M|}

igraph_error:
  210|  4.82k|                            igraph_error_t igraph_errno) {
  211|       |
  212|  4.82k|    if (igraph_i_error_handler) {
  ------------------
  |  Branch (212:9): [True: 4.82k, False: 0]
  ------------------
  213|  4.82k|        igraph_i_error_handler(reason, file, line, igraph_errno);
  214|  4.82k|#ifndef USING_R
  215|  4.82k|    }  else {
  216|      0|        igraph_error_handler_abort(reason, file, line, igraph_errno);
  217|      0|#endif
  218|      0|    }
  219|  4.82k|    return igraph_errno;
  220|  4.82k|}
igraph_errorf:
  240|  1.31k|                             igraph_error_t igraph_errno, ...) {
  241|  1.31k|    va_list ap;
  242|  1.31k|    va_start(ap, igraph_errno);
  243|  1.31k|    vsnprintf(igraph_i_errormsg_buffer,
  244|  1.31k|              sizeof(igraph_i_errormsg_buffer) / sizeof(char), reason, ap);
  245|       |    va_end(ap);
  246|  1.31k|    return igraph_error(igraph_i_errormsg_buffer, file, line, igraph_errno);
  247|  1.31k|}
igraph_error_handler_ignore:
  266|  4.82k|                                 int line, igraph_error_t igraph_errno) {
  267|  4.82k|    IGRAPH_UNUSED(reason);
  ------------------
  |  |   30|  4.82k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  268|  4.82k|    IGRAPH_UNUSED(file);
  ------------------
  |  |   30|  4.82k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  269|  4.82k|    IGRAPH_UNUSED(line);
  ------------------
  |  |   30|  4.82k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  270|  4.82k|    IGRAPH_UNUSED(igraph_errno);
  ------------------
  |  |   30|  4.82k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  271|       |
  272|  4.82k|    IGRAPH_FINALLY_FREE();
  273|  4.82k|}
igraph_set_error_handler:
  298|  6.13k|igraph_error_handler_t *igraph_set_error_handler(igraph_error_handler_t *new_handler) {
  299|  6.13k|    igraph_error_handler_t *previous_handler = igraph_i_error_handler;
  300|  6.13k|    igraph_i_error_handler = new_handler;
  301|  6.13k|    return previous_handler;
  302|  6.13k|}
IGRAPH_FINALLY_REAL:
  320|   818k|void IGRAPH_FINALLY_REAL(void (*func)(void*), void* ptr) {
  321|   818k|    int no = igraph_i_finally_stack_size;
  322|   818k|    if (no < 0) {
  ------------------
  |  Branch (322:9): [True: 0, False: 818k]
  ------------------
  323|       |        /* Reset finally stack in case fatal error handler does a longjmp instead of terminating the process: */
  324|      0|        igraph_i_reset_finally_stack();
  325|      0|        IGRAPH_FATALF("Corrupt finally stack: it contains %d elements.", no);
  ------------------
  |  |  875|      0|    do { \
  |  |  876|      0|        igraph_fatalf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  877|      0|                      __VA_ARGS__); \
  |  |  878|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (878:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  326|      0|    }
  327|   818k|    if (no >= (int) (sizeof(igraph_i_finally_stack) / sizeof(igraph_i_finally_stack[0]))) {
  ------------------
  |  Branch (327:9): [True: 0, False: 818k]
  ------------------
  328|       |        /* Reset finally stack in case fatal error handler does a longjmp instead of terminating the process: */
  329|      0|        igraph_i_reset_finally_stack();
  330|      0|        IGRAPH_FATALF("Finally stack too large: it contains %d elements.", no);
  ------------------
  |  |  875|      0|    do { \
  |  |  876|      0|        igraph_fatalf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  877|      0|                      __VA_ARGS__); \
  |  |  878|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (878:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  331|      0|    }
  332|   818k|    igraph_i_finally_stack[no].ptr = ptr;
  333|   818k|    igraph_i_finally_stack[no].func = func;
  334|   818k|    igraph_i_finally_stack[no].level = igraph_i_finally_stack_level;
  335|   818k|    igraph_i_finally_stack_size++;
  336|   818k|}
IGRAPH_FINALLY_CLEAN:
  338|   363k|void IGRAPH_FINALLY_CLEAN(int minus) {
  339|   363k|    igraph_i_finally_stack_size -= minus;
  340|   363k|    if (igraph_i_finally_stack_size < 0) {
  ------------------
  |  Branch (340:9): [True: 0, False: 363k]
  ------------------
  341|      0|        int left = igraph_i_finally_stack_size + minus;
  342|       |        /* Reset finally stack in case fatal error handler does a longjmp instead of terminating the process: */
  343|      0|        igraph_i_reset_finally_stack();
  344|      0|        IGRAPH_FATALF("Corrupt finally stack: trying to pop %d element(s) when only %d left.", minus, left);
  ------------------
  |  |  875|      0|    do { \
  |  |  876|      0|        igraph_fatalf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  877|      0|                      __VA_ARGS__); \
  |  |  878|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (878:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  345|      0|    }
  346|   363k|}
IGRAPH_FINALLY_FREE:
  348|  4.82k|void IGRAPH_FINALLY_FREE(void) {
  349|  7.89k|    for (; igraph_i_finally_stack_size > 0; igraph_i_finally_stack_size--) {
  ------------------
  |  Branch (349:12): [True: 3.06k, False: 4.82k]
  ------------------
  350|  3.06k|        int p = igraph_i_finally_stack_size - 1;
  351|       |        /* Call destructors only up to the current level */
  352|  3.06k|        if (igraph_i_finally_stack[p].level < igraph_i_finally_stack_level) {
  ------------------
  |  Branch (352:13): [True: 0, False: 3.06k]
  ------------------
  353|      0|            break;
  354|      0|        }
  355|  3.06k|        igraph_i_finally_stack[p].func(igraph_i_finally_stack[p].ptr);
  356|  3.06k|    }
  357|  4.82k|}
IGRAPH_FINALLY_STACK_SIZE:
  359|  2.00k|int IGRAPH_FINALLY_STACK_SIZE(void) {
  360|  2.00k|    return igraph_i_finally_stack_size;
  361|  2.00k|}
IGRAPH_FINALLY_ENTER:
  377|  22.4k|void IGRAPH_FINALLY_ENTER(void) {
  378|  22.4k|    int no = igraph_i_finally_stack_size;
  379|       |    /* Level indices must always be in increasing order in the finally stack */
  380|  22.4k|    if (no > 0 && igraph_i_finally_stack[no-1].level > igraph_i_finally_stack_level) {
  ------------------
  |  Branch (380:9): [True: 22.4k, False: 0]
  |  Branch (380:19): [True: 0, False: 22.4k]
  ------------------
  381|       |        /* Reset finally stack in case fatal error handler does a longjmp instead of terminating the process: */
  382|      0|        igraph_i_reset_finally_stack();
  383|      0|        IGRAPH_FATAL("Corrupt finally stack: cannot create new finally stack level before last one is freed.");
  ------------------
  |  |  895|      0|    do { \
  |  |  896|      0|        igraph_fatal(reason, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  897|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (897:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  384|      0|    }
  385|  22.4k|    igraph_i_finally_stack_level++;
  386|  22.4k|}
IGRAPH_FINALLY_EXIT:
  399|  22.4k|void IGRAPH_FINALLY_EXIT(void) {
  400|  22.4k|    igraph_i_finally_stack_level--;
  401|  22.4k|    if (igraph_i_finally_stack_level < 0) {
  ------------------
  |  Branch (401:9): [True: 0, False: 22.4k]
  ------------------
  402|       |        /* Reset finally stack in case fatal error handler does a longjmp instead of terminating the process: */
  403|      0|        igraph_i_reset_finally_stack();
  404|      0|        IGRAPH_FATAL("Corrupt finally stack: trying to exit outermost finally stack level.");
  ------------------
  |  |  895|      0|    do { \
  |  |  896|      0|        igraph_fatal(reason, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  897|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (897:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  405|      0|    }
  406|  22.4k|}
igraph_warning_handler_ignore:
  424|  1.82k|void igraph_warning_handler_ignore(const char *reason, const char *file, int line) {
  425|  1.82k|    IGRAPH_UNUSED(reason);
  ------------------
  |  |   30|  1.82k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  426|  1.82k|    IGRAPH_UNUSED(file);
  ------------------
  |  |   30|  1.82k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  427|  1.82k|    IGRAPH_UNUSED(line);
  ------------------
  |  |   30|  1.82k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  428|  1.82k|}
igraph_warning:
  463|  1.82k|void igraph_warning(const char *reason, const char *file, int line) {
  464|       |
  465|  1.82k|    if (igraph_i_warning_handler) {
  ------------------
  |  Branch (465:9): [True: 1.82k, False: 0]
  ------------------
  466|  1.82k|        igraph_i_warning_handler(reason, file, line);
  467|  1.82k|#ifndef USING_R
  468|  1.82k|    }  else {
  469|      0|        igraph_warning_handler_print(reason, file, line);
  470|      0|#endif
  471|      0|    }
  472|  1.82k|}
igraph_set_warning_handler:
  514|  2.01k|igraph_warning_handler_t *igraph_set_warning_handler(igraph_warning_handler_t *new_handler) {
  515|  2.01k|    igraph_warning_handler_t *previous_handler = igraph_i_warning_handler;
  516|  2.01k|    igraph_i_warning_handler = new_handler;
  517|  2.01k|    return previous_handler;
  518|  2.01k|}

igraph_matrix_init:
   64|  2.00k|        TYPE(igraph_matrix) *m, igraph_int_t nrow, igraph_int_t ncol) {
   65|  2.00k|    igraph_int_t size;
   66|  2.00k|    IGRAPH_ASSERT(nrow >= 0 && ncol >= 0);
  ------------------
  |  |  924|  2.00k|    do { \
  |  |  925|  2.00k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  Branch (612:52): [True: 2.00k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 2.00k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   67|  2.00k|    IGRAPH_SAFE_MULT(nrow, ncol, &size);
  ------------------
  |  |   57|  2.00k|    do { \
  |  |   58|  2.00k|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   59|  2.00k|        igraph_int_t _safe_prod; \
  |  |   60|  2.00k|        if (__builtin_mul_overflow(_safe_a, _safe_b, &_safe_prod)) { \
  |  |  ------------------
  |  |  |  Branch (60:13): [True: 0, False: 2.00k]
  |  |  ------------------
  |  |   61|      0|            IGRAPH_ERRORF("Overflow when multiplying %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  464|      0|    do { \
  |  |  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  467|      0|        return igraph_errno; \
  |  |  |  |  468|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|      0|        } \
  |  |   63|  2.00k|        *(res) = _safe_prod; \
  |  |   64|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (64:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   68|  2.00k|    IGRAPH_CHECK(FUNCTION(igraph_vector, init)(&m->data, size));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   69|  2.00k|    m->nrow = nrow;
   70|  2.00k|    m->ncol = ncol;
   71|  2.00k|    return IGRAPH_SUCCESS;
   72|  2.00k|}
igraph_matrix_destroy:
  176|  2.00k|void FUNCTION(igraph_matrix, destroy)(TYPE(igraph_matrix) *m) {
  177|  2.00k|    FUNCTION(igraph_vector, destroy)(&m->data);
  ------------------
  |  |  173|  2.00k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  2.00k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  2.00k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  178|  2.00k|}
igraph_matrix_resize:
  229|  2.00k|igraph_error_t FUNCTION(igraph_matrix, resize)(TYPE(igraph_matrix) *m, igraph_int_t nrow, igraph_int_t ncol) {
  230|  2.00k|    igraph_int_t size;
  231|  2.00k|    IGRAPH_ASSERT(nrow >= 0 && ncol >= 0);
  ------------------
  |  |  924|  2.00k|    do { \
  |  |  925|  2.00k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  Branch (612:52): [True: 2.00k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 2.00k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  232|  2.00k|    IGRAPH_SAFE_MULT(nrow, ncol, &size);
  ------------------
  |  |   57|  2.00k|    do { \
  |  |   58|  2.00k|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   59|  2.00k|        igraph_int_t _safe_prod; \
  |  |   60|  2.00k|        if (__builtin_mul_overflow(_safe_a, _safe_b, &_safe_prod)) { \
  |  |  ------------------
  |  |  |  Branch (60:13): [True: 0, False: 2.00k]
  |  |  ------------------
  |  |   61|      0|            IGRAPH_ERRORF("Overflow when multiplying %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  464|      0|    do { \
  |  |  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  467|      0|        return igraph_errno; \
  |  |  |  |  468|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|      0|        } \
  |  |   63|  2.00k|        *(res) = _safe_prod; \
  |  |   64|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (64:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  233|  2.00k|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(&m->data, size));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  234|  2.00k|    m->nrow = nrow;
  235|  2.00k|    m->ncol = ncol;
  236|  2.00k|    return IGRAPH_SUCCESS;
  237|  2.00k|}
igraph_matrix_fill:
  972|  2.00k|void FUNCTION(igraph_matrix, fill)(TYPE(igraph_matrix) *m, BASE e) {
  973|  2.00k|    FUNCTION(igraph_vector, fill)(&m->data, e);
  ------------------
  |  |  173|  2.00k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  2.00k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  2.00k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  974|  2.00k|}

igraph_free:
   62|  14.6k|void igraph_free(void *ptr) {
   63|       |    IGRAPH_FREE(ptr);
  ------------------
  |  |   36|  14.6k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
   64|  14.6k|}

igraph_progress:
   53|  10.3k|igraph_error_t igraph_progress(const char *message, igraph_real_t percent, void *data) {
   54|  10.3k|    if (igraph_i_progress_handler) {
  ------------------
  |  Branch (54:9): [True: 0, False: 10.3k]
  ------------------
   55|      0|        return igraph_i_progress_handler(message, percent, data);
   56|      0|    }
   57|  10.3k|    return IGRAPH_SUCCESS;
   58|  10.3k|}

igraph_stack_int_init:
   44|  35.8k|igraph_error_t FUNCTION(igraph_stack, init)(TYPE(igraph_stack)* s, igraph_int_t capacity) {
   45|  35.8k|    igraph_int_t alloc_size;
   46|  35.8k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  35.8k|    do { \
  |  |  925|  35.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  35.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 35.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  35.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 35.8k]
  |  |  ------------------
  ------------------
   47|  35.8k|    alloc_size = capacity > 0 ? capacity : 1;
  ------------------
  |  Branch (47:18): [True: 35.8k, False: 0]
  ------------------
   48|  35.8k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  924|  35.8k|    do { \
  |  |  925|  35.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  35.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 35.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  35.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 35.8k]
  |  |  ------------------
  ------------------
   49|  35.8k|    s->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  35.8k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  71.6k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 35.8k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 35.8k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 35.8k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   50|  35.8k|    if (s->stor_begin == NULL) {
  ------------------
  |  Branch (50:9): [True: 0, False: 35.8k]
  ------------------
   51|      0|        IGRAPH_ERROR("Cannot initialize stack.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   52|      0|    }
   53|  35.8k|    s->stor_end = s->stor_begin + alloc_size;
   54|  35.8k|    s->end = s->stor_begin;
   55|       |
   56|  35.8k|    return IGRAPH_SUCCESS;
   57|  35.8k|}
igraph_stack_int_destroy:
   72|  35.8k|void FUNCTION(igraph_stack, destroy)    (TYPE(igraph_stack)* s) {
   73|  35.8k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  924|  35.8k|    do { \
  |  |  925|  35.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  35.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 35.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  35.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 35.8k]
  |  |  ------------------
  ------------------
   74|  35.8k|    if (s->stor_begin != NULL) {
  ------------------
  |  Branch (74:9): [True: 35.8k, False: 0]
  ------------------
   75|  35.8k|        IGRAPH_FREE(s->stor_begin);
  ------------------
  |  |   36|  35.8k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
   76|       |        s->stor_begin = NULL;
   77|  35.8k|    }
   78|  35.8k|}
igraph_stack_int_capacity:
   98|  3.12k|igraph_int_t FUNCTION(igraph_stack, capacity)(const TYPE(igraph_stack) *s) {
   99|  3.12k|    return s->stor_end - s->stor_begin;
  100|  3.12k|}
igraph_stack_int_reserve:
  118|  3.12k|igraph_error_t FUNCTION(igraph_stack, reserve)(TYPE(igraph_stack)* s, igraph_int_t capacity) {
  119|  3.12k|    igraph_int_t current_capacity;
  120|  3.12k|    BASE *tmp;
  ------------------
  |  |   69|  3.12k|    #define BASE igraph_int_t
  ------------------
  121|       |
  122|  3.12k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  924|  3.12k|    do { \
  |  |  925|  3.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.12k]
  |  |  ------------------
  ------------------
  123|  3.12k|    IGRAPH_ASSERT(s->stor_begin != NULL);
  ------------------
  |  |  924|  3.12k|    do { \
  |  |  925|  3.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.12k]
  |  |  ------------------
  ------------------
  124|  3.12k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  3.12k|    do { \
  |  |  925|  3.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.12k]
  |  |  ------------------
  ------------------
  125|       |
  126|  3.12k|    current_capacity = FUNCTION(igraph_stack, capacity)(s);
  ------------------
  |  |  181|  3.12k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  3.12k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  3.12k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  127|       |
  128|  3.12k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (128:9): [True: 0, False: 3.12k]
  ------------------
  129|      0|        return IGRAPH_SUCCESS;
  130|      0|    }
  131|       |
  132|  3.12k|    tmp = IGRAPH_REALLOC(s->stor_begin, capacity, BASE);
  ------------------
  |  |   35|  3.12k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|  6.24k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 3.12k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 3.12k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 3.12k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  133|  3.12k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for stack.");
  ------------------
  |  |  709|  3.12k|    do { \
  |  |  710|  3.12k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  3.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  3.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 3.12k]
  |  |  ------------------
  ------------------
  134|       |
  135|  3.12k|    s->end = tmp + (s->end - s->stor_begin);
  136|  3.12k|    s->stor_begin = tmp;
  137|  3.12k|    s->stor_end = s->stor_begin + capacity;
  138|       |
  139|  3.12k|    return IGRAPH_SUCCESS;
  140|  3.12k|}
igraph_stack_int_empty:
  154|  1.59M|igraph_bool_t FUNCTION(igraph_stack, empty)(TYPE(igraph_stack)* s) {
  155|  1.59M|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  924|  1.59M|    do { \
  |  |  925|  1.59M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.59M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.59M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.59M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.59M]
  |  |  ------------------
  ------------------
  156|  1.59M|    IGRAPH_ASSERT(s->stor_begin != NULL);
  ------------------
  |  |  924|  1.59M|    do { \
  |  |  925|  1.59M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.59M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.59M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.59M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.59M]
  |  |  ------------------
  ------------------
  157|  1.59M|    return s->stor_begin == s->end;
  158|  1.59M|}
igraph_stack_int_size:
  171|  3.12k|igraph_int_t FUNCTION(igraph_stack, size)(const TYPE(igraph_stack)* s) {
  172|  3.12k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  924|  3.12k|    do { \
  |  |  925|  3.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.12k]
  |  |  ------------------
  ------------------
  173|  3.12k|    IGRAPH_ASSERT(s->stor_begin != NULL);
  ------------------
  |  |  924|  3.12k|    do { \
  |  |  925|  3.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.12k]
  |  |  ------------------
  ------------------
  174|  3.12k|    return s->end - s->stor_begin;
  175|  3.12k|}
igraph_stack_int_push:
  208|   943k|igraph_error_t FUNCTION(igraph_stack, push)(TYPE(igraph_stack)* s, BASE elem) {
  209|   943k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  924|   943k|    do { \
  |  |  925|   943k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   943k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 943k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   943k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 943k]
  |  |  ------------------
  ------------------
  210|   943k|    IGRAPH_ASSERT(s->stor_begin != NULL);
  ------------------
  |  |  924|   943k|    do { \
  |  |  925|   943k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   943k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 943k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   943k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 943k]
  |  |  ------------------
  ------------------
  211|       |
  212|   943k|    if (s->stor_end == s->end) {
  ------------------
  |  Branch (212:9): [True: 3.12k, False: 940k]
  ------------------
  213|       |        /* full, allocate more storage */
  214|  3.12k|        igraph_int_t old_size = FUNCTION(igraph_stack, size)(s);
  ------------------
  |  |  181|  3.12k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  3.12k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  3.12k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  215|  3.12k|        igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|  3.12k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|  3.12k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (215:33): [True: 3.12k, False: 0]
  ------------------
  216|  3.12k|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   74|  3.12k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (216:13): [True: 0, False: 3.12k]
  ------------------
  217|      0|            IGRAPH_ERROR("Cannot push to stack, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  218|      0|        }
  219|  3.12k|        if (new_size == 0) {
  ------------------
  |  Branch (219:13): [True: 0, False: 3.12k]
  ------------------
  220|      0|            new_size = 1;
  221|      0|        }
  222|  3.12k|        IGRAPH_CHECK(FUNCTION(igraph_stack, reserve)(s, new_size));
  ------------------
  |  |  656|  3.12k|    do { \
  |  |  657|  3.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  3.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  3.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  3.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 3.12k]
  |  |  ------------------
  ------------------
  223|  3.12k|    }
  224|       |
  225|   943k|    *(s->end) = elem;
  226|   943k|    s->end += 1;
  227|       |
  228|   943k|    return IGRAPH_SUCCESS;
  229|   943k|}
igraph_stack_int_pop:
  244|   892k|BASE FUNCTION(igraph_stack, pop)(TYPE(igraph_stack)* s) {
  245|   892k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  924|   892k|    do { \
  |  |  925|   892k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   892k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 892k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   892k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 892k]
  |  |  ------------------
  ------------------
  246|   892k|    IGRAPH_ASSERT(s->stor_begin != NULL);
  ------------------
  |  |  924|   892k|    do { \
  |  |  925|   892k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   892k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 892k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   892k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 892k]
  |  |  ------------------
  ------------------
  247|   892k|    IGRAPH_ASSERT(s->end != NULL);
  ------------------
  |  |  924|   892k|    do { \
  |  |  925|   892k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   892k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 892k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   892k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 892k]
  |  |  ------------------
  ------------------
  248|   892k|    IGRAPH_ASSERT(s->end != s->stor_begin);
  ------------------
  |  |  924|   892k|    do { \
  |  |  925|   892k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   892k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 892k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   892k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 892k]
  |  |  ------------------
  ------------------
  249|       |
  250|   892k|    (s->end)--;
  251|       |
  252|   892k|    return *(s->end);
  253|   892k|}
igraph_stack_int_top:
  268|   410k|BASE FUNCTION(igraph_stack, top)(const TYPE(igraph_stack)* s) {
  269|   410k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  924|   410k|    do { \
  |  |  925|   410k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   410k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 410k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   410k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 410k]
  |  |  ------------------
  ------------------
  270|   410k|    IGRAPH_ASSERT(s->stor_begin != NULL);
  ------------------
  |  |  924|   410k|    do { \
  |  |  925|   410k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   410k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 410k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   410k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 410k]
  |  |  ------------------
  ------------------
  271|   410k|    IGRAPH_ASSERT(s->end != NULL);
  ------------------
  |  |  924|   410k|    do { \
  |  |  925|   410k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   410k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 410k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   410k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 410k]
  |  |  ------------------
  ------------------
  272|   410k|    IGRAPH_ASSERT(s->end != s->stor_begin);
  ------------------
  |  |  924|   410k|    do { \
  |  |  925|   410k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   410k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 410k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   410k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 410k]
  |  |  ------------------
  ------------------
  273|       |
  274|   410k|    return *(s->end - 1);
  275|   410k|}

igraph_vector_int_list_init:
  109|  8.01k|igraph_error_t FUNCTION(init)(TYPE *v, igraph_int_t size) {
  110|  8.01k|    igraph_int_t alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (110:31): [True: 0, False: 8.01k]
  ------------------
  111|  8.01k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  8.01k|    do { \
  |  |  925|  8.01k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  8.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  8.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 8.01k]
  |  |  ------------------
  ------------------
  112|  8.01k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, ITEM_TYPE);
  ------------------
  |  |   33|  8.01k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  16.0k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 8.01k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 8.01k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 8.01k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  113|  8.01k|    if (v->stor_begin == 0) {
  ------------------
  |  Branch (113:9): [True: 0, False: 8.01k]
  ------------------
  114|      0|        IGRAPH_ERROR("Cannot initialize list.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  115|      0|    }
  116|  8.01k|    v->stor_end = v->stor_begin + alloc_size;
  117|  8.01k|    v->end = v->stor_begin + size;
  118|       |
  119|  8.01k|    IGRAPH_CHECK(INTERNAL_FUNCTION(init_slice)(v, v->stor_begin, v->end));
  ------------------
  |  |  656|  8.01k|    do { \
  |  |  657|  8.01k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  8.01k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  8.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  8.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 8.01k]
  |  |  ------------------
  ------------------
  120|       |
  121|  8.01k|    return IGRAPH_SUCCESS;
  122|  8.01k|}
igraph_vector_int_list_destroy:
  176|  8.01k|void FUNCTION(destroy)(TYPE *v) {
  177|  8.01k|    IGRAPH_ASSERT(v != 0);
  ------------------
  |  |  924|  8.01k|    do { \
  |  |  925|  8.01k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  8.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  8.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 8.01k]
  |  |  ------------------
  ------------------
  178|       |
  179|  8.01k|    if (v->stor_begin != 0) {
  ------------------
  |  Branch (179:9): [True: 8.01k, False: 0]
  ------------------
  180|  8.01k|        FUNCTION(clear)(v);
  ------------------
  |  |  139|  8.01k|        #define FUNCTION(c) CONCAT4(igraph_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  8.01k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  8.01k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  181|  8.01k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  8.01k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  182|       |        v->stor_begin = NULL;
  183|  8.01k|    }
  184|  8.01k|}
igraph_vector_int_list_capacity:
  203|  15.0k|igraph_int_t FUNCTION(capacity)(const TYPE *v) {
  204|  15.0k|    return v->stor_end - v->stor_begin;
  205|  15.0k|}
igraph_vector_int_list_reserve:
  233|  15.0k|igraph_error_t FUNCTION(reserve)(TYPE *v, igraph_int_t capacity) {
  234|  15.0k|    igraph_int_t current_capacity;
  235|  15.0k|    ITEM_TYPE *tmp;
  ------------------
  |  |   31|  15.0k|    #define ITEM_TYPE BASE_VECTOR
  |  |  ------------------
  |  |  |  |   70|  15.0k|    #define BASE_VECTOR igraph_vector_int_t
  |  |  ------------------
  ------------------
  236|       |
  237|  15.0k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  15.0k|    do { \
  |  |  925|  15.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  15.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  15.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 15.0k]
  |  |  ------------------
  ------------------
  238|  15.0k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  15.0k|    do { \
  |  |  925|  15.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  15.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  15.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 15.0k]
  |  |  ------------------
  ------------------
  239|  15.0k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  15.0k|    do { \
  |  |  925|  15.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  15.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  15.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 15.0k]
  |  |  ------------------
  ------------------
  240|       |
  241|  15.0k|    current_capacity = FUNCTION(capacity)(v);
  ------------------
  |  |  139|  15.0k|        #define FUNCTION(c) CONCAT4(igraph_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  15.0k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  15.0k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  242|       |
  243|  15.0k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (243:9): [True: 46, False: 14.9k]
  ------------------
  244|     46|        return IGRAPH_SUCCESS;
  245|     46|    }
  246|       |
  247|  14.9k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, ITEM_TYPE);
  ------------------
  |  |   35|  14.9k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|  29.9k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 14.9k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 14.9k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 14.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  248|  14.9k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for list.");
  ------------------
  |  |  709|  14.9k|    do { \
  |  |  710|  14.9k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  14.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 14.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  14.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 14.9k]
  |  |  ------------------
  ------------------
  249|       |
  250|  14.9k|    v->end = tmp + (v->end - v->stor_begin);
  251|  14.9k|    v->stor_begin = tmp;
  252|  14.9k|    v->stor_end = v->stor_begin + capacity;
  253|       |
  254|  14.9k|    return IGRAPH_SUCCESS;
  255|  14.9k|}
igraph_vector_int_list_size:
  287|  15.0k|igraph_int_t FUNCTION(size)(const TYPE *v) {
  288|  15.0k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  15.0k|    do { \
  |  |  925|  15.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  15.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  15.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 15.0k]
  |  |  ------------------
  ------------------
  289|  15.0k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  15.0k|    do { \
  |  |  925|  15.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  15.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  15.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 15.0k]
  |  |  ------------------
  ------------------
  290|  15.0k|    return v->end - v->stor_begin;
  291|  15.0k|}
igraph_vector_int_list_resize:
  324|  4.00k|igraph_error_t FUNCTION(resize)(TYPE *v, igraph_int_t new_size) {
  325|  4.00k|    igraph_int_t old_size;
  326|       |
  327|  4.00k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  4.00k|    do { \
  |  |  925|  4.00k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
  328|  4.00k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  4.00k|    do { \
  |  |  925|  4.00k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
  329|       |
  330|  4.00k|    IGRAPH_CHECK(FUNCTION(reserve)(v, new_size));
  ------------------
  |  |  656|  4.00k|    do { \
  |  |  657|  4.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
  331|       |
  332|  4.00k|    old_size = FUNCTION(size)(v);
  ------------------
  |  |  139|  4.00k|        #define FUNCTION(c) CONCAT4(igraph_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  4.00k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  4.00k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  333|       |
  334|  4.00k|    if (old_size < new_size) {
  ------------------
  |  Branch (334:9): [True: 4.00k, False: 0]
  ------------------
  335|  4.00k|        IGRAPH_CHECK(INTERNAL_FUNCTION(init_slice)(v, v->stor_begin + old_size, v->stor_begin + new_size));
  ------------------
  |  |  656|  4.00k|    do { \
  |  |  657|  4.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
  336|  4.00k|    } else if (old_size > new_size) {
  ------------------
  |  Branch (336:16): [True: 0, False: 0]
  ------------------
  337|      0|        INTERNAL_FUNCTION(destroy_slice)(v, v->stor_begin + new_size, v->stor_begin + old_size);
  ------------------
  |  |  140|      0|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|      0|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  338|      0|    }
  339|       |
  340|  4.00k|    v->end = v->stor_begin + new_size;
  341|       |
  342|  4.00k|    return IGRAPH_SUCCESS;
  343|  4.00k|}
igraph_vector_int_list_clear:
  357|  12.0k|void FUNCTION(clear)(TYPE *v) {
  358|  12.0k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  12.0k|    do { \
  |  |  925|  12.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  12.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  12.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 12.0k]
  |  |  ------------------
  ------------------
  359|  12.0k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  12.0k|    do { \
  |  |  925|  12.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  12.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  12.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 12.0k]
  |  |  ------------------
  ------------------
  360|  12.0k|    INTERNAL_FUNCTION(destroy_slice)(v, v->stor_begin, v->end);
  ------------------
  |  |  140|  12.0k|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  12.0k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  12.0k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  361|  12.0k|    v->end = v->stor_begin;
  362|  12.0k|}
igraph_vector_int_list_get_ptr:
  377|  9.24M|ITEM_TYPE *FUNCTION(get_ptr)(const TYPE *v, igraph_int_t pos) {
  378|  9.24M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  9.24M|    do { \
  |  |  925|  9.24M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  9.24M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.24M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  9.24M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 9.24M]
  |  |  ------------------
  ------------------
  379|  9.24M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  9.24M|    do { \
  |  |  925|  9.24M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  9.24M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.24M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  9.24M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 9.24M]
  |  |  ------------------
  ------------------
  380|  9.24M|    return v->stor_begin + pos;
  381|  9.24M|}
igraph_vector_int_list_push_back_new:
  638|  8.58M|igraph_error_t FUNCTION(push_back_new)(TYPE *v, ITEM_TYPE** e) {
  639|  8.58M|    IGRAPH_CHECK(INTERNAL_FUNCTION(expand_if_full)(v));
  ------------------
  |  |  656|  8.58M|    do { \
  |  |  657|  8.58M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  8.58M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  8.58M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.58M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  8.58M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 8.58M]
  |  |  ------------------
  ------------------
  640|  8.58M|    IGRAPH_CHECK(INTERNAL_FUNCTION(init_item)(v, v->end));
  ------------------
  |  |  656|  8.58M|    do { \
  |  |  657|  8.58M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  8.58M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  8.58M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.58M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  8.58M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 8.58M]
  |  |  ------------------
  ------------------
  641|  8.58M|    if (e) {
  ------------------
  |  Branch (641:9): [True: 8.58M, False: 0]
  ------------------
  642|  8.58M|        *e = v->end;
  643|  8.58M|    }
  644|  8.58M|    v->end += 1;
  645|  8.58M|    return IGRAPH_SUCCESS;
  646|  8.58M|}
vector_list.c:igraph_i_vector_int_list_init_item:
 1048|  9.25M|static igraph_error_t INTERNAL_FUNCTION(init_item)(const TYPE *list, ITEM_TYPE *item) {
 1049|  9.25M|    IGRAPH_UNUSED(list);
  ------------------
  |  |   30|  9.25M|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
 1050|  9.25M|    return ITEM_FUNCTION(init)(item, 0);
  ------------------
  |  |   42|  9.25M|        #define ITEM_FUNCTION(f) CONCAT3(igraph_vector,SHORT,f)
  |  |  ------------------
  |  |  |  |   22|  9.25M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  9.25M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1051|  9.25M|}
vector_list.c:igraph_i_vector_int_list_destroy_item:
 1057|  9.25M|static void INTERNAL_FUNCTION(destroy_item)(ITEM_TYPE *item) {
 1058|  9.25M|    ITEM_FUNCTION(destroy)(item);
  ------------------
  |  |   42|  9.25M|        #define ITEM_FUNCTION(f) CONCAT3(igraph_vector,SHORT,f)
  |  |  ------------------
  |  |  |  |   22|  9.25M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  9.25M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1059|  9.25M|}
vector_list.c:igraph_i_vector_int_list_init_slice:
 1065|  12.0k|static igraph_error_t INTERNAL_FUNCTION(init_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1066|  12.0k|    ITEM_TYPE *current;
  ------------------
  |  |   31|  12.0k|    #define ITEM_TYPE BASE_VECTOR
  |  |  ------------------
  |  |  |  |   70|  12.0k|    #define BASE_VECTOR igraph_vector_int_t
  |  |  ------------------
  ------------------
 1067|  12.0k|    igraph_error_t retval;
 1068|       |
 1069|   677k|    for (current = start; current < end; current++) {
  ------------------
  |  Branch (1069:27): [True: 665k, False: 12.0k]
  ------------------
 1070|   665k|        retval = INTERNAL_FUNCTION(init_item)(list, current);
  ------------------
  |  |  140|   665k|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|   665k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|   665k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1071|   665k|        if (retval) {
  ------------------
  |  Branch (1071:13): [True: 0, False: 665k]
  ------------------
 1072|      0|            INTERNAL_FUNCTION(destroy_slice)(list, start, current);
  ------------------
  |  |  140|      0|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|      0|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1073|      0|            IGRAPH_CHECK(retval);
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1074|      0|        }
 1075|   665k|    }
 1076|       |
 1077|  12.0k|    return IGRAPH_SUCCESS;
 1078|  12.0k|}
vector_list.c:igraph_i_vector_int_list_destroy_slice:
 1080|  12.0k|static void INTERNAL_FUNCTION(destroy_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1081|  12.0k|    IGRAPH_UNUSED(list);
  ------------------
  |  |   30|  12.0k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
 1082|  9.26M|    for (; start < end; start++) {
  ------------------
  |  Branch (1082:12): [True: 9.25M, False: 12.0k]
  ------------------
 1083|  9.25M|        INTERNAL_FUNCTION(destroy_item)(start);
  ------------------
  |  |  140|  9.25M|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  9.25M|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  9.25M|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1084|  9.25M|    }
 1085|  12.0k|}
vector_list.c:igraph_i_vector_int_list_expand_if_full:
 1091|  8.58M|static igraph_error_t INTERNAL_FUNCTION(expand_if_full)(TYPE *v) {
 1092|  8.58M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  8.58M|    do { \
  |  |  925|  8.58M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  8.58M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.58M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  8.58M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 8.58M]
  |  |  ------------------
  ------------------
 1093|  8.58M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  8.58M|    do { \
  |  |  925|  8.58M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  8.58M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.58M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  8.58M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 8.58M]
  |  |  ------------------
  ------------------
 1094|       |
 1095|  8.58M|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (1095:9): [True: 10.9k, False: 8.57M]
  ------------------
 1096|  10.9k|        igraph_int_t old_size = FUNCTION(size)(v);
  ------------------
  |  |  139|  10.9k|        #define FUNCTION(c) CONCAT4(igraph_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  10.9k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  10.9k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1097|  10.9k|        igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|  10.9k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|  10.9k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (1097:33): [True: 10.9k, False: 0]
  ------------------
 1098|  10.9k|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   74|  10.9k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (1098:13): [True: 0, False: 10.9k]
  ------------------
 1099|      0|            IGRAPH_ERROR("Cannot add new item to list, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1100|      0|        }
 1101|  10.9k|        if (new_size == 0) {
  ------------------
  |  Branch (1101:13): [True: 0, False: 10.9k]
  ------------------
 1102|      0|            new_size = 1;
 1103|      0|        }
 1104|  10.9k|        IGRAPH_CHECK(FUNCTION(reserve)(v, new_size));
  ------------------
  |  |  656|  10.9k|    do { \
  |  |  657|  10.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  10.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  10.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 10.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  10.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 10.9k]
  |  |  ------------------
  ------------------
 1105|  10.9k|    }
 1106|       |
 1107|  8.58M|    return IGRAPH_SUCCESS;
 1108|  8.58M|}
igraph_graph_list_init:
  109|  2.00k|igraph_error_t FUNCTION(init)(TYPE *v, igraph_int_t size) {
  110|  2.00k|    igraph_int_t alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (110:31): [True: 0, False: 2.00k]
  ------------------
  111|  2.00k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  2.00k|    do { \
  |  |  925|  2.00k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  112|  2.00k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, ITEM_TYPE);
  ------------------
  |  |   33|  2.00k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.00k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.00k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.00k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.00k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  113|  2.00k|    if (v->stor_begin == 0) {
  ------------------
  |  Branch (113:9): [True: 0, False: 2.00k]
  ------------------
  114|      0|        IGRAPH_ERROR("Cannot initialize list.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  115|      0|    }
  116|  2.00k|    v->stor_end = v->stor_begin + alloc_size;
  117|  2.00k|    v->end = v->stor_begin + size;
  118|       |
  119|  2.00k|    IGRAPH_CHECK(INTERNAL_FUNCTION(init_slice)(v, v->stor_begin, v->end));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  120|       |
  121|  2.00k|    return IGRAPH_SUCCESS;
  122|  2.00k|}
igraph_graph_list_destroy:
  176|  2.00k|void FUNCTION(destroy)(TYPE *v) {
  177|  2.00k|    IGRAPH_ASSERT(v != 0);
  ------------------
  |  |  924|  2.00k|    do { \
  |  |  925|  2.00k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  178|       |
  179|  2.00k|    if (v->stor_begin != 0) {
  ------------------
  |  Branch (179:9): [True: 2.00k, False: 0]
  ------------------
  180|  2.00k|        FUNCTION(clear)(v);
  ------------------
  |  |  160|  2.00k|    #define FUNCTION(c) CONCAT2x(igraph_graph_list,c)
  |  |  ------------------
  |  |  |  |   19|  2.00k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  181|  2.00k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  2.00k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  182|       |        v->stor_begin = NULL;
  183|  2.00k|    }
  184|  2.00k|}
igraph_graph_list_capacity:
  203|     64|igraph_int_t FUNCTION(capacity)(const TYPE *v) {
  204|     64|    return v->stor_end - v->stor_begin;
  205|     64|}
igraph_graph_list_reserve:
  233|     64|igraph_error_t FUNCTION(reserve)(TYPE *v, igraph_int_t capacity) {
  234|     64|    igraph_int_t current_capacity;
  235|     64|    ITEM_TYPE *tmp;
  ------------------
  |  |   61|     64|    #define ITEM_TYPE BASE
  |  |  ------------------
  |  |  |  |  115|     64|    #define BASE igraph_t
  |  |  ------------------
  ------------------
  236|       |
  237|     64|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|     64|    do { \
  |  |  925|     64|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|     64|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 64]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|     64|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 64]
  |  |  ------------------
  ------------------
  238|     64|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|     64|    do { \
  |  |  925|     64|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|     64|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 64]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|     64|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 64]
  |  |  ------------------
  ------------------
  239|     64|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|     64|    do { \
  |  |  925|     64|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|     64|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 64]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|     64|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 64]
  |  |  ------------------
  ------------------
  240|       |
  241|     64|    current_capacity = FUNCTION(capacity)(v);
  ------------------
  |  |  160|     64|    #define FUNCTION(c) CONCAT2x(igraph_graph_list,c)
  |  |  ------------------
  |  |  |  |   19|     64|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  242|       |
  243|     64|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (243:9): [True: 0, False: 64]
  ------------------
  244|      0|        return IGRAPH_SUCCESS;
  245|      0|    }
  246|       |
  247|     64|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, ITEM_TYPE);
  ------------------
  |  |   35|     64|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|    128|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 64, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 64, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 64, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  248|     64|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for list.");
  ------------------
  |  |  709|     64|    do { \
  |  |  710|     64|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|     64|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 64]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|     64|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 64]
  |  |  ------------------
  ------------------
  249|       |
  250|     64|    v->end = tmp + (v->end - v->stor_begin);
  251|     64|    v->stor_begin = tmp;
  252|     64|    v->stor_end = v->stor_begin + capacity;
  253|       |
  254|     64|    return IGRAPH_SUCCESS;
  255|     64|}
igraph_graph_list_size:
  287|     64|igraph_int_t FUNCTION(size)(const TYPE *v) {
  288|     64|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|     64|    do { \
  |  |  925|     64|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|     64|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 64]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|     64|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 64]
  |  |  ------------------
  ------------------
  289|     64|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|     64|    do { \
  |  |  925|     64|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|     64|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 64]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|     64|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 64]
  |  |  ------------------
  ------------------
  290|     64|    return v->end - v->stor_begin;
  291|     64|}
igraph_graph_list_clear:
  357|  4.00k|void FUNCTION(clear)(TYPE *v) {
  358|  4.00k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  4.00k|    do { \
  |  |  925|  4.00k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
  359|  4.00k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  4.00k|    do { \
  |  |  925|  4.00k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
  360|  4.00k|    INTERNAL_FUNCTION(destroy_slice)(v, v->stor_begin, v->end);
  ------------------
  |  |  161|  4.00k|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_graph_list,c)
  |  |  ------------------
  |  |  |  |   19|  4.00k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  361|  4.00k|    v->end = v->stor_begin;
  362|  4.00k|}
igraph_graph_list_push_back:
  585|    658|igraph_error_t FUNCTION(push_back)(TYPE *v, ITEM_TYPE *e) {
  586|    658|    IGRAPH_CHECK(INTERNAL_FUNCTION(expand_if_full)(v));
  ------------------
  |  |  656|    658|    do { \
  |  |  657|    658|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    658|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    658|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 658]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    658|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 658]
  |  |  ------------------
  ------------------
  587|    658|    *(v->end) = *e;
  588|    658|    v->end += 1;
  589|    658|    return IGRAPH_SUCCESS;
  590|    658|}
graph_list.c:igraph_i_graph_list_init_slice:
 1065|  2.00k|static igraph_error_t INTERNAL_FUNCTION(init_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1066|  2.00k|    ITEM_TYPE *current;
  ------------------
  |  |   61|  2.00k|    #define ITEM_TYPE BASE
  |  |  ------------------
  |  |  |  |  115|  2.00k|    #define BASE igraph_t
  |  |  ------------------
  ------------------
 1067|  2.00k|    igraph_error_t retval;
 1068|       |
 1069|  2.00k|    for (current = start; current < end; current++) {
  ------------------
  |  Branch (1069:27): [True: 0, False: 2.00k]
  ------------------
 1070|      0|        retval = INTERNAL_FUNCTION(init_item)(list, current);
  ------------------
  |  |  161|      0|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_graph_list,c)
  |  |  ------------------
  |  |  |  |   19|      0|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1071|      0|        if (retval) {
  ------------------
  |  Branch (1071:13): [True: 0, False: 0]
  ------------------
 1072|      0|            INTERNAL_FUNCTION(destroy_slice)(list, start, current);
  ------------------
  |  |  161|      0|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_graph_list,c)
  |  |  ------------------
  |  |  |  |   19|      0|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1073|      0|            IGRAPH_CHECK(retval);
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1074|      0|        }
 1075|      0|    }
 1076|       |
 1077|  2.00k|    return IGRAPH_SUCCESS;
 1078|  2.00k|}
graph_list.c:igraph_i_graph_list_destroy_slice:
 1080|  4.00k|static void INTERNAL_FUNCTION(destroy_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1081|  4.00k|    IGRAPH_UNUSED(list);
  ------------------
  |  |   30|  4.00k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
 1082|  4.66k|    for (; start < end; start++) {
  ------------------
  |  Branch (1082:12): [True: 658, False: 4.00k]
  ------------------
 1083|    658|        INTERNAL_FUNCTION(destroy_item)(start);
  ------------------
  |  |  161|    658|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_graph_list,c)
  |  |  ------------------
  |  |  |  |   19|    658|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1084|    658|    }
 1085|  4.00k|}
graph_list.c:igraph_i_graph_list_expand_if_full:
 1091|    658|static igraph_error_t INTERNAL_FUNCTION(expand_if_full)(TYPE *v) {
 1092|    658|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|    658|    do { \
  |  |  925|    658|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    658|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 658]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    658|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 658]
  |  |  ------------------
  ------------------
 1093|    658|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|    658|    do { \
  |  |  925|    658|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    658|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 658]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    658|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 658]
  |  |  ------------------
  ------------------
 1094|       |
 1095|    658|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (1095:9): [True: 64, False: 594]
  ------------------
 1096|     64|        igraph_int_t old_size = FUNCTION(size)(v);
  ------------------
  |  |  160|     64|    #define FUNCTION(c) CONCAT2x(igraph_graph_list,c)
  |  |  ------------------
  |  |  |  |   19|     64|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1097|     64|        igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|     64|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|     64|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (1097:33): [True: 64, False: 0]
  ------------------
 1098|     64|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   74|     64|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (1098:13): [True: 0, False: 64]
  ------------------
 1099|      0|            IGRAPH_ERROR("Cannot add new item to list, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1100|      0|        }
 1101|     64|        if (new_size == 0) {
  ------------------
  |  Branch (1101:13): [True: 0, False: 64]
  ------------------
 1102|      0|            new_size = 1;
 1103|      0|        }
 1104|     64|        IGRAPH_CHECK(FUNCTION(reserve)(v, new_size));
  ------------------
  |  |  656|     64|    do { \
  |  |  657|     64|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     64|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     64|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 64]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|     64|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 64]
  |  |  ------------------
  ------------------
 1105|     64|    }
 1106|       |
 1107|    658|    return IGRAPH_SUCCESS;
 1108|    658|}

igraph_vector_int_pair_order:
  119|  57.8k|                                       igraph_vector_int_t* res, igraph_int_t nodes) {
  120|  57.8k|    igraph_int_t edges = igraph_vector_int_size(v);
  121|  57.8k|    igraph_vector_int_t ptr;
  122|  57.8k|    igraph_vector_int_t rad;
  123|  57.8k|    igraph_int_t i, j;
  124|       |
  125|  57.8k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  57.8k|    do { \
  |  |  925|  57.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  57.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 57.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  57.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 57.8k]
  |  |  ------------------
  ------------------
  126|  57.8k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  57.8k|    do { \
  |  |  925|  57.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  57.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 57.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  57.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 57.8k]
  |  |  ------------------
  ------------------
  127|       |
  128|  57.8k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&ptr, nodes + 1);
  ------------------
  |  |  119|  57.8k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  57.8k|    do { \
  |  |  |  |  657|  57.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  57.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  57.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 57.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  57.8k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 57.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  57.8k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  57.8k|    do { \
  |  |  |  |  604|  57.8k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  57.8k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  57.8k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  57.8k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 57.8k]
  |  |  |  |  ------------------
  |  |  |  |  608|  57.8k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  57.8k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 57.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 57.8k]
  |  |  ------------------
  ------------------
  129|  57.8k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&rad, edges);
  ------------------
  |  |  119|  57.8k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  57.8k|    do { \
  |  |  |  |  657|  57.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  57.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  57.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 57.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  57.8k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 57.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  57.8k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  57.8k|    do { \
  |  |  |  |  604|  57.8k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  57.8k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  57.8k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  57.8k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 57.8k]
  |  |  |  |  ------------------
  |  |  |  |  608|  57.8k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  57.8k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 57.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 57.8k]
  |  |  ------------------
  ------------------
  130|  57.8k|    IGRAPH_CHECK(igraph_vector_int_resize(res, edges));
  ------------------
  |  |  656|  57.8k|    do { \
  |  |  657|  57.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  57.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  57.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 57.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  57.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 57.8k]
  |  |  ------------------
  ------------------
  131|       |
  132|  1.84M|    for (i = 0; i < edges; i++) {
  ------------------
  |  Branch (132:17): [True: 1.78M, False: 57.8k]
  ------------------
  133|  1.78M|        igraph_int_t radix = VECTOR(*v2)[i];
  ------------------
  |  |   60|  1.78M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  134|  1.78M|        if (VECTOR(ptr)[radix] != 0) {
  ------------------
  |  |   60|  1.78M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (134:13): [True: 615k, False: 1.16M]
  ------------------
  135|   615k|            VECTOR(rad)[i] = VECTOR(ptr)[radix];
  ------------------
  |  |   60|   615k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(rad)[i] = VECTOR(ptr)[radix];
  ------------------
  |  |   60|   615k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  136|   615k|        }
  137|  1.78M|        VECTOR(ptr)[radix] = i + 1;
  ------------------
  |  |   60|  1.78M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  138|  1.78M|    }
  139|       |
  140|  57.8k|    j = 0;
  141|  13.9M|    for (i = 0; i < nodes + 1; i++) {
  ------------------
  |  Branch (141:17): [True: 13.9M, False: 57.8k]
  ------------------
  142|  13.9M|        if (VECTOR(ptr)[i] != 0) {
  ------------------
  |  |   60|  13.9M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (142:13): [True: 1.16M, False: 12.7M]
  ------------------
  143|  1.16M|            igraph_int_t next = VECTOR(ptr)[i] - 1;
  ------------------
  |  |   60|  1.16M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  144|  1.16M|            VECTOR(*res)[j++] = next;
  ------------------
  |  |   60|  1.16M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  145|  1.78M|            while (VECTOR(rad)[next] != 0) {
  ------------------
  |  |   60|  1.78M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (145:20): [True: 615k, False: 1.16M]
  ------------------
  146|   615k|                next = VECTOR(rad)[next] - 1;
  ------------------
  |  |   60|   615k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  147|   615k|                VECTOR(*res)[j++] = next;
  ------------------
  |  |   60|   615k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  148|   615k|            }
  149|  1.16M|        }
  150|  13.9M|    }
  151|       |
  152|  57.8k|    igraph_vector_int_null(&ptr);
  153|  57.8k|    igraph_vector_int_null(&rad);
  154|       |
  155|  1.84M|    for (i = 0; i < edges; i++) {
  ------------------
  |  Branch (155:17): [True: 1.78M, False: 57.8k]
  ------------------
  156|  1.78M|        igraph_int_t edge = VECTOR(*res)[edges - i - 1];
  ------------------
  |  |   60|  1.78M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  157|  1.78M|        igraph_int_t radix = VECTOR(*v)[edge];
  ------------------
  |  |   60|  1.78M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  158|  1.78M|        if (VECTOR(ptr)[radix] != 0) {
  ------------------
  |  |   60|  1.78M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (158:13): [True: 615k, False: 1.16M]
  ------------------
  159|   615k|            VECTOR(rad)[edge] = VECTOR(ptr)[radix];
  ------------------
  |  |   60|   615k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(rad)[edge] = VECTOR(ptr)[radix];
  ------------------
  |  |   60|   615k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  160|   615k|        }
  161|  1.78M|        VECTOR(ptr)[radix] = edge + 1;
  ------------------
  |  |   60|  1.78M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  162|  1.78M|    }
  163|       |
  164|  57.8k|    j = 0;
  165|  13.9M|    for (i = 0; i < nodes + 1; i++) {
  ------------------
  |  Branch (165:17): [True: 13.9M, False: 57.8k]
  ------------------
  166|  13.9M|        if (VECTOR(ptr)[i] != 0) {
  ------------------
  |  |   60|  13.9M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (166:13): [True: 1.16M, False: 12.7M]
  ------------------
  167|  1.16M|            igraph_int_t next = VECTOR(ptr)[i] - 1;
  ------------------
  |  |   60|  1.16M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  168|  1.16M|            VECTOR(*res)[j++] = next;
  ------------------
  |  |   60|  1.16M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  169|  1.78M|            while (VECTOR(rad)[next] != 0) {
  ------------------
  |  |   60|  1.78M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (169:20): [True: 615k, False: 1.16M]
  ------------------
  170|   615k|                next = VECTOR(rad)[next] - 1;
  ------------------
  |  |   60|   615k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  171|   615k|                VECTOR(*res)[j++] = next;
  ------------------
  |  |   60|   615k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  172|   615k|            }
  173|  1.16M|        }
  174|  13.9M|    }
  175|       |
  176|  57.8k|    igraph_vector_int_destroy(&ptr);
  177|  57.8k|    igraph_vector_int_destroy(&rad);
  178|  57.8k|    IGRAPH_FINALLY_CLEAN(2);
  179|       |
  180|  57.8k|    return IGRAPH_SUCCESS;
  181|  57.8k|}

igraph_vector_init:
  134|  14.0k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  14.0k|    igraph_int_t alloc_size;
  136|  14.0k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  14.0k|    do { \
  |  |  925|  14.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  14.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 14.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  14.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 14.0k]
  |  |  ------------------
  ------------------
  137|  14.0k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 12.0k, False: 2.00k]
  ------------------
  138|       |
  139|       |    /* When this function fails, it should leave stor_begin set to NULL,
  140|       |     * so that vector_destroy() is still safe to call on the vector.
  141|       |     * This simplifies freeing partially initialized data structures,
  142|       |     * such as adjacency lists, when an error occurs mid-initialization. */
  143|  14.0k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  14.0k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  28.0k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 14.0k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 14.0k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 14.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  14.0k|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  14.0k|    do { \
  |  |  710|  14.0k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  14.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 14.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  14.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 14.0k]
  |  |  ------------------
  ------------------
  145|  14.0k|    v->stor_end = v->stor_begin + alloc_size;
  146|  14.0k|    v->end = v->stor_begin + size;
  147|       |
  148|  14.0k|    return IGRAPH_SUCCESS;
  149|  14.0k|}
igraph_vector_destroy:
  408|  14.0k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  14.0k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  14.0k|    do { \
  |  |  925|  14.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  14.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 14.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  14.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 14.0k]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  14.0k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 14.0k, False: 0]
  ------------------
  413|  14.0k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  14.0k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  14.0k|    }
  416|  14.0k|}
igraph_vector_capacity:
  436|  15.2k|igraph_int_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  437|  15.2k|    return v->stor_end - v->stor_begin;
  438|  15.2k|}
igraph_vector_reserve:
  468|  15.2k|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_int_t capacity) {
  469|  15.2k|    igraph_int_t current_capacity;
  470|  15.2k|    BASE *tmp;
  ------------------
  |  |   29|  15.2k|    #define BASE igraph_real_t
  ------------------
  471|       |
  472|  15.2k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  15.2k|    do { \
  |  |  925|  15.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  15.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  15.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 15.2k]
  |  |  ------------------
  ------------------
  473|  15.2k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  15.2k|    do { \
  |  |  925|  15.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  15.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  15.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 15.2k]
  |  |  ------------------
  ------------------
  474|  15.2k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  15.2k|    do { \
  |  |  925|  15.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  15.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  15.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 15.2k]
  |  |  ------------------
  ------------------
  475|       |
  476|  15.2k|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  173|  15.2k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  15.2k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  15.2k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|       |
  478|  15.2k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (478:9): [True: 13.2k, False: 1.97k]
  ------------------
  479|  13.2k|        return IGRAPH_SUCCESS;
  480|  13.2k|    }
  481|       |
  482|  1.97k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   35|  1.97k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|  3.95k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.97k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.97k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.97k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|  1.97k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  709|  1.97k|    do { \
  |  |  710|  1.97k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.97k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.97k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  1.97k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.97k]
  |  |  ------------------
  ------------------
  484|       |
  485|  1.97k|    v->end = tmp + (v->end - v->stor_begin);
  486|  1.97k|    v->stor_begin = tmp;
  487|  1.97k|    v->stor_end = v->stor_begin + capacity;
  488|       |
  489|  1.97k|    return IGRAPH_SUCCESS;
  490|  1.97k|}
igraph_vector_size:
  522|  4.00k|igraph_int_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  523|  4.00k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  4.00k|    do { \
  |  |  925|  4.00k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
  524|  4.00k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  4.00k|    do { \
  |  |  925|  4.00k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
  525|  4.00k|    return v->end - v->stor_begin;
  526|  4.00k|}
igraph_vector_fill:
  745|  11.2k|void FUNCTION(igraph_vector, fill)(TYPE(igraph_vector) *v, BASE e) {
  746|  11.2k|    BASE *ptr;
  ------------------
  |  |   29|  11.2k|    #define BASE igraph_real_t
  ------------------
  747|  11.2k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  11.2k|    do { \
  |  |  925|  11.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  11.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 11.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  11.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 11.2k]
  |  |  ------------------
  ------------------
  748|  11.2k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  11.2k|    do { \
  |  |  925|  11.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  11.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 11.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  11.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 11.2k]
  |  |  ------------------
  ------------------
  749|       |
  750|       |    /* Optimize the commonly used integer case when filling with 0
  751|       |     * or -1, which are an all-0 and all-1 bit pattern that the
  752|       |     * compiler can generate higher efficiency code for. */
  753|       |#if defined(BASE_INT)
  754|       |    if (e == 0) {
  755|       |        FUNCTION(igraph_vector, null)(v);
  756|       |        return;
  757|       |    }
  758|       |    if (e == -1) {
  759|       |        for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  760|       |            *ptr = -1;
  761|       |        }
  762|       |        return;
  763|       |    }
  764|       |#endif
  765|       |
  766|   353k|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (766:31): [True: 341k, False: 11.2k]
  ------------------
  767|   341k|        *ptr = e;
  768|   341k|    }
  769|  11.2k|}
igraph_vector_resize:
 1264|  15.2k|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_int_t new_size) {
 1265|  15.2k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  15.2k|    do { \
  |  |  925|  15.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  15.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  15.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 15.2k]
  |  |  ------------------
  ------------------
 1266|  15.2k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  15.2k|    do { \
  |  |  925|  15.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  15.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  15.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 15.2k]
  |  |  ------------------
  ------------------
 1267|  15.2k|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  15.2k|    do { \
  |  |  657|  15.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  15.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  15.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  15.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 15.2k]
  |  |  ------------------
  ------------------
 1268|  15.2k|    v->end = v->stor_begin + new_size;
 1269|  15.2k|    return IGRAPH_SUCCESS;
 1270|  15.2k|}
igraph_vector_char_init:
  134|  1.89k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  1.89k|    igraph_int_t alloc_size;
  136|  1.89k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  1.89k|    do { \
  |  |  925|  1.89k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.89k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.89k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.89k]
  |  |  ------------------
  ------------------
  137|  1.89k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 1.89k, False: 0]
  ------------------
  138|       |
  139|       |    /* When this function fails, it should leave stor_begin set to NULL,
  140|       |     * so that vector_destroy() is still safe to call on the vector.
  141|       |     * This simplifies freeing partially initialized data structures,
  142|       |     * such as adjacency lists, when an error occurs mid-initialization. */
  143|  1.89k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  1.89k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  3.79k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.89k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.89k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.89k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  1.89k|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  1.89k|    do { \
  |  |  710|  1.89k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.89k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  1.89k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.89k]
  |  |  ------------------
  ------------------
  145|  1.89k|    v->stor_end = v->stor_begin + alloc_size;
  146|  1.89k|    v->end = v->stor_begin + size;
  147|       |
  148|  1.89k|    return IGRAPH_SUCCESS;
  149|  1.89k|}
igraph_vector_char_destroy:
  408|  1.89k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  1.89k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.89k|    do { \
  |  |  925|  1.89k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.89k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.89k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.89k]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  1.89k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 1.89k, False: 0]
  ------------------
  413|  1.89k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  1.89k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  1.89k|    }
  416|  1.89k|}
igraph_vector_bool_init:
  134|  2.00k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  2.00k|    igraph_int_t alloc_size;
  136|  2.00k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  2.00k|    do { \
  |  |  925|  2.00k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  137|  2.00k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 0, False: 2.00k]
  ------------------
  138|       |
  139|       |    /* When this function fails, it should leave stor_begin set to NULL,
  140|       |     * so that vector_destroy() is still safe to call on the vector.
  141|       |     * This simplifies freeing partially initialized data structures,
  142|       |     * such as adjacency lists, when an error occurs mid-initialization. */
  143|  2.00k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  2.00k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.00k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.00k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.00k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.00k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  2.00k|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  2.00k|    do { \
  |  |  710|  2.00k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  145|  2.00k|    v->stor_end = v->stor_begin + alloc_size;
  146|  2.00k|    v->end = v->stor_begin + size;
  147|       |
  148|  2.00k|    return IGRAPH_SUCCESS;
  149|  2.00k|}
igraph_vector_bool_destroy:
  408|  2.00k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  2.00k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  2.00k|    do { \
  |  |  925|  2.00k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  2.00k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 2.00k, False: 0]
  ------------------
  413|  2.00k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  2.00k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  2.00k|    }
  416|  2.00k|}
igraph_vector_bool_capacity:
  436|  6.00k|igraph_int_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  437|  6.00k|    return v->stor_end - v->stor_begin;
  438|  6.00k|}
igraph_vector_bool_reserve:
  468|  6.00k|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_int_t capacity) {
  469|  6.00k|    igraph_int_t current_capacity;
  470|  6.00k|    BASE *tmp;
  ------------------
  |  |   53|  6.00k|    #define BASE igraph_bool_t
  ------------------
  471|       |
  472|  6.00k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  6.00k|    do { \
  |  |  925|  6.00k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.00k]
  |  |  ------------------
  ------------------
  473|  6.00k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  6.00k|    do { \
  |  |  925|  6.00k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.00k]
  |  |  ------------------
  ------------------
  474|  6.00k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  6.00k|    do { \
  |  |  925|  6.00k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.00k]
  |  |  ------------------
  ------------------
  475|       |
  476|  6.00k|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  178|  6.00k|        #define FUNCTION(a,c) CONCAT3x(a,bool,c)
  |  |  ------------------
  |  |  |  |   21|  6.00k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  ------------------
  ------------------
  477|       |
  478|  6.00k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (478:9): [True: 4.21k, False: 1.79k]
  ------------------
  479|  4.21k|        return IGRAPH_SUCCESS;
  480|  4.21k|    }
  481|       |
  482|  1.79k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   35|  1.79k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|  3.59k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.79k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.79k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.79k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|  1.79k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  709|  1.79k|    do { \
  |  |  710|  1.79k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.79k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  1.79k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.79k]
  |  |  ------------------
  ------------------
  484|       |
  485|  1.79k|    v->end = tmp + (v->end - v->stor_begin);
  486|  1.79k|    v->stor_begin = tmp;
  487|  1.79k|    v->stor_end = v->stor_begin + capacity;
  488|       |
  489|  1.79k|    return IGRAPH_SUCCESS;
  490|  1.79k|}
igraph_vector_bool_resize:
 1264|  6.00k|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_int_t new_size) {
 1265|  6.00k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  6.00k|    do { \
  |  |  925|  6.00k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.00k]
  |  |  ------------------
  ------------------
 1266|  6.00k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  6.00k|    do { \
  |  |  925|  6.00k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.00k]
  |  |  ------------------
  ------------------
 1267|  6.00k|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  6.00k|    do { \
  |  |  657|  6.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  6.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  6.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  6.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 6.00k]
  |  |  ------------------
  ------------------
 1268|  6.00k|    v->end = v->stor_begin + new_size;
 1269|  6.00k|    return IGRAPH_SUCCESS;
 1270|  6.00k|}
igraph_vector_int_init:
  134|  13.2M|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  13.2M|    igraph_int_t alloc_size;
  136|  13.2M|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  13.2M|    do { \
  |  |  925|  13.2M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  13.2M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 13.2M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  13.2M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 13.2M]
  |  |  ------------------
  ------------------
  137|  13.2M|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 596k, False: 12.6M]
  ------------------
  138|       |
  139|       |    /* When this function fails, it should leave stor_begin set to NULL,
  140|       |     * so that vector_destroy() is still safe to call on the vector.
  141|       |     * This simplifies freeing partially initialized data structures,
  142|       |     * such as adjacency lists, when an error occurs mid-initialization. */
  143|  13.2M|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  13.2M|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  26.4M|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 13.2M, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 13.2M, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 13.2M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  13.2M|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  13.2M|    do { \
  |  |  710|  13.2M|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  13.2M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 13.2M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  13.2M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 13.2M]
  |  |  ------------------
  ------------------
  145|  13.2M|    v->stor_end = v->stor_begin + alloc_size;
  146|  13.2M|    v->end = v->stor_begin + size;
  147|       |
  148|  13.2M|    return IGRAPH_SUCCESS;
  149|  13.2M|}
igraph_vector_int_destroy:
  408|  13.2M|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  13.2M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  13.2M|    do { \
  |  |  925|  13.2M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  13.2M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 13.2M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  13.2M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 13.2M]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  13.2M|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 13.2M, False: 0]
  ------------------
  413|  13.2M|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  13.2M|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  13.2M|    }
  416|  13.2M|}
igraph_vector_int_capacity:
  436|  24.9M|igraph_int_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  437|  24.9M|    return v->stor_end - v->stor_begin;
  438|  24.9M|}
igraph_vector_int_reserve:
  468|  23.5M|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_int_t capacity) {
  469|  23.5M|    igraph_int_t current_capacity;
  470|  23.5M|    BASE *tmp;
  ------------------
  |  |   69|  23.5M|    #define BASE igraph_int_t
  ------------------
  471|       |
  472|  23.5M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  23.5M|    do { \
  |  |  925|  23.5M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  23.5M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.5M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  23.5M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 23.5M]
  |  |  ------------------
  ------------------
  473|  23.5M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  23.5M|    do { \
  |  |  925|  23.5M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  23.5M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.5M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  23.5M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 23.5M]
  |  |  ------------------
  ------------------
  474|  23.5M|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  23.5M|    do { \
  |  |  925|  23.5M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  23.5M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.5M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  23.5M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 23.5M]
  |  |  ------------------
  ------------------
  475|       |
  476|  23.5M|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  181|  23.5M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  23.5M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  23.5M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|       |
  478|  23.5M|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (478:9): [True: 14.7M, False: 8.86M]
  ------------------
  479|  14.7M|        return IGRAPH_SUCCESS;
  480|  14.7M|    }
  481|       |
  482|  8.86M|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   35|  8.86M|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|  17.7M|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 8.86M, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 8.86M, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 8.86M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|  8.86M|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  709|  8.86M|    do { \
  |  |  710|  8.86M|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  8.86M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.86M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  8.86M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 8.86M]
  |  |  ------------------
  ------------------
  484|       |
  485|  8.86M|    v->end = tmp + (v->end - v->stor_begin);
  486|  8.86M|    v->stor_begin = tmp;
  487|  8.86M|    v->stor_end = v->stor_begin + capacity;
  488|       |
  489|  8.86M|    return IGRAPH_SUCCESS;
  490|  8.86M|}
igraph_vector_int_empty:
  503|   727k|igraph_bool_t FUNCTION(igraph_vector, empty)(const TYPE(igraph_vector) *v) {
  504|   727k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   727k|    do { \
  |  |  925|   727k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   727k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 727k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   727k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 727k]
  |  |  ------------------
  ------------------
  505|   727k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   727k|    do { \
  |  |  925|   727k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   727k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 727k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   727k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 727k]
  |  |  ------------------
  ------------------
  506|   727k|    return v->stor_begin == v->end;
  507|   727k|}
igraph_vector_int_size:
  522|  23.4M|igraph_int_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  523|  23.4M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  23.4M|    do { \
  |  |  925|  23.4M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  23.4M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  23.4M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 23.4M]
  |  |  ------------------
  ------------------
  524|  23.4M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  23.4M|    do { \
  |  |  925|  23.4M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  23.4M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  23.4M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 23.4M]
  |  |  ------------------
  ------------------
  525|  23.4M|    return v->end - v->stor_begin;
  526|  23.4M|}
igraph_vector_int_clear:
  542|  1.00M|void FUNCTION(igraph_vector, clear)(TYPE(igraph_vector)* v) {
  543|  1.00M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.00M|    do { \
  |  |  925|  1.00M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.00M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.00M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.00M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.00M]
  |  |  ------------------
  ------------------
  544|  1.00M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  1.00M|    do { \
  |  |  925|  1.00M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.00M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.00M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.00M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.00M]
  |  |  ------------------
  ------------------
  545|  1.00M|    v->end = v->stor_begin;
  546|  1.00M|}
igraph_vector_int_push_back:
  573|  10.4M|igraph_error_t FUNCTION(igraph_vector, push_back)(TYPE(igraph_vector) *v, BASE e) {
  574|  10.4M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  10.4M|    do { \
  |  |  925|  10.4M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  10.4M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 10.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  10.4M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 10.4M]
  |  |  ------------------
  ------------------
  575|  10.4M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  10.4M|    do { \
  |  |  925|  10.4M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  10.4M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 10.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  10.4M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 10.4M]
  |  |  ------------------
  ------------------
  576|       |
  577|  10.4M|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (577:9): [True: 4.33M, False: 6.08M]
  ------------------
  578|       |        /* full, allocate more storage */
  579|  4.33M|        igraph_int_t old_size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  181|  4.33M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  4.33M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  4.33M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  580|  4.33M|        igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|  4.33M|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|  4.33M|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (580:33): [True: 4.33M, False: 0]
  ------------------
  581|  4.33M|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   74|  4.33M|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (581:13): [True: 0, False: 4.33M]
  ------------------
  582|      0|            IGRAPH_ERROR("Cannot push to vector, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  583|      0|        }
  584|  4.33M|        if (new_size == 0) {
  ------------------
  |  Branch (584:13): [True: 0, False: 4.33M]
  ------------------
  585|      0|            new_size = 1;
  586|      0|        }
  587|  4.33M|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  4.33M|    do { \
  |  |  657|  4.33M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.33M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.33M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.33M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.33M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.33M]
  |  |  ------------------
  ------------------
  588|  4.33M|    }
  589|       |
  590|  10.4M|    *(v->end) = e;
  591|  10.4M|    v->end += 1;
  592|       |
  593|  10.4M|    return IGRAPH_SUCCESS;
  594|  10.4M|}
igraph_vector_int_insert:
  611|  59.5k|        TYPE(igraph_vector) *v, igraph_int_t pos, BASE value) {
  612|  59.5k|    igraph_int_t size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  181|  59.5k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  59.5k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  59.5k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  613|  59.5k|    IGRAPH_ASSERT(0 <= pos && pos <= size);
  ------------------
  |  |  924|  59.5k|    do { \
  |  |  925|  59.5k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   119k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 59.5k]
  |  |  |  |  |  Branch (612:52): [True: 59.5k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 59.5k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  59.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 59.5k]
  |  |  ------------------
  ------------------
  614|  59.5k|    if (size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   74|  59.5k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (614:9): [True: 0, False: 59.5k]
  ------------------
  615|      0|        IGRAPH_ERROR("Cannot insert into vector, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  616|      0|    }
  617|  59.5k|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(v, size + 1));
  ------------------
  |  |  656|  59.5k|    do { \
  |  |  657|  59.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  59.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  59.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 59.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  59.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 59.5k]
  |  |  ------------------
  ------------------
  618|  59.5k|    if (pos < size) {
  ------------------
  |  Branch (618:9): [True: 8.07k, False: 51.5k]
  ------------------
  619|  8.07k|        memmove(v->stor_begin + pos + 1, v->stor_begin + pos,
  620|  8.07k|                sizeof(BASE) * (size - pos));
  621|  8.07k|    }
  622|  59.5k|    v->stor_begin[pos] = value;
  623|  59.5k|    return IGRAPH_SUCCESS;
  624|  59.5k|}
igraph_vector_int_get_ptr:
  682|   410k|BASE* FUNCTION(igraph_vector, get_ptr)(const TYPE(igraph_vector) *v, igraph_int_t pos) {
  683|   410k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   410k|    do { \
  |  |  925|   410k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   410k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 410k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   410k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 410k]
  |  |  ------------------
  ------------------
  684|   410k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   410k|    do { \
  |  |  925|   410k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   410k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 410k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   410k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 410k]
  |  |  ------------------
  ------------------
  685|   410k|    return v->stor_begin + pos;
  686|   410k|}
igraph_vector_int_null:
  725|   169k|void FUNCTION(igraph_vector, null)(TYPE(igraph_vector) *v) {
  726|   169k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   169k|    do { \
  |  |  925|   169k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   169k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 169k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   169k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 169k]
  |  |  ------------------
  ------------------
  727|   169k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   169k|    do { \
  |  |  925|   169k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   169k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 169k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   169k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 169k]
  |  |  ------------------
  ------------------
  728|   169k|    if (FUNCTION(igraph_vector, size)(v) > 0) {
  ------------------
  |  |  181|   169k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   169k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   169k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (728:9): [True: 163k, False: 6.47k]
  ------------------
  729|   163k|        memset(v->stor_begin, 0, sizeof(BASE) * FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  181|   163k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   163k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   163k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  730|   163k|    }
  731|   169k|}
igraph_vector_int_fill:
  745|  28.0k|void FUNCTION(igraph_vector, fill)(TYPE(igraph_vector) *v, BASE e) {
  746|  28.0k|    BASE *ptr;
  ------------------
  |  |   69|  28.0k|    #define BASE igraph_int_t
  ------------------
  747|  28.0k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  28.0k|    do { \
  |  |  925|  28.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  28.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 28.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  28.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 28.0k]
  |  |  ------------------
  ------------------
  748|  28.0k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  28.0k|    do { \
  |  |  925|  28.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  28.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 28.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  28.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 28.0k]
  |  |  ------------------
  ------------------
  749|       |
  750|       |    /* Optimize the commonly used integer case when filling with 0
  751|       |     * or -1, which are an all-0 and all-1 bit pattern that the
  752|       |     * compiler can generate higher efficiency code for. */
  753|  28.0k|#if defined(BASE_INT)
  754|  28.0k|    if (e == 0) {
  ------------------
  |  Branch (754:9): [True: 0, False: 28.0k]
  ------------------
  755|      0|        FUNCTION(igraph_vector, null)(v);
  ------------------
  |  |  181|      0|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|      0|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|      0|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  756|      0|        return;
  757|      0|    }
  758|  28.0k|    if (e == -1) {
  ------------------
  |  Branch (758:9): [True: 16.0k, False: 12.0k]
  ------------------
  759|  2.67M|        for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (759:35): [True: 2.66M, False: 16.0k]
  ------------------
  760|  2.66M|            *ptr = -1;
  761|  2.66M|        }
  762|  16.0k|        return;
  763|  16.0k|    }
  764|  12.0k|#endif
  765|       |
  766|  2.00M|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (766:31): [True: 1.99M, False: 12.0k]
  ------------------
  767|  1.99M|        *ptr = e;
  768|  1.99M|    }
  769|  12.0k|}
igraph_vector_int_range:
  791|  2.00k|igraph_error_t FUNCTION(igraph_vector, range)(TYPE(igraph_vector) *v, BASE start, BASE end) {
  792|  2.00k|    BASE *p;
  ------------------
  |  |   69|  2.00k|    #define BASE igraph_int_t
  ------------------
  793|  2.00k|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(v, (end - start)));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  794|       |
  795|   334k|    for (p = v->stor_begin; p < v->end; p++) {
  ------------------
  |  Branch (795:29): [True: 332k, False: 2.00k]
  ------------------
  796|   332k|        *p = start;
  797|   332k|        start = start + ONE;
  ------------------
  |  |   75|   332k|    #define ONE 1
  ------------------
  798|   332k|    }
  799|       |
  800|  2.00k|    return IGRAPH_SUCCESS;
  801|  2.00k|}
igraph_vector_int_pop_back:
  838|   944k|BASE FUNCTION(igraph_vector, pop_back)(TYPE(igraph_vector) *v) {
  839|   944k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   944k|    do { \
  |  |  925|   944k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   944k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 944k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   944k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 944k]
  |  |  ------------------
  ------------------
  840|   944k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   944k|    do { \
  |  |  925|   944k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   944k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 944k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   944k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 944k]
  |  |  ------------------
  ------------------
  841|   944k|    IGRAPH_ASSERT(v->end != NULL);
  ------------------
  |  |  924|   944k|    do { \
  |  |  925|   944k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   944k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 944k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   944k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 944k]
  |  |  ------------------
  ------------------
  842|   944k|    IGRAPH_ASSERT(v->end != v->stor_begin);
  ------------------
  |  |  924|   944k|    do { \
  |  |  925|   944k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   944k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 944k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   944k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 944k]
  |  |  ------------------
  ------------------
  843|       |
  844|   944k|    (v->end)--;
  845|       |
  846|   944k|    return *(v->end);
  847|   944k|}
igraph_vector_int_sort:
  958|    588|void FUNCTION(igraph_vector, sort)(TYPE(igraph_vector) *v) {
  959|    588|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|    588|    do { \
  |  |  925|    588|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    588|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 588]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    588|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 588]
  |  |  ------------------
  ------------------
  960|    588|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|    588|    do { \
  |  |  925|    588|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    588|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 588]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    588|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 588]
  |  |  ------------------
  ------------------
  961|    588|    igraph_qsort(v->stor_begin, FUNCTION(igraph_vector, size)(v),
  ------------------
  |  |  181|    588|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|    588|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|    588|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  962|    588|                 sizeof(BASE), FUNCTION(igraph_vector, sort_cmp));
  ------------------
  |  |  181|    588|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|    588|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|    588|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  963|    588|}
igraph_vector_int_resize:
 1264|  19.1M|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_int_t new_size) {
 1265|  19.1M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  19.1M|    do { \
  |  |  925|  19.1M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  19.1M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 19.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  19.1M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 19.1M]
  |  |  ------------------
  ------------------
 1266|  19.1M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  19.1M|    do { \
  |  |  925|  19.1M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  19.1M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 19.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  19.1M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 19.1M]
  |  |  ------------------
  ------------------
 1267|  19.1M|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  19.1M|    do { \
  |  |  657|  19.1M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  19.1M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  19.1M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 19.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  19.1M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 19.1M]
  |  |  ------------------
  ------------------
 1268|  19.1M|    v->end = v->stor_begin + new_size;
 1269|  19.1M|    return IGRAPH_SUCCESS;
 1270|  19.1M|}
igraph_vector_int_max:
 1327|  22.2k|BASE FUNCTION(igraph_vector, max)(const TYPE(igraph_vector) *v) {
 1328|  22.2k|    BASE max;
  ------------------
  |  |   69|  22.2k|    #define BASE igraph_int_t
  ------------------
 1329|  22.2k|    BASE *ptr;
  ------------------
  |  |   69|  22.2k|    #define BASE igraph_int_t
  ------------------
 1330|  22.2k|    IGRAPH_ASSERT(!FUNCTION(igraph_vector, empty)(v));
  ------------------
  |  |  924|  22.2k|    do { \
  |  |  925|  22.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  22.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 22.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  22.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 22.2k]
  |  |  ------------------
  ------------------
 1331|  22.2k|    max = *(v->stor_begin);
 1332|       |#if defined(BASE_IGRAPH_REAL)
 1333|       |    if (isnan(max)) { return max; }; /* Result is NaN */
 1334|       |#endif
 1335|  22.2k|    ptr = v->stor_begin + 1;
 1336|  2.03M|    while (ptr < v->end) {
  ------------------
  |  Branch (1336:12): [True: 2.01M, False: 22.2k]
  ------------------
 1337|  2.01M|        if ((*ptr) > max) {
  ------------------
  |  Branch (1337:13): [True: 139k, False: 1.87M]
  ------------------
 1338|   139k|            max = *ptr;
 1339|   139k|        }
 1340|       |#if defined(BASE_IGRAPH_REAL)
 1341|       |        else if (isnan(*ptr))
 1342|       |            return *ptr; /* Result is NaN */
 1343|       |#endif
 1344|  2.01M|        ptr++;
 1345|  2.01M|    }
 1346|  22.2k|    return max;
 1347|  22.2k|}
igraph_vector_int_min:
 1401|  36.0k|BASE FUNCTION(igraph_vector, min)(const TYPE(igraph_vector) *v) {
 1402|  36.0k|    BASE min;
  ------------------
  |  |   69|  36.0k|    #define BASE igraph_int_t
  ------------------
 1403|  36.0k|    BASE *ptr;
  ------------------
  |  |   69|  36.0k|    #define BASE igraph_int_t
  ------------------
 1404|  36.0k|    IGRAPH_ASSERT(!FUNCTION(igraph_vector, empty)(v));
  ------------------
  |  |  924|  36.0k|    do { \
  |  |  925|  36.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  36.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  36.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 36.0k]
  |  |  ------------------
  ------------------
 1405|  36.0k|    min = *(v->stor_begin);
 1406|       |#if defined(BASE_IGRAPH_REAL)
 1407|       |    if (isnan(min)) { return min; }; /* Result is NaN */
 1408|       |#endif
 1409|  36.0k|    ptr = v->stor_begin + 1;
 1410|  5.98M|    while (ptr < v->end) {
  ------------------
  |  Branch (1410:12): [True: 5.95M, False: 36.0k]
  ------------------
 1411|  5.95M|        if ((*ptr) < min) {
  ------------------
  |  Branch (1411:13): [True: 24.2k, False: 5.92M]
  ------------------
 1412|  24.2k|            min = *ptr;
 1413|  24.2k|        }
 1414|       |#if defined(BASE_IGRAPH_REAL)
 1415|       |        else if (isnan(*ptr)) {
 1416|       |            return *ptr; /* Result is NaN */
 1417|       |        }
 1418|       |#endif
 1419|  5.95M|        ptr++;
 1420|  5.95M|    }
 1421|  36.0k|    return min;
 1422|  36.0k|}
igraph_vector_int_init_copy:
 1538|    420|) {
 1539|    420|    igraph_int_t from_size;
 1540|       |
 1541|    420|    IGRAPH_ASSERT(from != NULL);
  ------------------
  |  |  924|    420|    do { \
  |  |  925|    420|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    420|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 420]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    420|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 420]
  |  |  ------------------
  ------------------
 1542|    420|    IGRAPH_ASSERT(from->stor_begin != NULL);
  ------------------
  |  |  924|    420|    do { \
  |  |  925|    420|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    420|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 420]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    420|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 420]
  |  |  ------------------
  ------------------
 1543|       |
 1544|    420|    from_size = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  181|    420|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|    420|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|    420|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1545|    420|    IGRAPH_CHECK(FUNCTION(igraph_vector, init)(to, from_size));
  ------------------
  |  |  656|    420|    do { \
  |  |  657|    420|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    420|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    420|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 420]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    420|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 420]
  |  |  ------------------
  ------------------
 1546|       |
 1547|    420|    memcpy(to->stor_begin, from->stor_begin, from_size * sizeof(BASE));
 1548|       |
 1549|    420|    return IGRAPH_SUCCESS;
 1550|    420|}
igraph_vector_int_init_range:
 1691|  2.00k|igraph_error_t FUNCTION(igraph_vector, init_range)(TYPE(igraph_vector) *v, BASE start, BASE end) {
 1692|  2.00k|    BASE *p;
  ------------------
  |  |   69|  2.00k|    #define BASE igraph_int_t
  ------------------
 1693|  2.00k|    IGRAPH_CHECK(FUNCTION(igraph_vector, init)(v, (end - start)));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
 1694|       |
 1695|   334k|    for (p = v->stor_begin; p < v->end; p++) {
  ------------------
  |  Branch (1695:29): [True: 332k, False: 2.00k]
  ------------------
 1696|   332k|        *p = start;
 1697|   332k|        start = start + ONE;
  ------------------
  |  |   75|   332k|    #define ONE 1
  ------------------
 1698|   332k|    }
 1699|       |
 1700|  2.00k|    return IGRAPH_SUCCESS;
 1701|  2.00k|}
igraph_vector_int_remove_section:
 1721|  59.5k|        TYPE(igraph_vector) *v, igraph_int_t from, igraph_int_t to) {
 1722|  59.5k|    igraph_int_t size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  181|  59.5k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  59.5k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  59.5k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1723|       |
 1724|  59.5k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  59.5k|    do { \
  |  |  925|  59.5k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  59.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 59.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  59.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 59.5k]
  |  |  ------------------
  ------------------
 1725|  59.5k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  59.5k|    do { \
  |  |  925|  59.5k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  59.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 59.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  59.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 59.5k]
  |  |  ------------------
  ------------------
 1726|       |
 1727|  59.5k|    if (from < 0) {
  ------------------
  |  Branch (1727:9): [True: 0, False: 59.5k]
  ------------------
 1728|      0|        from = 0;
 1729|      0|    }
 1730|       |
 1731|  59.5k|    if (to > size) {
  ------------------
  |  Branch (1731:9): [True: 0, False: 59.5k]
  ------------------
 1732|      0|        to = size;
 1733|      0|    }
 1734|       |
 1735|  59.5k|    if (to > from) {
  ------------------
  |  Branch (1735:9): [True: 59.5k, False: 0]
  ------------------
 1736|  59.5k|        memmove(v->stor_begin + from, v->stor_begin + to,
 1737|  59.5k|                sizeof(BASE) * (v->end - v->stor_begin - to));
 1738|  59.5k|        v->end -= (to - from);
 1739|  59.5k|    }
 1740|  59.5k|}
igraph_vector_int_remove:
 1756|  59.5k|void FUNCTION(igraph_vector, remove)(TYPE(igraph_vector) *v, igraph_int_t elem) {
 1757|  59.5k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  59.5k|    do { \
  |  |  925|  59.5k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  59.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 59.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  59.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 59.5k]
  |  |  ------------------
  ------------------
 1758|  59.5k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  59.5k|    do { \
  |  |  925|  59.5k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  59.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 59.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  59.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 59.5k]
  |  |  ------------------
  ------------------
 1759|  59.5k|    FUNCTION(igraph_vector, remove_section)(v, elem, elem + 1);
  ------------------
  |  |  181|  59.5k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  59.5k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  59.5k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1760|  59.5k|}
igraph_vector_int_isininterval:
 1837|  49.0k|        BASE high) {
 1838|  49.0k|    BASE *ptr;
  ------------------
  |  |   69|  49.0k|    #define BASE igraph_int_t
  ------------------
 1839|  49.0k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  49.0k|    do { \
  |  |  925|  49.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  49.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 49.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  49.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 49.0k]
  |  |  ------------------
  ------------------
 1840|  49.0k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  49.0k|    do { \
  |  |  925|  49.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  49.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 49.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  49.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 49.0k]
  |  |  ------------------
  ------------------
 1841|  3.07M|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (1841:31): [True: 3.02M, False: 49.0k]
  ------------------
 1842|       |        /* Note that the following is not equivalent to *ptr < low || *ptr > high
 1843|       |         * when *ptr is NaN! */
 1844|  3.02M|        if (!(*ptr >= low && *ptr <= high)) {
  ------------------
  |  Branch (1844:15): [True: 3.02M, False: 0]
  |  Branch (1844:30): [True: 3.02M, False: 0]
  ------------------
 1845|      0|            return 0;
 1846|      0|        }
 1847|  3.02M|    }
 1848|  49.0k|    return 1;
 1849|  49.0k|}
igraph_vector_int_binsearch:
 2135|   119k|        BASE what, igraph_int_t *pos) {
 2136|   119k|    return FUNCTION(igraph_i_vector, binsearch_slice)(v, what, pos,
  ------------------
  |  |  181|   119k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   119k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   119k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2137|   119k|            0, FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  181|   119k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   119k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   119k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2138|   119k|}
igraph_vector_int_contains_sorted:
 2224|   123k|igraph_bool_t FUNCTION(igraph_vector, contains_sorted)(const TYPE(igraph_vector) *v, BASE what) {
 2225|   123k|    igraph_int_t left = 0;
 2226|   123k|    igraph_int_t right = FUNCTION(igraph_vector, size)(v) - 1;
  ------------------
  |  |  181|   123k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   123k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   123k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2227|       |
 2228|   260k|    while (left <= right) {
  ------------------
  |  Branch (2228:12): [True: 147k, False: 112k]
  ------------------
 2229|       |        /* (right + left) / 2 could theoretically overflow for long vectors */
 2230|   147k|        igraph_int_t middle = left + ((right - left) >> 1);
 2231|   147k|        if (what < VECTOR(*v)[middle]) {
  ------------------
  |  |   60|   147k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2231:13): [True: 63.6k, False: 84.2k]
  ------------------
 2232|  63.6k|            right = middle - 1;
 2233|  84.2k|        } else if (what > VECTOR(*v)[middle]) {
  ------------------
  |  |   60|  84.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2233:20): [True: 72.9k, False: 11.3k]
  ------------------
 2234|  72.9k|            left = middle + 1;
 2235|  72.9k|        } else {
 2236|  11.3k|            return true;
 2237|  11.3k|        }
 2238|   147k|    }
 2239|       |
 2240|   112k|    return false;
 2241|   123k|}
igraph_vector_int_append:
 2432|  1.41M|                                               const TYPE(igraph_vector) *from) {
 2433|  1.41M|    IGRAPH_ASSERT(to != NULL);
  ------------------
  |  |  924|  1.41M|    do { \
  |  |  925|  1.41M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.41M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.41M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.41M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.41M]
  |  |  ------------------
  ------------------
 2434|  1.41M|    IGRAPH_ASSERT(to->stor_begin != NULL);
  ------------------
  |  |  924|  1.41M|    do { \
  |  |  925|  1.41M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.41M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.41M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.41M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.41M]
  |  |  ------------------
  ------------------
 2435|       |
 2436|  1.41M|    const igraph_int_t to_size = FUNCTION(igraph_vector, size)(to);
  ------------------
  |  |  181|  1.41M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  1.41M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  1.41M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2437|  1.41M|    const igraph_int_t from_size = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  181|  1.41M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  1.41M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  1.41M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2438|  1.41M|    const igraph_int_t to_capacity = FUNCTION(igraph_vector, capacity)(to);
  ------------------
  |  |  181|  1.41M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  1.41M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  1.41M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2439|  1.41M|    igraph_int_t new_to_size;
 2440|       |
 2441|  1.41M|    IGRAPH_SAFE_ADD(to_size, from_size, &new_to_size);
  ------------------
  |  |   47|  1.41M|    do { \
  |  |   48|  1.41M|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  1.41M|        igraph_int_t _safe_sum; \
  |  |   50|  1.41M|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 1.41M]
  |  |  ------------------
  |  |   51|      0|            IGRAPH_ERRORF("Overflow when adding %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  464|      0|    do { \
  |  |  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  467|      0|        return igraph_errno; \
  |  |  |  |  468|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|        } \
  |  |   53|  1.41M|        *(res) = _safe_sum; \
  |  |   54|  1.41M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded, False: 1.41M]
  |  |  ------------------
  ------------------
 2442|       |
 2443|  1.41M|    if (to_capacity < new_to_size) {
  ------------------
  |  Branch (2443:9): [True: 0, False: 1.41M]
  ------------------
 2444|      0|        igraph_int_t new_to_capacity = to_capacity < IGRAPH_INTEGER_MAX/2 ? to_capacity * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_to_capacity = to_capacity < IGRAPH_INTEGER_MAX/2 ? to_capacity * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (2444:40): [True: 0, False: 0]
  ------------------
 2445|      0|        if (new_to_capacity < new_to_size) {
  ------------------
  |  Branch (2445:13): [True: 0, False: 0]
  ------------------
 2446|      0|            new_to_capacity = new_to_size;
 2447|      0|        }
 2448|      0|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(to, new_to_capacity));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2449|      0|    }
 2450|       |
 2451|  1.41M|    memcpy(to->stor_begin + to_size, from->stor_begin,
 2452|  1.41M|           sizeof(BASE) * from_size);
 2453|  1.41M|    to->end = to->stor_begin + new_to_size;
 2454|       |
 2455|  1.41M|    return IGRAPH_SUCCESS;
 2456|  1.41M|}
igraph_vector_int_update:
 2529|  4.28M|                                    const TYPE(igraph_vector) *from) {
 2530|  4.28M|    igraph_int_t n = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  181|  4.28M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  4.28M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  4.28M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2531|  4.28M|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(to, n));
  ------------------
  |  |  656|  4.28M|    do { \
  |  |  657|  4.28M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.28M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.28M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.28M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.28M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.28M]
  |  |  ------------------
  ------------------
 2532|  4.28M|    memcpy(to->stor_begin, from->stor_begin, sizeof(BASE)*n);
 2533|  4.28M|    return IGRAPH_SUCCESS;
 2534|  4.28M|}
igraph_vector_int_swap:
 2546|  4.29M|void FUNCTION(igraph_vector, swap)(TYPE(igraph_vector) *v1, TYPE(igraph_vector) *v2) {
 2547|       |
 2548|  4.29M|    TYPE(igraph_vector) tmp;
  ------------------
  |  |  182|  4.29M|        #define TYPE(a) CONCAT3(a,SHORT,t)
  |  |  ------------------
  |  |  |  |   22|  4.29M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  4.29M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2549|       |
 2550|  4.29M|    tmp = *v1;
 2551|  4.29M|    *v1 = *v2;
 2552|  4.29M|    *v2 = tmp;
 2553|  4.29M|}
vector.c:igraph_vector_int_sort_cmp:
  924|   110k|static int FUNCTION(igraph_vector, sort_cmp)(const void *a, const void *b) {
  925|   110k|    const BASE *da = (const BASE *) a;
  926|   110k|    const BASE *db = (const BASE *) b;
  927|       |
  928|   110k|    return (*da > *db) - (*da < *db);
  929|   110k|}
vector.c:igraph_i_vector_int_binsearch_slice:
 2183|   119k|        BASE what, igraph_int_t *pos, igraph_int_t start, igraph_int_t end) {
 2184|   119k|    igraph_int_t left  = start;
 2185|   119k|    igraph_int_t right = end - 1;
 2186|       |
 2187|   206k|    while (left <= right) {
  ------------------
  |  Branch (2187:12): [True: 146k, False: 59.5k]
  ------------------
 2188|       |        /* (right + left) / 2 could theoretically overflow for long vectors */
 2189|   146k|        igraph_int_t middle = left + ((right - left) >> 1);
 2190|   146k|        if (VECTOR(*v)[middle] > what) {
  ------------------
  |  |   60|   146k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2190:13): [True: 39.0k, False: 107k]
  ------------------
 2191|  39.0k|            right = middle - 1;
 2192|   107k|        } else if (VECTOR(*v)[middle] < what) {
  ------------------
  |  |   60|   107k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2192:20): [True: 48.3k, False: 59.5k]
  ------------------
 2193|  48.3k|            left = middle + 1;
 2194|  59.5k|        } else {
 2195|  59.5k|            if (pos != 0) {
  ------------------
  |  Branch (2195:17): [True: 59.5k, False: 0]
  ------------------
 2196|  59.5k|                *pos = middle;
 2197|  59.5k|            }
 2198|  59.5k|            return true;
 2199|  59.5k|        }
 2200|   146k|    }
 2201|       |
 2202|       |    /* if we are here, the element was not found */
 2203|  59.5k|    if (pos != 0) {
  ------------------
  |  Branch (2203:9): [True: 59.5k, False: 0]
  ------------------
 2204|  59.5k|        *pos = left;
 2205|  59.5k|    }
 2206|       |
 2207|       |    return false;
 2208|   119k|}

igraph_find_cycle:
  214|  2.00k|                                 igraph_neimode_t mode) {
  215|       |
  216|       |    /* If the graph is cached to be acyclic, we don't need to run the algorithm. */
  217|       |
  218|  2.00k|    igraph_bool_t known_acyclic = false;
  219|  2.00k|    igraph_bool_t found;
  220|       |
  221|  2.00k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (221:9): [True: 2.00k, False: 0]
  |  Branch (221:31): [True: 0, False: 2.00k]
  |  Branch (221:52): [True: 0, False: 0]
  ------------------
  222|      0|        IGRAPH_ERROR("Invalid mode for finding cycles.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  223|      0|    }
  224|       |
  225|  2.00k|    if (! igraph_is_directed(graph)) {
  ------------------
  |  Branch (225:9): [True: 0, False: 2.00k]
  ------------------
  226|      0|        mode = IGRAPH_ALL;
  227|      0|    }
  228|       |
  229|  2.00k|    if (mode == IGRAPH_ALL) /* undirected */ {
  ------------------
  |  Branch (229:9): [True: 0, False: 2.00k]
  ------------------
  230|      0|        if (igraph_i_property_cache_has(graph, IGRAPH_PROP_IS_FOREST) &&
  ------------------
  |  Branch (230:13): [True: 0, False: 0]
  ------------------
  231|      0|            igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_IS_FOREST)) {
  ------------------
  |  Branch (231:13): [True: 0, False: 0]
  ------------------
  232|      0|            known_acyclic = true;
  233|      0|        }
  234|  2.00k|    } else /* directed */ {
  235|  2.00k|        if (igraph_i_property_cache_has(graph, IGRAPH_PROP_IS_DAG) &&
  ------------------
  |  Branch (235:13): [True: 0, False: 2.00k]
  ------------------
  236|      0|            igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_IS_DAG)) {
  ------------------
  |  Branch (236:13): [True: 0, False: 0]
  ------------------
  237|      0|            known_acyclic = true;
  238|      0|        }
  239|  2.00k|    }
  240|       |
  241|  2.00k|    if (known_acyclic) {
  ------------------
  |  Branch (241:9): [True: 0, False: 2.00k]
  ------------------
  242|      0|        if (vertices) {
  ------------------
  |  Branch (242:13): [True: 0, False: 0]
  ------------------
  243|      0|            igraph_vector_int_clear(vertices);
  244|      0|        }
  245|      0|        if (edges) {
  ------------------
  |  Branch (245:13): [True: 0, False: 0]
  ------------------
  246|      0|            igraph_vector_int_clear(edges);
  247|      0|        }
  248|      0|        return IGRAPH_SUCCESS;
  249|      0|    }
  250|       |
  251|  2.00k|    IGRAPH_CHECK(igraph_i_find_cycle(graph, vertices, edges, &found, mode, NULL));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  252|       |
  253|  2.00k|    if (! found) {
  ------------------
  |  Branch (253:9): [True: 718, False: 1.28k]
  ------------------
  254|    718|        if (mode == IGRAPH_ALL) /* undirected */ {
  ------------------
  |  Branch (254:13): [True: 0, False: 718]
  ------------------
  255|      0|            igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_FOREST, true);
  256|    718|        } else /* directed */ {
  257|    718|            igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_DAG, true);
  258|    718|        }
  259|    718|    }
  260|       |
  261|  2.00k|    return IGRAPH_SUCCESS;
  262|  2.00k|}
igraph_feedback_arc_set:
  350|  2.00k|        igraph_fas_algorithm_t algo) {
  351|       |
  352|  2.00k|    if (weights) {
  ------------------
  |  Branch (352:9): [True: 0, False: 2.00k]
  ------------------
  353|      0|        if (igraph_vector_size(weights) != igraph_ecount(graph)) {
  ------------------
  |  Branch (353:13): [True: 0, False: 0]
  ------------------
  354|      0|            IGRAPH_ERROR("Weight vector length must match the number of edges.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  355|      0|        }
  356|      0|        if (! igraph_vector_is_all_finite(weights)) {
  ------------------
  |  Branch (356:13): [True: 0, False: 0]
  ------------------
  357|      0|            IGRAPH_ERROR("Weights must not be infinite or NaN.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  358|      0|        }
  359|      0|    }
  360|       |
  361|  2.00k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (361:9): [True: 0, False: 2.00k]
  ------------------
  362|      0|        return igraph_i_feedback_arc_set_undirected(graph, result, weights, NULL);
  363|      0|    }
  364|       |
  365|  2.00k|    switch (algo) {
  366|      0|    case IGRAPH_FAS_EXACT_IP:
  ------------------
  |  Branch (366:5): [True: 0, False: 2.00k]
  ------------------
  367|      0|    case IGRAPH_FAS_EXACT_IP_CG:
  ------------------
  |  Branch (367:5): [True: 0, False: 2.00k]
  ------------------
  368|      0|        return igraph_i_feedback_arc_set_ip_cg(graph, result, weights);
  369|       |
  370|      0|    case IGRAPH_FAS_EXACT_IP_TI:
  ------------------
  |  Branch (370:5): [True: 0, False: 2.00k]
  ------------------
  371|      0|        return igraph_i_feedback_arc_set_ip_ti(graph, result, weights);
  372|       |
  373|  2.00k|    case IGRAPH_FAS_APPROX_EADES:
  ------------------
  |  Branch (373:5): [True: 2.00k, False: 0]
  ------------------
  374|  2.00k|        return igraph_i_feedback_arc_set_eades(graph, result, weights, NULL);
  375|       |
  376|      0|    default:
  ------------------
  |  Branch (376:5): [True: 0, False: 2.00k]
  ------------------
  377|      0|        IGRAPH_ERROR("Invalid feedback arc set algorithm.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  378|  2.00k|    }
  379|  2.00k|}
igraph_i_feedback_arc_set_eades:
  513|  2.00k|                                    const igraph_vector_t *weights, igraph_vector_int_t *layers) {
  514|  2.00k|    const igraph_int_t no_of_nodes = igraph_vcount(graph);
  515|  2.00k|    const igraph_int_t no_of_edges = igraph_ecount(graph);
  516|  2.00k|    igraph_int_t nodes_left;
  517|  2.00k|    igraph_int_t neis_size;
  518|  2.00k|    igraph_dqueue_int_t sources, sinks;
  519|  2.00k|    igraph_vector_int_t neis;
  520|  2.00k|    igraph_vector_int_t indegrees, outdegrees;
  521|  2.00k|    igraph_vector_t instrengths, outstrengths;
  522|  2.00k|    igraph_vector_int_t ordering;
  523|  2.00k|    igraph_int_t order_next_pos = 0, order_next_neg = -1;
  524|       |
  525|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&ordering, no_of_nodes);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  526|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  527|       |
  528|  2.00k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&sources, 0);
  ------------------
  |  |   61|  2.00k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.00k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  529|  2.00k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&sinks, 0);
  ------------------
  |  |   61|  2.00k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.00k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  530|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&indegrees, no_of_nodes);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  531|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&outdegrees, no_of_nodes);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  532|  2.00k|    IGRAPH_VECTOR_INIT_FINALLY(&instrengths, no_of_nodes);
  ------------------
  |  |  104|  2.00k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  2.00k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  533|  2.00k|    IGRAPH_VECTOR_INIT_FINALLY(&outstrengths, no_of_nodes);
  ------------------
  |  |  104|  2.00k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  2.00k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  534|       |
  535|  2.00k|    IGRAPH_CHECK(igraph_degree(graph, &indegrees, igraph_vss_all(), IGRAPH_IN, IGRAPH_NO_LOOPS));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  536|  2.00k|    IGRAPH_CHECK(igraph_degree(graph, &outdegrees, igraph_vss_all(), IGRAPH_OUT, IGRAPH_NO_LOOPS));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  537|       |
  538|  2.00k|    if (weights) {
  ------------------
  |  Branch (538:9): [True: 0, False: 2.00k]
  ------------------
  539|      0|        IGRAPH_CHECK(igraph_strength(graph, &instrengths, igraph_vss_all(), IGRAPH_IN, IGRAPH_NO_LOOPS, weights));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  540|      0|        IGRAPH_CHECK(igraph_strength(graph, &outstrengths, igraph_vss_all(), IGRAPH_OUT, IGRAPH_NO_LOOPS, weights));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  541|  2.00k|    } else {
  542|   334k|        for (igraph_int_t u = 0; u < no_of_nodes; u++) {
  ------------------
  |  Branch (542:34): [True: 332k, False: 2.00k]
  ------------------
  543|   332k|            VECTOR(instrengths)[u] = VECTOR(indegrees)[u];
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(instrengths)[u] = VECTOR(indegrees)[u];
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  544|   332k|            VECTOR(outstrengths)[u] = VECTOR(outdegrees)[u];
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(outstrengths)[u] = VECTOR(outdegrees)[u];
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  545|   332k|        }
  546|  2.00k|    }
  547|       |
  548|       |    /* Find initial sources and sinks */
  549|  2.00k|    nodes_left = no_of_nodes;
  550|   334k|    for (igraph_int_t u = 0; u < no_of_nodes; u++) {
  ------------------
  |  Branch (550:30): [True: 332k, False: 2.00k]
  ------------------
  551|   332k|        if (VECTOR(indegrees)[u] == 0) {
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (551:13): [True: 295k, False: 37.1k]
  ------------------
  552|   295k|            if (VECTOR(outdegrees)[u] == 0) {
  ------------------
  |  |   60|   295k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (552:17): [True: 284k, False: 11.3k]
  ------------------
  553|       |                /* Isolated vertex, we simply ignore it */
  554|   284k|                nodes_left--;
  555|   284k|                VECTOR(ordering)[u] = order_next_pos++;
  ------------------
  |  |   60|   284k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  556|   284k|                VECTOR(indegrees)[u] = VECTOR(outdegrees)[u] = -1;
  ------------------
  |  |   60|   284k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(indegrees)[u] = VECTOR(outdegrees)[u] = -1;
  ------------------
  |  |   60|   284k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  557|   284k|            } else {
  558|       |                /* This is a source */
  559|  11.3k|                IGRAPH_CHECK(igraph_dqueue_int_push(&sources, u));
  ------------------
  |  |  656|  11.3k|    do { \
  |  |  657|  11.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  11.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  11.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 11.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  11.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  560|  11.3k|            }
  561|   295k|        } else if (VECTOR(outdegrees)[u] == 0) {
  ------------------
  |  |   60|  37.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (561:20): [True: 10.5k, False: 26.6k]
  ------------------
  562|       |            /* This is a sink */
  563|  10.5k|            IGRAPH_CHECK(igraph_dqueue_int_push(&sinks, u));
  ------------------
  |  |  656|  10.5k|    do { \
  |  |  657|  10.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  10.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  10.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 10.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  10.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 10.5k]
  |  |  ------------------
  ------------------
  564|  10.5k|        }
  565|   332k|    }
  566|       |
  567|       |    /* While we have any nodes left... */
  568|  6.51k|    while (nodes_left > 0) {
  ------------------
  |  Branch (568:12): [True: 4.51k, False: 2.00k]
  ------------------
  569|       |
  570|       |        /* (1) Remove the sources one by one */
  571|  44.6k|        while (!igraph_dqueue_int_empty(&sources)) {
  ------------------
  |  Branch (571:16): [True: 40.0k, False: 4.51k]
  ------------------
  572|  40.0k|            const igraph_int_t u = igraph_dqueue_int_pop(&sources);
  573|       |            /* Add the node to the ordering */
  574|  40.0k|            VECTOR(ordering)[u] = order_next_pos++;
  ------------------
  |  |   60|  40.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  575|       |            /* Exclude the node from further searches */
  576|  40.0k|            VECTOR(indegrees)[u] = VECTOR(outdegrees)[u] = -1;
  ------------------
  |  |   60|  40.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(indegrees)[u] = VECTOR(outdegrees)[u] = -1;
  ------------------
  |  |   60|  40.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  577|       |            /* Get the neighbors and decrease their degrees */
  578|  40.0k|            IGRAPH_CHECK(igraph_incident(graph, &neis, u, IGRAPH_OUT, IGRAPH_LOOPS));
  ------------------
  |  |  656|  40.0k|    do { \
  |  |  657|  40.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  40.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  40.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 40.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  40.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 40.0k]
  |  |  ------------------
  ------------------
  579|  40.0k|            neis_size = igraph_vector_int_size(&neis);
  580|  96.5k|            for (igraph_int_t i = 0; i < neis_size; i++) {
  ------------------
  |  Branch (580:38): [True: 56.4k, False: 40.0k]
  ------------------
  581|  56.4k|                const igraph_int_t eid = VECTOR(neis)[i];
  ------------------
  |  |   60|  56.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  582|  56.4k|                const igraph_int_t w = IGRAPH_TO(graph, eid);
  ------------------
  |  |  128|  56.4k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  56.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  583|  56.4k|                if (VECTOR(indegrees)[w] <= 0) {
  ------------------
  |  |   60|  56.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (583:21): [True: 16.9k, False: 39.4k]
  ------------------
  584|       |                    /* Already removed, continue */
  585|  16.9k|                    continue;
  586|  16.9k|                }
  587|  39.4k|                VECTOR(indegrees)[w]--;
  ------------------
  |  |   60|  39.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  588|  39.4k|                VECTOR(instrengths)[w] -= (weights ? VECTOR(*weights)[eid] : 1.0);
  ------------------
  |  |   60|  39.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(instrengths)[w] -= (weights ? VECTOR(*weights)[eid] : 1.0);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (588:44): [True: 0, False: 39.4k]
  ------------------
  589|  39.4k|                if (VECTOR(indegrees)[w] == 0) {
  ------------------
  |  |   60|  39.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (589:21): [True: 24.8k, False: 14.6k]
  ------------------
  590|  24.8k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&sources, w));
  ------------------
  |  |  656|  24.8k|    do { \
  |  |  657|  24.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  24.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  24.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 24.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  24.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 24.8k]
  |  |  ------------------
  ------------------
  591|  24.8k|                }
  592|  39.4k|            }
  593|  40.0k|            nodes_left--;
  594|  40.0k|        }
  595|       |
  596|       |        /* (2) Remove the sinks one by one */
  597|  19.8k|        while (!igraph_dqueue_int_empty(&sinks)) {
  ------------------
  |  Branch (597:16): [True: 15.3k, False: 4.51k]
  ------------------
  598|  15.3k|            const igraph_int_t u = igraph_dqueue_int_pop(&sinks);
  599|       |            /* Maybe the vertex became sink and source at the same time, hence it
  600|       |             * was already removed in the previous iteration. Check it. */
  601|  15.3k|            if (VECTOR(indegrees)[u] < 0) {
  ------------------
  |  |   60|  15.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (601:17): [True: 9.41k, False: 5.92k]
  ------------------
  602|  9.41k|                continue;
  603|  9.41k|            }
  604|       |            /* Add the node to the ordering */
  605|  5.92k|            VECTOR(ordering)[u] = order_next_neg--;
  ------------------
  |  |   60|  5.92k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  606|       |            /* Exclude the node from further searches */
  607|  5.92k|            VECTOR(indegrees)[u] = VECTOR(outdegrees)[u] = -1;
  ------------------
  |  |   60|  5.92k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(indegrees)[u] = VECTOR(outdegrees)[u] = -1;
  ------------------
  |  |   60|  5.92k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  608|       |            /* Get the neighbors and decrease their degrees */
  609|  5.92k|            IGRAPH_CHECK(igraph_incident(graph, &neis, u, IGRAPH_IN, IGRAPH_LOOPS));
  ------------------
  |  |  656|  5.92k|    do { \
  |  |  657|  5.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  5.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.92k]
  |  |  ------------------
  ------------------
  610|  5.92k|            neis_size = igraph_vector_int_size(&neis);
  611|  14.5k|            for (igraph_int_t i = 0; i < neis_size; i++) {
  ------------------
  |  Branch (611:38): [True: 8.61k, False: 5.92k]
  ------------------
  612|  8.61k|                const igraph_int_t eid = VECTOR(neis)[i];
  ------------------
  |  |   60|  8.61k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  613|  8.61k|                const igraph_int_t w = IGRAPH_FROM(graph, eid);
  ------------------
  |  |  115|  8.61k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  8.61k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  614|  8.61k|                if (VECTOR(outdegrees)[w] <= 0) {
  ------------------
  |  |   60|  8.61k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (614:21): [True: 1.25k, False: 7.36k]
  ------------------
  615|       |                    /* Already removed, continue */
  616|  1.25k|                    continue;
  617|  1.25k|                }
  618|  7.36k|                VECTOR(outdegrees)[w]--;
  ------------------
  |  |   60|  7.36k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  619|  7.36k|                VECTOR(outstrengths)[w] -= (weights ? VECTOR(*weights)[eid] : 1.0);
  ------------------
  |  |   60|  7.36k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(outstrengths)[w] -= (weights ? VECTOR(*weights)[eid] : 1.0);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (619:45): [True: 0, False: 7.36k]
  ------------------
  620|  7.36k|                if (VECTOR(outdegrees)[w] == 0) {
  ------------------
  |  |   60|  7.36k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (620:21): [True: 3.27k, False: 4.08k]
  ------------------
  621|  3.27k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&sinks, w));
  ------------------
  |  |  656|  3.27k|    do { \
  |  |  657|  3.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  3.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  3.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  3.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 3.27k]
  |  |  ------------------
  ------------------
  622|  3.27k|                }
  623|  7.36k|            }
  624|  5.92k|            nodes_left--;
  625|  5.92k|        }
  626|       |
  627|       |        /* (3) No more sources or sinks. Find the node with the largest
  628|       |         * difference between its out-strength and in-strength */
  629|  4.51k|        igraph_int_t v = -1;
  630|  4.51k|        igraph_real_t maxdiff = -IGRAPH_INFINITY;
  ------------------
  |  |  139|  4.51k|#define IGRAPH_INFINITY ((double)INFINITY)
  ------------------
  631|   908k|        for (igraph_int_t u = 0; u < no_of_nodes; u++) {
  ------------------
  |  Branch (631:34): [True: 903k, False: 4.51k]
  ------------------
  632|   903k|            if (VECTOR(outdegrees)[u] < 0) {
  ------------------
  |  |   60|   903k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (632:17): [True: 816k, False: 86.8k]
  ------------------
  633|   816k|                continue;
  634|   816k|            }
  635|  86.8k|            igraph_real_t diff = VECTOR(outstrengths)[u] - VECTOR(instrengths)[u];
  ------------------
  |  |   60|  86.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          igraph_real_t diff = VECTOR(outstrengths)[u] - VECTOR(instrengths)[u];
  ------------------
  |  |   60|  86.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  636|  86.8k|            if (diff > maxdiff) {
  ------------------
  |  Branch (636:17): [True: 4.29k, False: 82.5k]
  ------------------
  637|  4.29k|                maxdiff = diff;
  638|  4.29k|                v = u;
  639|  4.29k|            }
  640|  86.8k|        }
  641|  4.51k|        if (v >= 0) {
  ------------------
  |  Branch (641:13): [True: 2.71k, False: 1.79k]
  ------------------
  642|       |            /* Remove vertex v */
  643|  2.71k|            VECTOR(ordering)[v] = order_next_pos++;
  ------------------
  |  |   60|  2.71k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  644|       |            /* Remove outgoing edges */
  645|  2.71k|            IGRAPH_CHECK(igraph_incident(graph, &neis, v, IGRAPH_OUT, IGRAPH_LOOPS));
  ------------------
  |  |  656|  2.71k|    do { \
  |  |  657|  2.71k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.71k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.71k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.71k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.71k]
  |  |  ------------------
  ------------------
  646|  2.71k|            neis_size = igraph_vector_int_size(&neis);
  647|  17.5k|            for (igraph_int_t i = 0; i < neis_size; i++) {
  ------------------
  |  Branch (647:38): [True: 14.8k, False: 2.71k]
  ------------------
  648|  14.8k|                const igraph_int_t eid = VECTOR(neis)[i];
  ------------------
  |  |   60|  14.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  649|  14.8k|                const igraph_int_t w = IGRAPH_TO(graph, eid);
  ------------------
  |  |  128|  14.8k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  14.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  650|  14.8k|                if (VECTOR(indegrees)[w] <= 0) {
  ------------------
  |  |   60|  14.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (650:21): [True: 4.63k, False: 10.1k]
  ------------------
  651|       |                    /* Already removed, continue */
  652|  4.63k|                    continue;
  653|  4.63k|                }
  654|  10.1k|                VECTOR(indegrees)[w]--;
  ------------------
  |  |   60|  10.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  655|  10.1k|                VECTOR(instrengths)[w] -= (weights ? VECTOR(*weights)[eid] : 1.0);
  ------------------
  |  |   60|  10.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(instrengths)[w] -= (weights ? VECTOR(*weights)[eid] : 1.0);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (655:44): [True: 0, False: 10.1k]
  ------------------
  656|  10.1k|                if (VECTOR(indegrees)[w] == 0) {
  ------------------
  |  |   60|  10.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (656:21): [True: 3.91k, False: 6.28k]
  ------------------
  657|  3.91k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&sources, w));
  ------------------
  |  |  656|  3.91k|    do { \
  |  |  657|  3.91k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  3.91k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  3.91k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.91k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  3.91k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 3.91k]
  |  |  ------------------
  ------------------
  658|  3.91k|                }
  659|  10.1k|            }
  660|       |            /* Remove incoming edges */
  661|  2.71k|            IGRAPH_CHECK(igraph_incident(graph, &neis, v, IGRAPH_IN, IGRAPH_LOOPS));
  ------------------
  |  |  656|  2.71k|    do { \
  |  |  657|  2.71k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.71k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.71k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.71k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.71k]
  |  |  ------------------
  ------------------
  662|  2.71k|            neis_size = igraph_vector_int_size(&neis);
  663|  14.2k|            for (igraph_int_t i = 0; i < neis_size; i++) {
  ------------------
  |  Branch (663:38): [True: 11.5k, False: 2.71k]
  ------------------
  664|  11.5k|                const igraph_int_t eid = VECTOR(neis)[i];
  ------------------
  |  |   60|  11.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  665|  11.5k|                const igraph_int_t w = IGRAPH_FROM(graph, eid);
  ------------------
  |  |  115|  11.5k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  11.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  666|  11.5k|                if (VECTOR(outdegrees)[w] <= 0) {
  ------------------
  |  |   60|  11.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (666:21): [True: 5.09k, False: 6.44k]
  ------------------
  667|       |                    /* Already removed, continue */
  668|  5.09k|                    continue;
  669|  5.09k|                }
  670|  6.44k|                VECTOR(outdegrees)[w]--;
  ------------------
  |  |   60|  6.44k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  671|  6.44k|                VECTOR(outstrengths)[w] -= (weights ? VECTOR(*weights)[eid] : 1.0);
  ------------------
  |  |   60|  6.44k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(outstrengths)[w] -= (weights ? VECTOR(*weights)[eid] : 1.0);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (671:45): [True: 0, False: 6.44k]
  ------------------
  672|  6.44k|                if (VECTOR(outdegrees)[w] == 0 && VECTOR(indegrees)[w] > 0) {
  ------------------
  |  |   60|  6.44k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (VECTOR(outdegrees)[w] == 0 && VECTOR(indegrees)[w] > 0) {
  ------------------
  |  |   60|  3.20k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (672:21): [True: 3.20k, False: 3.23k]
  |  Branch (672:51): [True: 1.49k, False: 1.70k]
  ------------------
  673|  1.49k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&sinks, w));
  ------------------
  |  |  656|  1.49k|    do { \
  |  |  657|  1.49k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.49k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.49k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.49k]
  |  |  ------------------
  ------------------
  674|  1.49k|                }
  675|  6.44k|            }
  676|       |
  677|  2.71k|            VECTOR(outdegrees)[v] = -1;
  ------------------
  |  |   60|  2.71k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  678|  2.71k|            VECTOR(indegrees)[v] = -1;
  ------------------
  |  |   60|  2.71k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  679|  2.71k|            nodes_left--;
  680|  2.71k|        }
  681|  4.51k|    }
  682|       |
  683|  2.00k|    igraph_vector_destroy(&outstrengths);
  684|  2.00k|    igraph_vector_destroy(&instrengths);
  685|  2.00k|    igraph_vector_int_destroy(&outdegrees);
  686|  2.00k|    igraph_vector_int_destroy(&indegrees);
  687|  2.00k|    igraph_dqueue_int_destroy(&sinks);
  688|  2.00k|    igraph_dqueue_int_destroy(&sources);
  689|  2.00k|    IGRAPH_FINALLY_CLEAN(6);
  690|       |
  691|       |    /* Tidy up the ordering */
  692|   334k|    for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (692:30): [True: 332k, False: 2.00k]
  ------------------
  693|   332k|        if (VECTOR(ordering)[i] < 0) {
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (693:13): [True: 5.92k, False: 326k]
  ------------------
  694|  5.92k|            VECTOR(ordering)[i] += no_of_nodes;
  ------------------
  |  |   60|  5.92k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  695|  5.92k|        }
  696|   332k|    }
  697|       |
  698|       |    /* Find the feedback edges based on the ordering */
  699|  2.00k|    if (result) {
  ------------------
  |  Branch (699:9): [True: 2.00k, False: 0]
  ------------------
  700|  2.00k|        igraph_vector_int_clear(result);
  701|  76.9k|        for (igraph_int_t eid = 0; eid < no_of_edges; eid++) {
  ------------------
  |  Branch (701:36): [True: 74.9k, False: 2.00k]
  ------------------
  702|  74.9k|            igraph_int_t from = IGRAPH_FROM(graph, eid);
  ------------------
  |  |  115|  74.9k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  703|  74.9k|            igraph_int_t to = IGRAPH_TO(graph, eid);
  ------------------
  |  |  128|  74.9k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  704|  74.9k|            if (from == to || VECTOR(ordering)[from] > VECTOR(ordering)[to]) {
  ------------------
  |  |   60|  62.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (from == to || VECTOR(ordering)[from] > VECTOR(ordering)[to]) {
  ------------------
  |  |   60|  62.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (704:17): [True: 12.7k, False: 62.2k]
  |  Branch (704:31): [True: 6.25k, False: 55.9k]
  ------------------
  705|  18.9k|                IGRAPH_CHECK(igraph_vector_int_push_back(result, eid));
  ------------------
  |  |  656|  18.9k|    do { \
  |  |  657|  18.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  18.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  18.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 18.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  18.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 18.9k]
  |  |  ------------------
  ------------------
  706|  18.9k|            }
  707|  74.9k|        }
  708|  2.00k|    }
  709|       |
  710|       |    /* If we have also requested a layering, return that as well */
  711|  2.00k|    if (layers) {
  ------------------
  |  Branch (711:9): [True: 0, False: 2.00k]
  ------------------
  712|      0|        igraph_vector_int_t ranks;
  713|       |
  714|      0|        IGRAPH_CHECK(igraph_vector_int_resize(layers, no_of_nodes));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  715|      0|        igraph_vector_int_null(layers);
  716|       |
  717|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&ranks, 0);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  718|       |
  719|      0|        IGRAPH_CHECK(igraph_vector_int_sort_ind(&ordering, &ranks, IGRAPH_ASCENDING));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  720|       |
  721|      0|        for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (721:34): [True: 0, False: 0]
  ------------------
  722|      0|            igraph_int_t from = VECTOR(ranks)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  723|      0|            IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  724|      0|                graph, &neis, from, IGRAPH_OUT, IGRAPH_LOOPS, IGRAPH_MULTIPLE
  725|      0|            ));
  726|      0|            neis_size = igraph_vector_int_size(&neis);
  727|      0|            for (igraph_int_t j = 0; j < neis_size; j++) {
  ------------------
  |  Branch (727:38): [True: 0, False: 0]
  ------------------
  728|      0|                igraph_int_t to = VECTOR(neis)[j];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  729|      0|                if (from == to) {
  ------------------
  |  Branch (729:21): [True: 0, False: 0]
  ------------------
  730|      0|                    continue;
  731|      0|                }
  732|      0|                if (VECTOR(ordering)[from] > VECTOR(ordering)[to]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (VECTOR(ordering)[from] > VECTOR(ordering)[to]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (732:21): [True: 0, False: 0]
  ------------------
  733|      0|                    continue;
  734|      0|                }
  735|      0|                if (VECTOR(*layers)[to] < VECTOR(*layers)[from] + 1) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (VECTOR(*layers)[to] < VECTOR(*layers)[from] + 1) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (735:21): [True: 0, False: 0]
  ------------------
  736|      0|                    VECTOR(*layers)[to] = VECTOR(*layers)[from] + 1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*layers)[to] = VECTOR(*layers)[from] + 1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  737|      0|                }
  738|      0|            }
  739|      0|        }
  740|       |
  741|      0|        igraph_vector_int_destroy(&ranks);
  742|      0|        IGRAPH_FINALLY_CLEAN(1);
  743|      0|    }
  744|       |
  745|       |    /* Free the ordering vector */
  746|  2.00k|    igraph_vector_int_destroy(&neis);
  747|  2.00k|    igraph_vector_int_destroy(&ordering);
  748|  2.00k|    IGRAPH_FINALLY_CLEAN(2);
  749|       |
  750|  2.00k|    return IGRAPH_SUCCESS;
  751|  2.00k|}
feedback_sets.c:igraph_i_find_cycle:
   52|  2.00k|                                          const igraph_bitset_t *removed) {
   53|       |
   54|  2.00k|    const igraph_int_t vcount = igraph_vcount(graph);
   55|  2.00k|    const igraph_int_t ecount = igraph_ecount(graph);
   56|  2.00k|    igraph_stack_int_t stack;
   57|  2.00k|    igraph_vector_int_t inc;
   58|  2.00k|    igraph_vector_int_t vpath, epath;
   59|  2.00k|    igraph_vector_char_t seen; /* 0 = unseen, 1 = acestor of current, 2 = seen, non-ancestor */
   60|  2.00k|    igraph_int_t ea, va;
   61|  2.00k|    igraph_int_t depth;
   62|       |
   63|  2.00k|    if (vertices) {
  ------------------
  |  Branch (63:9): [True: 2.00k, False: 0]
  ------------------
   64|  2.00k|        igraph_vector_int_clear(vertices);
   65|  2.00k|    }
   66|  2.00k|    if (edges) {
  ------------------
  |  Branch (66:9): [True: 2.00k, False: 0]
  ------------------
   67|  2.00k|        igraph_vector_int_clear(edges);
   68|  2.00k|    }
   69|  2.00k|    if (found) {
  ------------------
  |  Branch (69:9): [True: 2.00k, False: 0]
  ------------------
   70|  2.00k|        *found = false;
   71|  2.00k|    }
   72|       |
   73|  2.00k|    if (ecount == 0) {
  ------------------
  |  Branch (73:9): [True: 106, False: 1.89k]
  ------------------
   74|    106|        return IGRAPH_SUCCESS;
   75|    106|    }
   76|       |
   77|  1.89k|#define PATH_PUSH(v, e) \
   78|  1.89k|    do { \
   79|  1.89k|        IGRAPH_CHECK(igraph_vector_int_push_back(&epath, e)); \
   80|  1.89k|        IGRAPH_CHECK(igraph_vector_int_push_back(&vpath, v)); \
   81|  1.89k|        VECTOR(seen)[v] = 1; \
   82|  1.89k|    } while (0)
   83|       |
   84|  1.89k|#define PATH_POP() \
   85|  1.89k|    do { \
   86|  1.89k|        igraph_vector_int_pop_back(&epath); \
   87|  1.89k|        VECTOR(seen)[igraph_vector_int_pop_back(&vpath)] = 2; \
   88|  1.89k|    } while (0)
   89|       |
   90|  1.89k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&vpath, 100);
  ------------------
  |  |  119|  1.89k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.89k|    do { \
  |  |  |  |  657|  1.89k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.89k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.89k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.89k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.89k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.89k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.89k|    do { \
  |  |  |  |  604|  1.89k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.89k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.89k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.89k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.89k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.89k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.89k]
  |  |  ------------------
  ------------------
   91|  1.89k|    igraph_vector_int_clear(&vpath);
   92|       |
   93|  1.89k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&epath, 100);
  ------------------
  |  |  119|  1.89k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.89k|    do { \
  |  |  |  |  657|  1.89k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.89k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.89k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.89k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.89k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.89k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.89k|    do { \
  |  |  |  |  604|  1.89k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.89k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.89k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.89k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.89k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.89k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.89k]
  |  |  ------------------
  ------------------
   94|  1.89k|    igraph_vector_int_clear(&epath);
   95|       |
   96|  1.89k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&inc, 10);
  ------------------
  |  |  119|  1.89k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.89k|    do { \
  |  |  |  |  657|  1.89k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.89k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.89k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.89k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.89k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.89k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.89k|    do { \
  |  |  |  |  604|  1.89k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.89k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.89k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.89k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.89k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.89k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.89k]
  |  |  ------------------
  ------------------
   97|  1.89k|    IGRAPH_VECTOR_CHAR_INIT_FINALLY(&seen, vcount);
  ------------------
  |  |  114|  1.89k|  do { IGRAPH_CHECK(igraph_vector_char_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.89k|    do { \
  |  |  |  |  657|  1.89k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.89k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.89k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.89k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.89k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|  1.89k|  IGRAPH_FINALLY(igraph_vector_char_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.89k|    do { \
  |  |  |  |  604|  1.89k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.89k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.89k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.89k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.89k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.89k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (115:59): [Folded, False: 1.89k]
  |  |  ------------------
  ------------------
   98|  1.89k|    IGRAPH_STACK_INT_INIT_FINALLY(&stack, 200);
  ------------------
  |  |   61|  1.89k|    do { IGRAPH_CHECK(igraph_stack_int_init(s, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  1.89k|    do { \
  |  |  |  |  657|  1.89k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.89k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.89k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.89k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.89k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  1.89k|        IGRAPH_FINALLY(igraph_stack_int_destroy, s); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.89k|    do { \
  |  |  |  |  604|  1.89k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.89k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.89k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.89k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.89k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.89k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:63): [Folded, False: 1.89k]
  |  |  ------------------
  ------------------
   99|       |
  100|   124k|    for (igraph_int_t v=0; v < vcount; v++) {
  ------------------
  |  Branch (100:28): [True: 124k, False: 612]
  ------------------
  101|   124k|        if (VECTOR(seen)[v]) {
  ------------------
  |  |   60|   124k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (101:13): [True: 4.30k, False: 119k]
  ------------------
  102|  4.30k|            continue;
  103|  4.30k|        }
  104|       |
  105|   119k|        IGRAPH_CHECK(igraph_stack_int_push(&stack, -1));
  ------------------
  |  |  656|   119k|    do { \
  |  |  657|   119k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   119k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   119k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 119k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   119k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 119k]
  |  |  ------------------
  ------------------
  106|   119k|        IGRAPH_CHECK(igraph_stack_int_push(&stack, v));
  ------------------
  |  |  656|   119k|    do { \
  |  |  657|   119k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   119k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   119k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 119k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   119k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 119k]
  |  |  ------------------
  ------------------
  107|       |
  108|   381k|        while (! igraph_stack_int_empty(&stack)) {
  ------------------
  |  Branch (108:16): [True: 262k, False: 118k]
  ------------------
  109|   262k|            igraph_int_t x = igraph_stack_int_pop(&stack);
  110|   262k|            if (x == -1) {
  ------------------
  |  Branch (110:17): [True: 124k, False: 138k]
  ------------------
  111|   124k|                PATH_POP();
  ------------------
  |  |   85|   124k|    do { \
  |  |   86|   124k|        igraph_vector_int_pop_back(&epath); \
  |  |   87|   124k|        VECTOR(seen)[igraph_vector_int_pop_back(&vpath)] = 2; \
  |  |  ------------------
  |  |  |  |   60|   124k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |   88|   124k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (88:14): [Folded, False: 124k]
  |  |  ------------------
  ------------------
  112|   124k|                continue;
  113|   138k|            } else {
  114|   138k|                va = x;
  115|   138k|                ea = igraph_stack_int_pop(&stack);
  116|       |
  117|   138k|                if (VECTOR(seen)[va] == 1) {
  ------------------
  |  |   60|   138k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (117:21): [True: 1.28k, False: 136k]
  ------------------
  118|  1.28k|                    goto finish;
  119|   136k|                } else if (VECTOR(seen)[va] == 2) {
  ------------------
  |  |   60|   136k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (119:28): [True: 1.37k, False: 135k]
  ------------------
  120|  1.37k|                    continue;
  121|  1.37k|                }
  122|   138k|            }
  123|       |
  124|   135k|            PATH_PUSH(va, ea);
  ------------------
  |  |   78|   135k|    do { \
  |  |   79|   135k|        IGRAPH_CHECK(igraph_vector_int_push_back(&epath, e)); \
  |  |  ------------------
  |  |  |  |  656|   135k|    do { \
  |  |  |  |  657|   135k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|   135k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|   135k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 135k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|   135k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 135k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|   135k|        IGRAPH_CHECK(igraph_vector_int_push_back(&vpath, v)); \
  |  |  ------------------
  |  |  |  |  656|   135k|    do { \
  |  |  |  |  657|   135k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|   135k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|   135k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 135k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|   135k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 135k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   81|   135k|        VECTOR(seen)[v] = 1; \
  |  |  ------------------
  |  |  |  |   60|   135k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |   82|   135k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (82:14): [Folded, False: 135k]
  |  |  ------------------
  ------------------
  125|       |
  126|   135k|            IGRAPH_CHECK(igraph_stack_int_push(&stack, -1));
  ------------------
  |  |  656|   135k|    do { \
  |  |  657|   135k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   135k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   135k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 135k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   135k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 135k]
  |  |  ------------------
  ------------------
  127|   135k|            IGRAPH_CHECK(igraph_incident(graph, &inc, va, mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|   135k|    do { \
  |  |  657|   135k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   135k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   135k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 135k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   135k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 135k]
  |  |  ------------------
  ------------------
  128|   135k|            igraph_int_t n = igraph_vector_int_size(&inc);
  129|   182k|            for (igraph_int_t i=0; i < n; i++) {
  ------------------
  |  Branch (129:36): [True: 46.9k, False: 135k]
  ------------------
  130|  46.9k|                igraph_int_t eb = VECTOR(inc)[i];
  ------------------
  |  |   60|  46.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  131|  46.9k|                igraph_int_t vb = IGRAPH_OTHER(graph, eb, va);
  ------------------
  |  |  146|  46.9k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  46.9k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  46.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  46.9k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  46.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 46.9k, False: 0]
  |  |  ------------------
  ------------------
  132|  46.9k|                if (eb == ea) continue;
  ------------------
  |  Branch (132:21): [True: 0, False: 46.9k]
  ------------------
  133|  46.9k|                if (VECTOR(seen)[vb] == 2) continue;
  ------------------
  |  |   60|  46.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (133:21): [True: 8.49k, False: 38.4k]
  ------------------
  134|  38.4k|                if (removed && IGRAPH_BIT_TEST(*removed, eb)) continue;
  ------------------
  |  |  142|      0|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|      0|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|      0|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|      0|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|      0|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (142:36): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (134:21): [True: 0, False: 38.4k]
  ------------------
  135|  38.4k|                IGRAPH_CHECK(igraph_stack_int_push(&stack, eb));
  ------------------
  |  |  656|  38.4k|    do { \
  |  |  657|  38.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  38.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  38.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 38.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  38.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 38.4k]
  |  |  ------------------
  ------------------
  136|  38.4k|                IGRAPH_CHECK(igraph_stack_int_push(&stack, vb));
  ------------------
  |  |  656|  38.4k|    do { \
  |  |  657|  38.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  38.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  38.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 38.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  38.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 38.4k]
  |  |  ------------------
  ------------------
  137|  38.4k|            }
  138|   135k|        }
  139|   119k|    }
  140|       |
  141|       |
  142|  1.89k|finish:
  143|       |
  144|  1.89k|    igraph_stack_int_destroy(&stack);
  145|  1.89k|    igraph_vector_char_destroy(&seen);
  146|  1.89k|    igraph_vector_int_destroy(&inc);
  147|  1.89k|    IGRAPH_FINALLY_CLEAN(3);
  148|       |
  149|  1.89k|    depth = igraph_vector_int_size(&vpath);
  150|       |
  151|  1.89k|    if (depth > 0) {
  ------------------
  |  Branch (151:9): [True: 1.28k, False: 612]
  ------------------
  152|  1.28k|        igraph_int_t i = depth;
  153|  8.63k|        while (VECTOR(vpath)[i-1] != va) i--;
  ------------------
  |  |   60|  8.63k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (153:16): [True: 7.34k, False: 1.28k]
  ------------------
  154|  8.63k|        for (; i < depth; i++) {
  ------------------
  |  Branch (154:16): [True: 7.34k, False: 1.28k]
  ------------------
  155|  7.34k|            if (vertices) {
  ------------------
  |  Branch (155:17): [True: 7.34k, False: 0]
  ------------------
  156|  7.34k|                IGRAPH_CHECK(igraph_vector_int_push_back(vertices, VECTOR(vpath)[i]));
  ------------------
  |  |  656|  7.34k|    do { \
  |  |  657|  7.34k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  7.34k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  7.34k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.34k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  7.34k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 7.34k]
  |  |  ------------------
  ------------------
  157|  7.34k|            }
  158|  7.34k|            if (edges) {
  ------------------
  |  Branch (158:17): [True: 7.34k, False: 0]
  ------------------
  159|  7.34k|                IGRAPH_CHECK(igraph_vector_int_push_back(edges, VECTOR(epath)[i]));
  ------------------
  |  |  656|  7.34k|    do { \
  |  |  657|  7.34k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  7.34k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  7.34k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.34k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  7.34k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 7.34k]
  |  |  ------------------
  ------------------
  160|  7.34k|            }
  161|  7.34k|        }
  162|  1.28k|        if (vertices) {
  ------------------
  |  Branch (162:13): [True: 1.28k, False: 0]
  ------------------
  163|  1.28k|            IGRAPH_CHECK(igraph_vector_int_push_back(vertices, va));
  ------------------
  |  |  656|  1.28k|    do { \
  |  |  657|  1.28k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.28k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.28k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.28k]
  |  |  ------------------
  ------------------
  164|  1.28k|        }
  165|  1.28k|        if (edges) {
  ------------------
  |  Branch (165:13): [True: 1.28k, False: 0]
  ------------------
  166|  1.28k|            IGRAPH_CHECK(igraph_vector_int_push_back(edges, ea));
  ------------------
  |  |  656|  1.28k|    do { \
  |  |  657|  1.28k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.28k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.28k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.28k]
  |  |  ------------------
  ------------------
  167|  1.28k|        }
  168|  1.28k|        if (found) {
  ------------------
  |  Branch (168:13): [True: 1.28k, False: 0]
  ------------------
  169|  1.28k|            *found = true;
  170|  1.28k|        }
  171|  1.28k|    }
  172|       |
  173|  1.89k|    igraph_vector_int_destroy(&epath);
  174|  1.89k|    igraph_vector_int_destroy(&vpath);
  175|  1.89k|    IGRAPH_FINALLY_CLEAN(2);
  176|       |
  177|  1.89k|    return IGRAPH_SUCCESS;
  178|       |
  179|  1.89k|#undef PATH_PUSH
  180|  1.89k|#undef PATH_POP
  181|  1.89k|}

igraph_dominator_tree:
  442|  2.00k|                                     igraph_neimode_t mode) {
  443|       |
  444|  2.00k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  445|       |
  446|  2.00k|    igraph_adjlist_t succ, pred;
  447|  2.00k|    igraph_vector_int_t parent;
  448|  2.00k|    igraph_vector_int_t semi;    /* +1 always */
  449|  2.00k|    igraph_vector_int_t vertex;   /* +1 always */
  450|  2.00k|    igraph_i_dbucket_t bucket;
  451|  2.00k|    igraph_vector_int_t ancestor;
  452|  2.00k|    igraph_vector_int_t label;
  453|       |
  454|  2.00k|    igraph_neimode_t invmode = IGRAPH_REVERSE_MODE(mode);
  ------------------
  |  |  110|  2.00k|    ((mode) == IGRAPH_IN ? IGRAPH_OUT : ((mode) == IGRAPH_OUT ? IGRAPH_IN : (mode)))
  |  |  ------------------
  |  |  |  Branch (110:6): [True: 0, False: 2.00k]
  |  |  |  Branch (110:42): [True: 2.00k, False: 0]
  |  |  ------------------
  ------------------
  455|       |
  456|  2.00k|    igraph_vector_int_t vdom, *mydom = dom;
  457|       |
  458|  2.00k|    igraph_int_t component_size = 0;
  459|       |
  460|  2.00k|    if (root < 0 || root >= no_of_nodes) {
  ------------------
  |  Branch (460:9): [True: 0, False: 2.00k]
  |  Branch (460:21): [True: 0, False: 2.00k]
  ------------------
  461|      0|        IGRAPH_ERROR("Invalid root vertex ID for dominator tree.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  462|      0|                     IGRAPH_EINVVID);
  463|      0|    }
  464|       |
  465|  2.00k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (465:9): [True: 0, False: 2.00k]
  ------------------
  466|      0|        IGRAPH_ERROR("Dominator tree of an undirected graph requested.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  467|      0|                     IGRAPH_EINVAL);
  468|      0|    }
  469|       |
  470|  2.00k|    if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (470:9): [True: 0, False: 2.00k]
  ------------------
  471|      0|        IGRAPH_ERROR("Invalid neighbor mode for dominator tree.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  472|      0|                     IGRAPH_EINVAL);
  473|      0|    }
  474|       |
  475|  2.00k|    if (dom) {
  ------------------
  |  Branch (475:9): [True: 2.00k, False: 0]
  ------------------
  476|  2.00k|        IGRAPH_CHECK(igraph_vector_int_resize(dom, no_of_nodes));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  477|  2.00k|    } else {
  478|      0|        mydom = &vdom;
  479|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(mydom, no_of_nodes);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  480|      0|    }
  481|  2.00k|    igraph_vector_int_fill(mydom, -2);
  482|       |
  483|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&parent, no_of_nodes);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  484|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&semi, no_of_nodes);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  485|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&vertex, no_of_nodes);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  486|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&ancestor, no_of_nodes);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  487|  2.00k|    IGRAPH_CHECK(igraph_vector_int_init_range(&label, 0, no_of_nodes));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  488|  2.00k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &label);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  489|  2.00k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &succ, mode, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  490|  2.00k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &succ);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  491|  2.00k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &pred, invmode, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  492|  2.00k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &pred);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  493|  2.00k|    IGRAPH_CHECK(igraph_i_dbucket_init(&bucket, no_of_nodes));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  494|  2.00k|    IGRAPH_FINALLY(igraph_i_dbucket_destroy, &bucket);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  495|       |
  496|       |    /* DFS first, to set semi, vertex and parent, step 1 */
  497|       |
  498|  2.00k|    IGRAPH_CHECK(igraph_dfs(graph, root, mode, /*unreachable=*/ false,
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  499|  2.00k|                            /*order=*/ &vertex,
  500|  2.00k|                            /*order_out=*/ NULL, /*parents=*/ &parent,
  501|  2.00k|                            /*dist=*/ NULL, /*in_callback=*/ NULL,
  502|  2.00k|                            /*out_callback=*/ NULL, /*extra=*/ NULL));
  503|       |
  504|   334k|    for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (504:30): [True: 332k, False: 2.00k]
  ------------------
  505|   332k|        if (VECTOR(vertex)[i] >= 0) {
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (505:13): [True: 24.6k, False: 308k]
  ------------------
  506|  24.6k|            igraph_int_t t = VECTOR(vertex)[i];
  ------------------
  |  |   60|  24.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  507|  24.6k|            VECTOR(semi)[t] = component_size + 1;
  ------------------
  |  |   60|  24.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  508|  24.6k|            VECTOR(vertex)[component_size] = t + 1;
  ------------------
  |  |   60|  24.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  509|  24.6k|            component_size++;
  510|  24.6k|        }
  511|   332k|    }
  512|  2.00k|    if (leftout) {
  ------------------
  |  Branch (512:9): [True: 2.00k, False: 0]
  ------------------
  513|  2.00k|        igraph_int_t n = no_of_nodes - component_size;
  514|  2.00k|        igraph_int_t p = 0, j;
  515|  2.00k|        IGRAPH_CHECK(igraph_vector_int_resize(leftout, n));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  516|   333k|        for (j = 0; j < no_of_nodes && p < n; j++) {
  ------------------
  |  Branch (516:21): [True: 331k, False: 1.25k]
  |  Branch (516:40): [True: 331k, False: 751]
  ------------------
  517|   331k|            if (VECTOR(parent)[j] < -1) {
  ------------------
  |  |   60|   331k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (517:17): [True: 308k, False: 23.1k]
  ------------------
  518|   308k|                VECTOR(*leftout)[p++] = j;
  ------------------
  |  |   60|   308k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  519|   308k|            }
  520|   331k|        }
  521|  2.00k|    }
  522|       |
  523|       |    /* We need to go over 'pred' because it should contain only the
  524|       |       edges towards the target vertex. */
  525|   334k|    for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (525:30): [True: 332k, False: 2.00k]
  ------------------
  526|   332k|        igraph_vector_int_t *v = igraph_adjlist_get(&pred, i);
  ------------------
  |  |   73|   332k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  527|   332k|        igraph_int_t n = igraph_vector_int_size(v);
  528|   407k|        for (igraph_int_t j = 0; j < n; ) {
  ------------------
  |  Branch (528:34): [True: 74.9k, False: 332k]
  ------------------
  529|  74.9k|            igraph_int_t v2 = VECTOR(*v)[j];
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  530|  74.9k|            if (VECTOR(parent)[v2] >= -1) {
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (530:17): [True: 44.7k, False: 30.2k]
  ------------------
  531|  44.7k|                j++;
  532|  44.7k|            } else {
  533|  30.2k|                VECTOR(*v)[j] = VECTOR(*v)[n - 1];
  ------------------
  |  |   60|  30.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*v)[j] = VECTOR(*v)[n - 1];
  ------------------
  |  |   60|  30.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  534|  30.2k|                igraph_vector_int_pop_back(v);
  535|  30.2k|                n--;
  536|  30.2k|            }
  537|  74.9k|        }
  538|   332k|    }
  539|       |
  540|       |    /* Now comes the main algorithm, steps 2 & 3 */
  541|       |
  542|  24.6k|    for (igraph_int_t i = component_size - 1; i > 0; i--) {
  ------------------
  |  Branch (542:47): [True: 22.6k, False: 2.00k]
  ------------------
  543|  22.6k|        igraph_int_t w = VECTOR(vertex)[i] - 1;
  ------------------
  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  544|  22.6k|        igraph_vector_int_t *predw = igraph_adjlist_get(&pred, w);
  ------------------
  |  |   73|  22.6k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  545|  22.6k|        igraph_int_t j, n = igraph_vector_int_size(predw);
  546|  55.7k|        for (j = 0; j < n; j++) {
  ------------------
  |  Branch (546:21): [True: 33.1k, False: 22.6k]
  ------------------
  547|  33.1k|            igraph_int_t v = VECTOR(*predw)[j];
  ------------------
  |  |   60|  33.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  548|  33.1k|            igraph_int_t u = igraph_i_dominator_EVAL(v, &ancestor, &label, &semi);
  549|  33.1k|            if (VECTOR(semi)[u] < VECTOR(semi)[w]) {
  ------------------
  |  |   60|  33.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (VECTOR(semi)[u] < VECTOR(semi)[w]) {
  ------------------
  |  |   60|  33.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (549:17): [True: 23.3k, False: 9.76k]
  ------------------
  550|  23.3k|                VECTOR(semi)[w] = VECTOR(semi)[u];
  ------------------
  |  |   60|  23.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(semi)[w] = VECTOR(semi)[u];
  ------------------
  |  |   60|  23.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  551|  23.3k|            }
  552|  33.1k|        }
  553|  22.6k|        igraph_i_dbucket_insert(&bucket, VECTOR(vertex)[ VECTOR(semi)[w] - 1 ] - 1, w);
  ------------------
  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      igraph_i_dbucket_insert(&bucket, VECTOR(vertex)[ VECTOR(semi)[w] - 1 ] - 1, w);
  ------------------
  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  554|  22.6k|        igraph_i_dominator_LINK(VECTOR(parent)[w], w, &ancestor);
  ------------------
  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  555|  45.2k|        while (!igraph_i_dbucket_empty(&bucket, VECTOR(parent)[w])) {
  ------------------
  |  |   60|  45.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (555:16): [True: 22.6k, False: 22.6k]
  ------------------
  556|  22.6k|            igraph_int_t v = igraph_i_dbucket_delete(&bucket, VECTOR(parent)[w]);
  ------------------
  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  557|  22.6k|            igraph_int_t u = igraph_i_dominator_EVAL(v, &ancestor, &label, &semi);
  558|  22.6k|            VECTOR(*mydom)[v] = VECTOR(semi)[u] < VECTOR(semi)[v] ? u :
  ------------------
  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*mydom)[v] = VECTOR(semi)[u] < VECTOR(semi)[v] ? u :
  ------------------
  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*mydom)[v] = VECTOR(semi)[u] < VECTOR(semi)[v] ? u :
  ------------------
  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (558:33): [True: 465, False: 22.1k]
  ------------------
  559|  22.6k|                                VECTOR(parent)[w];
  ------------------
  |  |   60|  22.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  560|  22.6k|        }
  561|  22.6k|    }
  562|       |
  563|       |    /* Finally, step 4 */
  564|       |
  565|  24.6k|    for (igraph_int_t i = 1; i < component_size; i++) {
  ------------------
  |  Branch (565:30): [True: 22.6k, False: 2.00k]
  ------------------
  566|  22.6k|        igraph_int_t w = VECTOR(vertex)[i] - 1;
  ------------------
  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  567|  22.6k|        if (VECTOR(*mydom)[w] != VECTOR(vertex)[VECTOR(semi)[w] - 1] - 1) {
  ------------------
  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (VECTOR(*mydom)[w] != VECTOR(vertex)[VECTOR(semi)[w] - 1] - 1) {
  ------------------
  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (VECTOR(*mydom)[w] != VECTOR(vertex)[VECTOR(semi)[w] - 1] - 1) {
  ------------------
  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (567:13): [True: 465, False: 22.1k]
  ------------------
  568|    465|            VECTOR(*mydom)[w] = VECTOR(*mydom)[VECTOR(*mydom)[w]];
  ------------------
  |  |   60|    465|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*mydom)[w] = VECTOR(*mydom)[VECTOR(*mydom)[w]];
  ------------------
  |  |   60|    465|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*mydom)[w] = VECTOR(*mydom)[VECTOR(*mydom)[w]];
  ------------------
  |  |   60|    465|#define VECTOR(v) ((v).stor_begin)
  ------------------
  569|    465|        }
  570|  22.6k|    }
  571|  2.00k|    VECTOR(*mydom)[root] = -1;
  ------------------
  |  |   60|  2.00k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  572|       |
  573|  2.00k|    igraph_i_dbucket_destroy(&bucket);
  574|  2.00k|    igraph_adjlist_destroy(&pred);
  575|  2.00k|    igraph_adjlist_destroy(&succ);
  576|  2.00k|    igraph_vector_int_destroy(&label);
  577|  2.00k|    igraph_vector_int_destroy(&ancestor);
  578|  2.00k|    igraph_vector_int_destroy(&vertex);
  579|  2.00k|    igraph_vector_int_destroy(&semi);
  580|  2.00k|    igraph_vector_int_destroy(&parent);
  581|  2.00k|    IGRAPH_FINALLY_CLEAN(8);
  582|       |
  583|  2.00k|    if (domtree) {
  ------------------
  |  Branch (583:9): [True: 0, False: 2.00k]
  ------------------
  584|      0|        igraph_vector_int_t edges;
  585|      0|        igraph_int_t ptr = 0;
  586|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, component_size * 2 - 2);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  587|      0|        for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (587:34): [True: 0, False: 0]
  ------------------
  588|      0|            if (i != root && VECTOR(*mydom)[i] >= 0) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (588:17): [True: 0, False: 0]
  |  Branch (588:30): [True: 0, False: 0]
  ------------------
  589|      0|                if (mode == IGRAPH_OUT) {
  ------------------
  |  Branch (589:21): [True: 0, False: 0]
  ------------------
  590|      0|                    VECTOR(edges)[ptr++] = VECTOR(*mydom)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(edges)[ptr++] = VECTOR(*mydom)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  591|      0|                    VECTOR(edges)[ptr++] = i;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  592|      0|                } else {
  593|      0|                    VECTOR(edges)[ptr++] = i;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  594|      0|                    VECTOR(edges)[ptr++] = VECTOR(*mydom)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(edges)[ptr++] = VECTOR(*mydom)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  595|      0|                }
  596|      0|            }
  597|      0|        }
  598|      0|        IGRAPH_CHECK(igraph_create(domtree, &edges, no_of_nodes,
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  599|      0|                                   IGRAPH_DIRECTED));
  600|      0|        igraph_vector_int_destroy(&edges);
  601|      0|        IGRAPH_FINALLY_CLEAN(1);
  602|       |
  603|      0|        IGRAPH_CHECK(igraph_i_attribute_copy(domtree, graph, true, true, /*edges=*/ false));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  604|      0|    }
  605|       |
  606|  2.00k|    if (!dom) {
  ------------------
  |  Branch (606:9): [True: 0, False: 2.00k]
  ------------------
  607|      0|        igraph_vector_int_destroy(&vdom);
  608|      0|        IGRAPH_FINALLY_CLEAN(1);
  609|      0|    }
  610|       |
  611|  2.00k|    return IGRAPH_SUCCESS;
  612|  2.00k|}
st-cuts.c:igraph_i_dbucket_init:
  294|  2.00k|static igraph_error_t igraph_i_dbucket_init(igraph_i_dbucket_t *buck, igraph_int_t size) {
  295|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&buck->head, size);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  296|  2.00k|    IGRAPH_CHECK(igraph_vector_int_init(&buck->next, size));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  297|  2.00k|    IGRAPH_FINALLY_CLEAN(1);
  298|  2.00k|    return IGRAPH_SUCCESS;
  299|  2.00k|}
st-cuts.c:igraph_i_dbucket_destroy:
  301|  2.00k|static void igraph_i_dbucket_destroy(igraph_i_dbucket_t *buck) {
  302|  2.00k|    igraph_vector_int_destroy(&buck->head);
  303|  2.00k|    igraph_vector_int_destroy(&buck->next);
  304|  2.00k|}
st-cuts.c:igraph_i_dominator_EVAL:
  371|  55.7k|        igraph_vector_int_t *semi) {
  372|  55.7k|    if (VECTOR(*ancestor)[v] == 0) {
  ------------------
  |  |   60|  55.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (372:9): [True: 29.5k, False: 26.2k]
  ------------------
  373|  29.5k|        return v;
  374|  29.5k|    } else {
  375|  26.2k|        igraph_i_dominator_COMPRESS(v, ancestor, label, semi);
  376|  26.2k|        return VECTOR(*label)[v];
  ------------------
  |  |   60|  26.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  377|  26.2k|    }
  378|  55.7k|}
st-cuts.c:igraph_i_dominator_COMPRESS:
  336|  26.2k|        igraph_vector_int_t *semi) {
  337|  26.2k|    igraph_stack_int_t path;
  338|  26.2k|    igraph_int_t w = v;
  339|  26.2k|    igraph_int_t top, pretop;
  340|       |
  341|  26.2k|    IGRAPH_CHECK(igraph_stack_int_init(&path, 10));
  ------------------
  |  |  656|  26.2k|    do { \
  |  |  657|  26.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  26.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  26.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 26.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  26.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 26.2k]
  |  |  ------------------
  ------------------
  342|  26.2k|    IGRAPH_FINALLY(igraph_stack_int_destroy, &path);
  ------------------
  |  |  603|  26.2k|    do { \
  |  |  604|  26.2k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  26.2k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  26.2k|         * incorrect destructor function with the pointer */ \
  |  |  607|  26.2k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 26.2k]
  |  |  ------------------
  |  |  608|  26.2k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  26.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 26.2k]
  |  |  ------------------
  ------------------
  343|       |
  344|  64.7k|    while (VECTOR(*ancestor)[w] != 0) {
  ------------------
  |  |   60|  64.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (344:12): [True: 38.5k, False: 26.2k]
  ------------------
  345|  38.5k|        IGRAPH_CHECK(igraph_stack_int_push(&path, w));
  ------------------
  |  |  656|  38.5k|    do { \
  |  |  657|  38.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  38.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  38.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 38.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  38.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 38.5k]
  |  |  ------------------
  ------------------
  346|  38.5k|        w = VECTOR(*ancestor)[w] - 1;
  ------------------
  |  |   60|  38.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  347|  38.5k|    }
  348|       |
  349|  26.2k|    top = igraph_stack_int_pop(&path);
  350|  38.5k|    while (!igraph_stack_int_empty(&path)) {
  ------------------
  |  Branch (350:12): [True: 12.3k, False: 26.2k]
  ------------------
  351|  12.3k|        pretop = igraph_stack_int_pop(&path);
  352|       |
  353|  12.3k|        if (VECTOR(*semi)[VECTOR(*label)[top]] <
  ------------------
  |  |   60|  12.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (VECTOR(*semi)[VECTOR(*label)[top]] <
  ------------------
  |  |   60|  12.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (353:13): [True: 9.53k, False: 2.77k]
  ------------------
  354|  12.3k|            VECTOR(*semi)[VECTOR(*label)[pretop]]) {
  ------------------
  |  |   60|  12.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*semi)[VECTOR(*label)[pretop]]) {
  ------------------
  |  |   60|  12.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  355|  9.53k|            VECTOR(*label)[pretop] = VECTOR(*label)[top];
  ------------------
  |  |   60|  9.53k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*label)[pretop] = VECTOR(*label)[top];
  ------------------
  |  |   60|  9.53k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  356|  9.53k|        }
  357|  12.3k|        VECTOR(*ancestor)[pretop] = VECTOR(*ancestor)[top];
  ------------------
  |  |   60|  12.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(*ancestor)[pretop] = VECTOR(*ancestor)[top];
  ------------------
  |  |   60|  12.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  358|       |
  359|  12.3k|        top = pretop;
  360|  12.3k|    }
  361|       |
  362|  26.2k|    igraph_stack_int_destroy(&path);
  363|  26.2k|    IGRAPH_FINALLY_CLEAN(1);
  364|       |
  365|  26.2k|    return IGRAPH_SUCCESS;
  366|  26.2k|}
st-cuts.c:igraph_i_dbucket_insert:
  307|  22.6k|        igraph_int_t elem) {
  308|       |    /* Note: we can do this, since elem is not in any buckets */
  309|  22.6k|    VECTOR(buck->next)[elem] = VECTOR(buck->head)[bid];
  ------------------
  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                  VECTOR(buck->next)[elem] = VECTOR(buck->head)[bid];
  ------------------
  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  310|  22.6k|    VECTOR(buck->head)[bid] = elem + 1;
  ------------------
  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  311|  22.6k|    return IGRAPH_SUCCESS;
  312|  22.6k|}
st-cuts.c:igraph_i_dominator_LINK:
  326|  22.6k|        igraph_vector_int_t *ancestor) {
  327|  22.6k|    VECTOR(*ancestor)[w] = v + 1;
  ------------------
  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  328|  22.6k|    return IGRAPH_SUCCESS;
  329|  22.6k|}
st-cuts.c:igraph_i_dbucket_empty:
  315|  45.2k|        igraph_int_t bid) {
  316|  45.2k|    return VECTOR(buck->head)[bid] == 0;
  ------------------
  |  |   60|  45.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  317|  45.2k|}
st-cuts.c:igraph_i_dbucket_delete:
  319|  22.6k|static igraph_int_t igraph_i_dbucket_delete(igraph_i_dbucket_t *buck, igraph_int_t bid) {
  320|  22.6k|    igraph_int_t elem = VECTOR(buck->head)[bid] - 1;
  ------------------
  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  321|  22.6k|    VECTOR(buck->head)[bid] = VECTOR(buck->next)[elem];
  ------------------
  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                  VECTOR(buck->head)[bid] = VECTOR(buck->next)[elem];
  ------------------
  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  322|  22.6k|    return elem;
  323|  22.6k|}

igraph_adjlist_init:
  155|  14.7k|                        igraph_bool_t multiple) {
  156|       |
  157|  14.7k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  158|  14.7k|    igraph_vector_int_t degrees;
  159|  14.7k|    int iter = 0;
  160|       |
  161|  14.7k|    multiple = !!multiple; /* normalize Boolean value to enable == comparisons below */
  162|       |
  163|  14.7k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (163:9): [True: 8.72k, False: 6.00k]
  |  Branch (163:30): [True: 0, False: 8.72k]
  |  Branch (163:52): [True: 0, False: 0]
  ------------------
  164|      0|        IGRAPH_ERROR("Cannot create adjacency list view.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  165|      0|    }
  166|       |
  167|  14.7k|    if (loops != IGRAPH_NO_LOOPS && loops != IGRAPH_LOOPS_ONCE && loops != IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (167:9): [True: 14.7k, False: 0]
  |  Branch (167:37): [True: 2.00k, False: 12.7k]
  |  Branch (167:67): [True: 0, False: 2.00k]
  ------------------
  168|      0|        IGRAPH_ERROR("Invalid loops argument.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  169|      0|    }
  170|       |
  171|  14.7k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (171:9): [True: 0, False: 14.7k]
  ------------------
  172|      0|        mode = IGRAPH_ALL;
  173|      0|    }
  174|       |
  175|  14.7k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  119|  14.7k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  14.7k|    do { \
  |  |  |  |  657|  14.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  14.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  14.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 14.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  14.7k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 14.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  14.7k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  14.7k|    do { \
  |  |  |  |  604|  14.7k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  14.7k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  14.7k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  14.7k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 14.7k]
  |  |  |  |  ------------------
  |  |  |  |  608|  14.7k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  14.7k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 14.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 14.7k]
  |  |  ------------------
  ------------------
  176|       |    /* igraph_degree() is fast when loops=true */
  177|  14.7k|    IGRAPH_CHECK(igraph_degree(graph, &degrees, igraph_vss_all(), mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  14.7k|    do { \
  |  |  657|  14.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  14.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  14.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 14.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  14.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 14.7k]
  |  |  ------------------
  ------------------
  178|       |
  179|  14.7k|    al->length = no_of_nodes;
  180|  14.7k|    al->adjs = IGRAPH_CALLOC(al->length, igraph_vector_int_t);
  ------------------
  |  |   33|  14.7k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  29.4k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 14.7k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 14.7k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 14.7k, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  181|  14.7k|    IGRAPH_CHECK_OOM(al->adjs, "Insufficient memory for creating adjacency list view.");
  ------------------
  |  |  709|  14.7k|    do { \
  |  |  710|  14.7k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  14.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 14.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  14.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 14.7k]
  |  |  ------------------
  ------------------
  182|  14.7k|    IGRAPH_FINALLY(igraph_adjlist_destroy, al);
  ------------------
  |  |  603|  14.7k|    do { \
  |  |  604|  14.7k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  14.7k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  14.7k|         * incorrect destructor function with the pointer */ \
  |  |  607|  14.7k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 14.7k]
  |  |  ------------------
  |  |  608|  14.7k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  14.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 14.7k]
  |  |  ------------------
  ------------------
  183|       |
  184|       |    /* if we already know there are no multi-edges, they don't need to be removed */
  185|  14.7k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MULTI) &&
  ------------------
  |  Branch (185:9): [True: 10.0k, False: 4.72k]
  ------------------
  186|  10.0k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_MULTI)) {
  ------------------
  |  Branch (186:9): [True: 6.75k, False: 3.25k]
  ------------------
  187|       |
  188|       |        /* special case: if the graph is directed, but we are ignoring edge directions,
  189|       |         * mutual edges also act as multi-edges */
  190|  6.75k|        if (igraph_is_directed(graph) && mode == IGRAPH_ALL) {
  ------------------
  |  Branch (190:13): [True: 6.75k, False: 0]
  |  Branch (190:42): [True: 0, False: 6.75k]
  ------------------
  191|      0|            if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MUTUAL) &&
  ------------------
  |  Branch (191:17): [True: 0, False: 0]
  ------------------
  192|      0|                !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_MUTUAL)) {
  ------------------
  |  Branch (192:17): [True: 0, False: 0]
  ------------------
  193|      0|                multiple = IGRAPH_MULTIPLE;
  194|      0|            }
  195|  6.75k|        } else {
  196|  6.75k|            multiple = IGRAPH_MULTIPLE;
  197|  6.75k|        }
  198|  6.75k|    }
  199|       |
  200|       |    /* if we already know there are no loops, they don't need to be removed */
  201|  14.7k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (201:9): [True: 10.0k, False: 4.72k]
  ------------------
  202|  10.0k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (202:9): [True: 6.63k, False: 3.37k]
  ------------------
  203|  6.63k|        if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (203:13): [True: 0, False: 6.63k]
  ------------------
  204|      0|            loops = IGRAPH_LOOPS_TWICE;
  205|  6.63k|        } else {
  206|  6.63k|            loops = IGRAPH_LOOPS_ONCE;
  207|  6.63k|        }
  208|  6.63k|    }
  209|       |
  210|  14.7k|    igraph_bool_t has_loops = false;
  211|  14.7k|    igraph_bool_t has_multiple = false;
  212|       |
  213|       |    /* In theory, we could just run igraph_neighbors() in a loop with 'loops'
  214|       |     * and 'multiple' set exactly how the caller wants it. However, we take the
  215|       |     * opportunity to also _cache_ whether the graph has multiple or loop edges
  216|       |     * if we are looping over all vertices anyway, and that requires us to query
  217|       |     * the neighbors in full */
  218|       |
  219|  2.51M|    for (igraph_int_t i = 0; i < al->length; i++) {
  ------------------
  |  Branch (219:30): [True: 2.49M, False: 14.7k]
  ------------------
  220|  2.49M|        IGRAPH_ALLOW_INTERRUPTION_LIMITED(iter, 1000);
  ------------------
  |  |   71|  2.49M|    do { \
  |  |   72|  2.49M|        if (++iter >= skips) { \
  |  |  ------------------
  |  |  |  Branch (72:13): [True: 0, False: 2.49M]
  |  |  ------------------
  |  |   73|      0|            IGRAPH_ALLOW_INTERRUPTION(); \
  |  |  ------------------
  |  |  |  |   46|      0|    do { \
  |  |  |  |   47|      0|        if (igraph_i_interruption_handler) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (47:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |  |  |   50|      0|            } \
  |  |  |  |   51|      0|        } \
  |  |  |  |   52|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   74|      0|            iter = 0; \
  |  |   75|      0|        } \
  |  |   76|  2.49M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (76:14): [Folded, False: 2.49M]
  |  |  ------------------
  ------------------
  221|       |
  222|  2.49M|        IGRAPH_CHECK(igraph_vector_int_init(&al->adjs[i], VECTOR(degrees)[i]));
  ------------------
  |  |  656|  2.49M|    do { \
  |  |  657|  2.49M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.49M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.49M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.49M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.49M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.49M]
  |  |  ------------------
  ------------------
  223|  2.49M|        IGRAPH_CHECK(igraph_neighbors(graph, &al->adjs[i], i, mode, IGRAPH_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.49M|    do { \
  |  |  657|  2.49M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.49M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.49M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.49M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.49M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.49M]
  |  |  ------------------
  ------------------
  224|       |
  225|       |        /* Attention: This function will only set values for has_loops and has_multiple
  226|       |         * if it finds loops/multi-edges. Otherwise, they are left at their original value. */
  227|  2.49M|        IGRAPH_CHECK(igraph_i_simplify_sorted_int_adjacency_vector_in_place(
  ------------------
  |  |  656|  2.49M|    do { \
  |  |  657|  2.49M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.49M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.49M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.49M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.49M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.49M]
  |  |  ------------------
  ------------------
  228|  2.49M|            &al->adjs[i], i, mode, loops, multiple, &has_loops, &has_multiple
  229|  2.49M|        ));
  230|  2.49M|    }
  231|  14.7k|    if (has_loops) {
  ------------------
  |  Branch (231:9): [True: 0, False: 14.7k]
  ------------------
  232|       |        /* If we have found at least one loop above, set the cache to true. */
  233|      0|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, true);
  234|  14.7k|    } else if (loops == IGRAPH_NO_LOOPS) {
  ------------------
  |  Branch (234:16): [True: 0, False: 14.7k]
  ------------------
  235|       |        /* If we explicitly _checked_ for loops (to remove them) and haven't
  236|       |         * found one, set the cache to false. This is the only case when a
  237|       |         * definite "no" from has_loops really means that there are no loops at
  238|       |         * all. */
  239|      0|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, false);
  240|      0|    }
  241|  14.7k|    if (has_multiple) {
  ------------------
  |  Branch (241:9): [True: 0, False: 14.7k]
  ------------------
  242|       |        /* If we have found at least one multiedge above, set the cache to true,
  243|       |         * except when treating a directed graph as undirected. In that case, mutual
  244|       |         * edges would also look like multi-edges in this check. */
  245|      0|        if (! igraph_is_directed(graph) || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (245:13): [True: 0, False: 0]
  |  Branch (245:44): [True: 0, False: 0]
  ------------------
  246|      0|            igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_MULTI, true);
  247|      0|        }
  248|  14.7k|    } else if (multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (248:16): [True: 0, False: 14.7k]
  ------------------
  249|       |        /* If we explicitly _checked_ for multi-edges (to remove them) and
  250|       |         * haven't found one, set the cache to false. This is the only case
  251|       |         * when a definite "no" from has_multiple really means that there are
  252|       |         * no multi-edges at all. */
  253|      0|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_MULTI, false);
  254|      0|    }
  255|       |
  256|  14.7k|    igraph_vector_int_destroy(&degrees);
  257|  14.7k|    IGRAPH_FINALLY_CLEAN(2); /* + igraph_adjlist_destroy */
  258|       |
  259|  14.7k|    return IGRAPH_SUCCESS;
  260|  14.7k|}
igraph_adjlist_destroy:
  480|  14.7k|void igraph_adjlist_destroy(igraph_adjlist_t *al) {
  481|  2.51M|    for (igraph_int_t i = 0; i < al->length; i++) {
  ------------------
  |  Branch (481:30): [True: 2.49M, False: 14.7k]
  ------------------
  482|       |        /* This works if some igraph_vector_int_t's contain NULL,
  483|       |           because igraph_vector_int_destroy can handle this. */
  484|  2.49M|        igraph_vector_int_destroy(&al->adjs[i]);
  485|  2.49M|    }
  486|       |    IGRAPH_FREE(al->adjs);
  ------------------
  |  |   36|  14.7k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  487|  14.7k|}
igraph_adjlist_has_edge:
  631|  61.4k|        igraph_bool_t directed) {
  632|       |
  633|  61.4k|    const igraph_vector_int_t *fromvec;
  634|  61.4k|    ADJLIST_CANON_EDGE(from, to, directed);
  ------------------
  |  |  608|  61.4k|    do {                     \
  |  |  609|  61.4k|        igraph_int_t temp;         \
  |  |  610|  61.4k|        if ((!directed) && from < to) {     \
  |  |  ------------------
  |  |  |  Branch (610:13): [True: 0, False: 61.4k]
  |  |  |  Branch (610:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  611|      0|            temp = to;               \
  |  |  612|      0|            to = from;               \
  |  |  613|      0|            from = temp;             \
  |  |  614|      0|        }                      \
  |  |  615|  61.4k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (615:14): [Folded, False: 61.4k]
  |  |  ------------------
  ------------------
  635|  61.4k|    fromvec = igraph_adjlist_get(al, from);
  ------------------
  |  |   73|  61.4k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  636|  61.4k|    return igraph_vector_int_contains_sorted(fromvec, to);
  637|  61.4k|}
igraph_adjlist_replace_edge:
  642|  59.5k|        igraph_bool_t directed) {
  643|       |
  644|  59.5k|    igraph_vector_int_t *oldfromvec, *newfromvec;
  645|  59.5k|    igraph_bool_t found_old, found_new;
  646|  59.5k|    igraph_int_t oldpos, newpos;
  647|  59.5k|    igraph_int_t oldfrom = from, newfrom = from;
  648|       |
  649|  59.5k|    ADJLIST_CANON_EDGE(oldfrom, oldto, directed);
  ------------------
  |  |  608|  59.5k|    do {                     \
  |  |  609|  59.5k|        igraph_int_t temp;         \
  |  |  610|  59.5k|        if ((!directed) && from < to) {     \
  |  |  ------------------
  |  |  |  Branch (610:13): [True: 0, False: 59.5k]
  |  |  |  Branch (610:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  611|      0|            temp = to;               \
  |  |  612|      0|            to = from;               \
  |  |  613|      0|            from = temp;             \
  |  |  614|      0|        }                      \
  |  |  615|  59.5k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (615:14): [Folded, False: 59.5k]
  |  |  ------------------
  ------------------
  650|  59.5k|    ADJLIST_CANON_EDGE(newfrom, newto, directed);
  ------------------
  |  |  608|  59.5k|    do {                     \
  |  |  609|  59.5k|        igraph_int_t temp;         \
  |  |  610|  59.5k|        if ((!directed) && from < to) {     \
  |  |  ------------------
  |  |  |  Branch (610:13): [True: 0, False: 59.5k]
  |  |  |  Branch (610:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  611|      0|            temp = to;               \
  |  |  612|      0|            to = from;               \
  |  |  613|      0|            from = temp;             \
  |  |  614|      0|        }                      \
  |  |  615|  59.5k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (615:14): [Folded, False: 59.5k]
  |  |  ------------------
  ------------------
  651|       |
  652|  59.5k|    oldfromvec = igraph_adjlist_get(al, oldfrom);
  ------------------
  |  |   73|  59.5k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  653|  59.5k|    newfromvec = igraph_adjlist_get(al, newfrom);
  ------------------
  |  |   73|  59.5k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  654|       |
  655|       |    /* oldfrom -> oldto should exist; newfrom -> newto should not. */
  656|  59.5k|    found_old = igraph_vector_int_binsearch(oldfromvec, oldto, &oldpos);
  657|  59.5k|    if (! found_old) {
  ------------------
  |  Branch (657:9): [True: 0, False: 59.5k]
  ------------------
  658|      0|        IGRAPH_ERROR("Edge to replace does not exist.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  659|      0|    }
  660|  59.5k|    found_new = igraph_vector_int_binsearch(newfromvec, newto, &newpos);
  661|  59.5k|    if (found_new) {
  ------------------
  |  Branch (661:9): [True: 0, False: 59.5k]
  ------------------
  662|      0|        IGRAPH_ERROR("New edge already exists.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  663|      0|    }
  664|       |
  665|  59.5k|    if (oldfromvec != newfromvec) {
  ------------------
  |  Branch (665:9): [True: 0, False: 59.5k]
  ------------------
  666|       |        /* grow the new vector first and then remove the item from the old one
  667|       |         * to ensure that we don't end up in a situation where the removal
  668|       |         * succeeds but the addition does not */
  669|      0|        IGRAPH_CHECK(igraph_vector_int_insert(newfromvec, newpos, newto));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  670|      0|        igraph_vector_int_remove(oldfromvec, oldpos);
  671|  59.5k|    } else {
  672|       |        /* moving item within the same vector; here we can safely remove first
  673|       |         * and insert afterwards because there is no need to re-allocate memory */
  674|  59.5k|        igraph_vector_int_remove(oldfromvec, oldpos);
  675|  59.5k|        if (oldpos < newpos) {
  ------------------
  |  Branch (675:13): [True: 29.7k, False: 29.7k]
  ------------------
  676|  29.7k|            --newpos;
  677|  29.7k|        }
  678|  59.5k|        IGRAPH_CHECK(igraph_vector_int_insert(newfromvec, newpos, newto));
  ------------------
  |  |  656|  59.5k|    do { \
  |  |  657|  59.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  59.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  59.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 59.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  59.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 59.5k]
  |  |  ------------------
  ------------------
  679|  59.5k|    }
  680|       |
  681|  59.5k|    return IGRAPH_SUCCESS;
  682|       |
  683|  59.5k|}
igraph_inclist_init:
  751|    928|                        igraph_loops_t loops) {
  752|    928|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  753|    928|    igraph_vector_int_t degrees;
  754|    928|    int iter = 0;
  755|       |
  756|    928|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (756:9): [True: 928, False: 0]
  |  Branch (756:30): [True: 0, False: 928]
  |  Branch (756:52): [True: 0, False: 0]
  ------------------
  757|      0|        IGRAPH_ERROR("Cannot create incidence list view.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  758|      0|    }
  759|       |
  760|    928|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (760:9): [True: 0, False: 928]
  ------------------
  761|      0|        mode = IGRAPH_ALL;
  762|      0|    }
  763|       |
  764|    928|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  119|    928|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    928|    do { \
  |  |  |  |  657|    928|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    928|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    928|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 928]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    928|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 928]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    928|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    928|    do { \
  |  |  |  |  604|    928|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    928|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    928|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    928|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 928]
  |  |  |  |  ------------------
  |  |  |  |  608|    928|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    928|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 928]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 928]
  |  |  ------------------
  ------------------
  765|       |    /* igraph_degrees() is fast when loops=true */
  766|    928|    IGRAPH_CHECK(igraph_degree(graph, &degrees, igraph_vss_all(), mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|    928|    do { \
  |  |  657|    928|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    928|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    928|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 928]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    928|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 928]
  |  |  ------------------
  ------------------
  767|       |
  768|    928|    il->length = no_of_nodes;
  769|    928|    il->incs = IGRAPH_CALLOC(il->length, igraph_vector_int_t);
  ------------------
  |  |   33|    928|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  1.85k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 928, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 928, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 928, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  770|    928|    if (il->incs == 0) {
  ------------------
  |  Branch (770:9): [True: 0, False: 928]
  ------------------
  771|      0|        IGRAPH_ERROR("Cannot create incidence list view.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  772|      0|    }
  773|       |
  774|    928|    IGRAPH_FINALLY(igraph_inclist_destroy, il);
  ------------------
  |  |  603|    928|    do { \
  |  |  604|    928|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    928|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    928|         * incorrect destructor function with the pointer */ \
  |  |  607|    928|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 928]
  |  |  ------------------
  |  |  608|    928|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    928|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 928]
  |  |  ------------------
  ------------------
  775|   128k|    for (igraph_int_t i = 0; i < il->length; i++) {
  ------------------
  |  Branch (775:30): [True: 127k, False: 928]
  ------------------
  776|   127k|        IGRAPH_ALLOW_INTERRUPTION_LIMITED(iter, 1000);
  ------------------
  |  |   71|   127k|    do { \
  |  |   72|   127k|        if (++iter >= skips) { \
  |  |  ------------------
  |  |  |  Branch (72:13): [True: 0, False: 127k]
  |  |  ------------------
  |  |   73|      0|            IGRAPH_ALLOW_INTERRUPTION(); \
  |  |  ------------------
  |  |  |  |   46|      0|    do { \
  |  |  |  |   47|      0|        if (igraph_i_interruption_handler) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (47:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |  |  |   50|      0|            } \
  |  |  |  |   51|      0|        } \
  |  |  |  |   52|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   74|      0|            iter = 0; \
  |  |   75|      0|        } \
  |  |   76|   127k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (76:14): [Folded, False: 127k]
  |  |  ------------------
  ------------------
  777|       |
  778|   127k|        IGRAPH_CHECK(igraph_vector_int_init(&il->incs[i], VECTOR(degrees)[i]));
  ------------------
  |  |  656|   127k|    do { \
  |  |  657|   127k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   127k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   127k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 127k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   127k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 127k]
  |  |  ------------------
  ------------------
  779|   127k|        IGRAPH_CHECK(igraph_incident(graph, &il->incs[i], i, mode, loops));
  ------------------
  |  |  656|   127k|    do { \
  |  |  657|   127k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   127k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   127k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 127k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   127k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 127k]
  |  |  ------------------
  ------------------
  780|   127k|    }
  781|       |
  782|    928|    igraph_vector_int_destroy(&degrees);
  783|    928|    IGRAPH_FINALLY_CLEAN(2); /* + igraph_inclist_destroy */
  784|       |
  785|    928|    return IGRAPH_SUCCESS;
  786|    928|}
igraph_inclist_destroy:
  830|    928|void igraph_inclist_destroy(igraph_inclist_t *il) {
  831|   128k|    for (igraph_int_t i = 0; i < il->length; i++) {
  ------------------
  |  Branch (831:30): [True: 127k, False: 928]
  ------------------
  832|       |        /* This works if some igraph_vector_int_t's contain NULL,
  833|       |           because igraph_vector_int_destroy can handle this. */
  834|   127k|        igraph_vector_int_destroy(&il->incs[i]);
  835|   127k|    }
  836|       |    IGRAPH_FREE(il->incs);
  ------------------
  |  |   36|    928|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  837|    928|}
igraph_lazy_adjlist_init:
 1081|  14.0k|                             igraph_bool_t multiple) {
 1082|  14.0k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1082:9): [True: 12.0k, False: 2.00k]
  |  Branch (1082:30): [True: 0, False: 12.0k]
  |  Branch (1082:52): [True: 0, False: 0]
  ------------------
 1083|      0|        IGRAPH_ERROR("Cannot create lazy adjacency list view.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1084|      0|    }
 1085|       |
 1086|  14.0k|    if (loops != IGRAPH_NO_LOOPS && loops != IGRAPH_LOOPS_ONCE && loops != IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1086:9): [True: 10.0k, False: 4.00k]
  |  Branch (1086:37): [True: 6.00k, False: 4.00k]
  |  Branch (1086:67): [True: 0, False: 6.00k]
  ------------------
 1087|      0|        IGRAPH_ERROR("Invalid loops argument.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1088|      0|    }
 1089|       |
 1090|  14.0k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1090:9): [True: 0, False: 14.0k]
  ------------------
 1091|      0|        mode = IGRAPH_ALL;
 1092|      0|    }
 1093|       |
 1094|       |    /* if we already know there are no multi-edges, they don't need to be removed */
 1095|  14.0k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MULTI) &&
  ------------------
  |  Branch (1095:9): [True: 10.0k, False: 4.00k]
  ------------------
 1096|  10.0k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_MULTI)) {
  ------------------
  |  Branch (1096:9): [True: 6.75k, False: 3.25k]
  ------------------
 1097|       |
 1098|       |        /* special case: if the graph is directed, but we are ignoring edge directions,
 1099|       |         * mutual edges also act as multi-edges */
 1100|  6.75k|        if (igraph_is_directed(graph) && mode == IGRAPH_ALL) {
  ------------------
  |  Branch (1100:13): [True: 6.75k, False: 0]
  |  Branch (1100:42): [True: 0, False: 6.75k]
  ------------------
 1101|      0|            if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MUTUAL) &&
  ------------------
  |  Branch (1101:17): [True: 0, False: 0]
  ------------------
 1102|      0|                !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_MUTUAL)) {
  ------------------
  |  Branch (1102:17): [True: 0, False: 0]
  ------------------
 1103|      0|                multiple = IGRAPH_MULTIPLE;
 1104|      0|            }
 1105|  6.75k|        } else {
 1106|  6.75k|            multiple = IGRAPH_MULTIPLE;
 1107|  6.75k|        }
 1108|  6.75k|    }
 1109|       |
 1110|       |    /* if we already know there are no loops, they don't need to be removed */
 1111|  14.0k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (1111:9): [True: 10.6k, False: 3.33k]
  ------------------
 1112|  10.6k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (1112:9): [True: 6.63k, False: 4.05k]
  ------------------
 1113|  6.63k|        if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (1113:13): [True: 0, False: 6.63k]
  ------------------
 1114|      0|            loops = IGRAPH_LOOPS_TWICE;
 1115|  6.63k|        } else {
 1116|  6.63k|            loops = IGRAPH_LOOPS_ONCE;
 1117|  6.63k|        }
 1118|  6.63k|    }
 1119|       |
 1120|  14.0k|    al->mode = mode;
 1121|  14.0k|    al->loops = loops;
 1122|  14.0k|    al->multiple = multiple;
 1123|  14.0k|    al->graph = graph;
 1124|       |
 1125|  14.0k|    al->length = igraph_vcount(graph);
 1126|  14.0k|    al->adjs = IGRAPH_CALLOC(al->length, igraph_vector_int_t*);
  ------------------
  |  |   33|  14.0k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  28.0k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 14.0k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 14.0k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 14.0k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1127|  14.0k|    IGRAPH_CHECK_OOM(al->adjs, "Insufficient memory for creating lazy adjacency list view.");
  ------------------
  |  |  709|  14.0k|    do { \
  |  |  710|  14.0k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  14.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 14.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  14.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 14.0k]
  |  |  ------------------
  ------------------
 1128|       |
 1129|  14.0k|    return IGRAPH_SUCCESS;
 1130|  14.0k|}
igraph_lazy_adjlist_destroy:
 1142|  14.0k|void igraph_lazy_adjlist_destroy(igraph_lazy_adjlist_t *al) {
 1143|  14.0k|    igraph_lazy_adjlist_clear(al);
 1144|       |    IGRAPH_FREE(al->adjs);
  ------------------
  |  |   36|  14.0k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1145|  14.0k|}
igraph_lazy_adjlist_clear:
 1155|  14.0k|void igraph_lazy_adjlist_clear(igraph_lazy_adjlist_t *al) {
 1156|  14.0k|    igraph_int_t i, n = al->length;
 1157|  2.34M|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (1157:17): [True: 2.32M, False: 14.0k]
  ------------------
 1158|  2.32M|        if (al->adjs[i] != 0) {
  ------------------
  |  Branch (1158:13): [True: 822k, False: 1.50M]
  ------------------
 1159|   822k|            igraph_vector_int_destroy(al->adjs[i]);
 1160|       |            IGRAPH_FREE(al->adjs[i]);
  ------------------
  |  |   36|   822k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1161|   822k|        }
 1162|  2.32M|    }
 1163|  14.0k|}
igraph_i_lazy_adjlist_get_real:
 1178|   822k|igraph_vector_int_t *igraph_i_lazy_adjlist_get_real(igraph_lazy_adjlist_t *al, igraph_int_t no) {
 1179|   822k|    igraph_error_t ret;
 1180|       |
 1181|   822k|    if (al->adjs[no] == NULL) {
  ------------------
  |  Branch (1181:9): [True: 822k, False: 0]
  ------------------
 1182|   822k|        al->adjs[no] = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   33|   822k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  1.64M|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 822k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1183|   822k|        if (al->adjs[no] == NULL) {
  ------------------
  |  Branch (1183:13): [True: 0, False: 822k]
  ------------------
 1184|      0|            return NULL;
 1185|      0|        }
 1186|       |
 1187|   822k|        ret = igraph_vector_int_init(al->adjs[no], 0);
 1188|   822k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1188:13): [True: 0, False: 822k]
  ------------------
 1189|      0|            IGRAPH_FREE(al->adjs[no]);
  ------------------
  |  |   36|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1190|      0|            return NULL;
 1191|      0|        }
 1192|       |
 1193|   822k|        ret = igraph_neighbors(al->graph, al->adjs[no], no, al->mode, al->loops, al->multiple);
 1194|   822k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1194:13): [True: 0, False: 822k]
  ------------------
 1195|      0|            igraph_vector_int_destroy(al->adjs[no]);
 1196|      0|            IGRAPH_FREE(al->adjs[no]);
  ------------------
  |  |   36|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1197|      0|            return NULL;
 1198|      0|        }
 1199|   822k|    }
 1200|       |
 1201|   822k|    return al->adjs[no];
 1202|   822k|}
igraph_lazy_inclist_init:
 1247|  2.00k|                             igraph_loops_t loops) {
 1248|       |
 1249|  2.00k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1249:9): [True: 2.00k, False: 0]
  |  Branch (1249:30): [True: 0, False: 2.00k]
  |  Branch (1249:52): [True: 0, False: 0]
  ------------------
 1250|      0|        IGRAPH_ERROR("Cannot create lazy incidence list view.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1251|      0|    }
 1252|       |
 1253|  2.00k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1253:9): [True: 0, False: 2.00k]
  ------------------
 1254|      0|        mode = IGRAPH_ALL;
 1255|      0|    }
 1256|       |
 1257|  2.00k|    il->graph = graph;
 1258|  2.00k|    il->loops = loops;
 1259|  2.00k|    il->mode = mode;
 1260|       |
 1261|  2.00k|    il->length = igraph_vcount(graph);
 1262|  2.00k|    il->incs = IGRAPH_CALLOC(il->length, igraph_vector_int_t*);
  ------------------
  |  |   33|  2.00k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.00k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.00k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.00k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.00k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1263|  2.00k|    if (il->incs == 0) {
  ------------------
  |  Branch (1263:9): [True: 0, False: 2.00k]
  ------------------
 1264|      0|        IGRAPH_ERROR("Cannot create lazy incidence list view.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1265|      0|    }
 1266|       |
 1267|  2.00k|    return IGRAPH_SUCCESS;
 1268|       |
 1269|  2.00k|}
igraph_lazy_inclist_destroy:
 1282|  2.00k|void igraph_lazy_inclist_destroy(igraph_lazy_inclist_t *il) {
 1283|  2.00k|    igraph_lazy_inclist_clear(il);
 1284|       |    IGRAPH_FREE(il->incs);
  ------------------
  |  |   36|  2.00k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1285|  2.00k|}
igraph_lazy_inclist_clear:
 1296|  2.00k|void igraph_lazy_inclist_clear(igraph_lazy_inclist_t *il) {
 1297|  2.00k|    igraph_int_t i, n = il->length;
 1298|   334k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (1298:17): [True: 332k, False: 2.00k]
  ------------------
 1299|   332k|        if (il->incs[i] != 0) {
  ------------------
  |  Branch (1299:13): [True: 37.8k, False: 294k]
  ------------------
 1300|  37.8k|            igraph_vector_int_destroy(il->incs[i]);
 1301|       |            IGRAPH_FREE(il->incs[i]);
  ------------------
  |  |   36|  37.8k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1302|  37.8k|        }
 1303|   332k|    }
 1304|  2.00k|}
igraph_i_lazy_inclist_get_real:
 1319|  37.8k|igraph_vector_int_t *igraph_i_lazy_inclist_get_real(igraph_lazy_inclist_t *il, igraph_int_t no) {
 1320|  37.8k|    igraph_error_t ret;
 1321|       |
 1322|  37.8k|    if (il->incs[no] == NULL) {
  ------------------
  |  Branch (1322:9): [True: 37.8k, False: 0]
  ------------------
 1323|  37.8k|        il->incs[no] = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   33|  37.8k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  75.7k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 37.8k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1324|  37.8k|        if (il->incs[no] == NULL) {
  ------------------
  |  Branch (1324:13): [True: 0, False: 37.8k]
  ------------------
 1325|      0|            return NULL;
 1326|      0|        }
 1327|       |
 1328|  37.8k|        ret = igraph_vector_int_init(il->incs[no], 0);
 1329|  37.8k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1329:13): [True: 0, False: 37.8k]
  ------------------
 1330|      0|            IGRAPH_FREE(il->incs[no]);
  ------------------
  |  |   36|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1331|      0|            return NULL;
 1332|      0|        }
 1333|       |
 1334|  37.8k|        ret = igraph_incident(il->graph, il->incs[no], no, il->mode, il->loops);
 1335|  37.8k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1335:13): [True: 0, False: 37.8k]
  ------------------
 1336|      0|            igraph_vector_int_destroy(il->incs[no]);
 1337|      0|            IGRAPH_FREE(il->incs[no]);
  ------------------
  |  |   36|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1338|      0|            return NULL;
 1339|      0|        }
 1340|  37.8k|    }
 1341|       |
 1342|  37.8k|    return il->incs[no];
 1343|  37.8k|}
adjlist.c:igraph_i_simplify_sorted_int_adjacency_vector_in_place:
  876|  2.49M|) {
  877|  2.49M|    igraph_bool_t dummy1 = true, dummy2 = true; /* set dummies to avoid uninitialized read */
  878|  2.49M|    if (has_loops == NULL) {
  ------------------
  |  Branch (878:9): [True: 0, False: 2.49M]
  ------------------
  879|      0|        has_loops = &dummy1;
  880|      0|    }
  881|  2.49M|    if (has_multiple == NULL) {
  ------------------
  |  Branch (881:9): [True: 0, False: 2.49M]
  ------------------
  882|      0|        has_multiple = &dummy2;
  883|      0|    }
  884|       |
  885|  2.49M|    igraph_int_t i, p = 0;
  886|  2.49M|    igraph_int_t n = igraph_vector_int_size(v);
  887|       |
  888|  2.49M|    multiple = !!multiple; /* normalize Boolean value to enable == comparisons below */
  889|       |
  890|  2.49M|    if (
  891|  2.49M|        multiple == IGRAPH_MULTIPLE &&
  ------------------
  |  Branch (891:9): [True: 2.49M, False: 0]
  ------------------
  892|  2.49M|        (
  893|  2.49M|            loops == IGRAPH_LOOPS_TWICE ||
  ------------------
  |  Branch (893:13): [True: 91.2k, False: 2.40M]
  ------------------
  894|  2.40M|            (loops == IGRAPH_LOOPS_ONCE && (mode == IGRAPH_IN || mode == IGRAPH_OUT))
  ------------------
  |  Branch (894:14): [True: 2.40M, False: 0]
  |  Branch (894:45): [True: 998k, False: 1.40M]
  |  Branch (894:66): [True: 1.40M, False: 0]
  ------------------
  895|  2.49M|        )
  896|  2.49M|    ) {
  897|       |        /* nothing to simplify */
  898|  2.49M|        return IGRAPH_SUCCESS;
  899|  2.49M|    }
  900|       |
  901|      0|    if (loops == IGRAPH_NO_LOOPS) {
  ------------------
  |  Branch (901:9): [True: 0, False: 0]
  ------------------
  902|      0|        if (multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (902:13): [True: 0, False: 0]
  ------------------
  903|       |            /* We need to get rid of loops and multiple edges completely */
  904|      0|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (904:25): [True: 0, False: 0]
  ------------------
  905|      0|                if (VECTOR(*v)[i] != index &&
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (905:21): [True: 0, False: 0]
  ------------------
  906|      0|                    (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i])) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i])) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (906:22): [True: 0, False: 0]
  |  Branch (906:36): [True: 0, False: 0]
  ------------------
  907|      0|                    VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  908|      0|                    p++;
  909|      0|                } else {
  910|      0|                    if (VECTOR(*v)[i] == index) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (910:25): [True: 0, False: 0]
  ------------------
  911|      0|                        *has_loops = true;
  912|       |                        /* If we haven't found multi-edges yet, we also need to check
  913|       |                         * if this is a multi-loop, to set 'has_multiple' correctly. */
  914|      0|                        if (! *has_multiple) {
  ------------------
  |  Branch (914:29): [True: 0, False: 0]
  ------------------
  915|      0|                            if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (915:33): [True: 0, False: 0]
  ------------------
  916|       |                                /* Undirected loops appear twice in the neighbour list,
  917|       |                                 * so we check two following items instead of one. */
  918|      0|                                if (i < n - 2 &&
  ------------------
  |  Branch (918:37): [True: 0, False: 0]
  ------------------
  919|      0|                                    VECTOR(*v)[i + 1] == VECTOR(*v)[i] &&
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                                  VECTOR(*v)[i + 1] == VECTOR(*v)[i] &&
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (919:37): [True: 0, False: 0]
  ------------------
  920|      0|                                    VECTOR(*v)[i + 2] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                                  VECTOR(*v)[i + 2] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (920:37): [True: 0, False: 0]
  ------------------
  921|      0|                                    *has_multiple = true;
  922|      0|                                }
  923|      0|                            } else {
  924|      0|                                if (i != n - 1 && VECTOR(*v)[i + 1] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                              if (i != n - 1 && VECTOR(*v)[i + 1] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (924:37): [True: 0, False: 0]
  |  Branch (924:51): [True: 0, False: 0]
  ------------------
  925|      0|                                    *has_multiple = true;
  926|      0|                                }
  927|      0|                            }
  928|      0|                        }
  929|      0|                    } else if (i != n - 1 && VECTOR(*v)[i + 1] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  } else if (i != n - 1 && VECTOR(*v)[i + 1] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (929:32): [True: 0, False: 0]
  |  Branch (929:46): [True: 0, False: 0]
  ------------------
  930|      0|                        *has_multiple = true;
  931|      0|                    }
  932|      0|                }
  933|      0|            }
  934|      0|        } else {
  935|       |            /* We need to get rid of loops but keep multiple edges */
  936|      0|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (936:25): [True: 0, False: 0]
  ------------------
  937|      0|                if (VECTOR(*v)[i] != index) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (937:21): [True: 0, False: 0]
  ------------------
  938|      0|                    VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  939|      0|                    p++;
  940|      0|                } else {
  941|      0|                    *has_loops = true;
  942|      0|                }
  943|      0|            }
  944|      0|        }
  945|      0|    } else if (loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (945:16): [True: 0, False: 0]
  ------------------
  946|      0|        if (multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (946:13): [True: 0, False: 0]
  ------------------
  947|       |            /* We need to get rid of multiple edges completely (including
  948|       |             * multiple loop edges), but keep one edge from each loop edge */
  949|      0|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (949:25): [True: 0, False: 0]
  ------------------
  950|      0|                if (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (950:21): [True: 0, False: 0]
  |  Branch (950:35): [True: 0, False: 0]
  ------------------
  951|      0|                    VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  952|      0|                    p++;
  953|      0|                } else if (
  954|       |                        /* If this is not a loop then we have a multigraph.
  955|       |                           Else we have at least two loops.
  956|       |                           The v vector comes from a call to igraph_neighbors.
  957|       |                           This will count loops twice if mode == IGRAPH_ALL.
  958|       |                           So if mode != IGRAPH_ALL,
  959|       |                           then we have a multigraph.
  960|       |                           If mode == IGRAPH_ALL and we have three loops
  961|       |                           then we also have a multigraph
  962|       |                           */
  963|      0|                        (VECTOR(*v)[i] != index) ||
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (963:25): [True: 0, False: 0]
  ------------------
  964|      0|                       (mode != IGRAPH_ALL)  ||
  ------------------
  |  Branch (964:24): [True: 0, False: 0]
  ------------------
  965|      0|                       (mode == IGRAPH_ALL && i < n - 2 && VECTOR(*v)[i + 2] == VECTOR(*v)[i])
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                     (mode == IGRAPH_ALL && i < n - 2 && VECTOR(*v)[i + 2] == VECTOR(*v)[i])
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (965:25): [True: 0, False: 0]
  |  Branch (965:47): [True: 0, False: 0]
  |  Branch (965:60): [True: 0, False: 0]
  ------------------
  966|      0|                       ){
  967|      0|                    *has_multiple = true;
  968|      0|                }
  969|      0|            }
  970|      0|        } else {
  971|       |            /* We need to keep one edge from each loop edge and we don't need to
  972|       |             * touch multiple edges. Note that we can get here only if
  973|       |             * mode == IGRAPH_ALL; if mode was IGRAPH_IN or IGRAPH_OUT, we would
  974|       |             * have bailed out earlier */
  975|      0|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (975:25): [True: 0, False: 0]
  ------------------
  976|      0|                VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  977|      0|                if (VECTOR(*v)[i] == index) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (977:21): [True: 0, False: 0]
  ------------------
  978|      0|                    *has_loops = true;
  979|       |                    /* this was a loop edge so if the next element is the same, we
  980|       |                    * need to skip that */
  981|      0|                    if (i < n-1 && VECTOR(*v)[i + 1] == index) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (981:25): [True: 0, False: 0]
  |  Branch (981:36): [True: 0, False: 0]
  ------------------
  982|      0|                        i++;
  983|      0|                    }
  984|      0|                }
  985|      0|                p++;
  986|      0|            }
  987|      0|        }
  988|      0|    } else if (loops == IGRAPH_LOOPS_TWICE && multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (988:16): [True: 0, False: 0]
  |  Branch (988:47): [True: 0, False: 0]
  ------------------
  989|       |        /* We need to get rid of multiple edges completely (including
  990|       |         * multiple loop edges), but keep both edge from each loop edge */
  991|      0|        for (i = 0; i < n; i++) {
  ------------------
  |  Branch (991:21): [True: 0, False: 0]
  ------------------
  992|      0|            if (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (992:17): [True: 0, False: 0]
  |  Branch (992:31): [True: 0, False: 0]
  ------------------
  993|      0|                VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  994|      0|                p++;
  995|      0|            } else {
  996|       |                /* In ALL mode, two equal loop entries are the two incidences
  997|       |                 * of one edge. Only a third entry establishes parallel loops. */
  998|      0|                if (VECTOR(*v)[i] != index || mode != IGRAPH_ALL ||
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (998:21): [True: 0, False: 0]
  |  Branch (998:47): [True: 0, False: 0]
  ------------------
  999|      0|                    (i < n - 2 && VECTOR(*v)[i + 2] == index)) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (999:22): [True: 0, False: 0]
  |  Branch (999:35): [True: 0, False: 0]
  ------------------
 1000|      0|                    *has_multiple = true;
 1001|      0|                }
 1002|       |                /* Current item is the same as the next one, but if it is a
 1003|       |                 * loop edge, then the first one or two items are okay. We need
 1004|       |                 * to keep one if mode == IGRAPH_IN or mode == IGRAPH_OUT,
 1005|       |                 * otherwise we need to keep two */
 1006|      0|                if (VECTOR(*v)[i] == index) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1006:21): [True: 0, False: 0]
  ------------------
 1007|      0|                    VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1008|      0|                    p++;
 1009|      0|                    if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (1009:25): [True: 0, False: 0]
  ------------------
 1010|      0|                        VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1011|      0|                        p++;
 1012|      0|                    }
 1013|       |                    /* skip over all the items corresponding to the loop edges */
 1014|      0|                    while (i < n && VECTOR(*v)[i] == index) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1014:28): [True: 0, False: 0]
  |  Branch (1014:37): [True: 0, False: 0]
  ------------------
 1015|      0|                        i++;
 1016|      0|                    }
 1017|      0|                    i--; /* because the for loop also increases i by 1 */
 1018|      0|                }
 1019|      0|            }
 1020|      0|        }
 1021|      0|    } else {
 1022|       |        /* LOOPS_TWICE with MULTIPLE returned early above; invalid 'loops'
 1023|       |         * values are rejected by the caller. */
 1024|      0|        IGRAPH_FATAL("Must not reach here.");
  ------------------
  |  |  895|      0|    do { \
  |  |  896|      0|        igraph_fatal(reason, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  897|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (897:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1025|      0|    }
 1026|       |
 1027|       |    /* always succeeds since we are never growing the vector */
 1028|      0|    igraph_vector_int_resize(v, p);
 1029|       |
 1030|      0|    return IGRAPH_SUCCESS;
 1031|      0|}

igraph_i_attribute_init:
  617|  20.2k|) {
  618|  20.2k|    graph->attr = NULL;
  619|  20.2k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (619:9): [True: 0, False: 20.2k]
  ------------------
  620|      0|        IGRAPH_CHECK(igraph_i_attribute_table->init(graph, attr));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  621|      0|        if (graph->attr == NULL) {
  ------------------
  |  Branch (621:13): [True: 0, False: 0]
  ------------------
  622|      0|            IGRAPH_ERROR("Attribute handler did not initialize attr pointer.", IGRAPH_FAILURE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  623|      0|        }
  624|      0|    }
  625|  20.2k|    return IGRAPH_SUCCESS;
  626|  20.2k|}
igraph_i_attribute_destroy:
  628|  25.7k|void igraph_i_attribute_destroy(igraph_t *graph) {
  629|  25.7k|    if (graph->attr && igraph_i_attribute_table) {
  ------------------
  |  Branch (629:9): [True: 0, False: 25.7k]
  |  Branch (629:24): [True: 0, False: 0]
  ------------------
  630|      0|        igraph_i_attribute_table->destroy(graph);
  631|      0|    }
  632|       |    graph->attr = NULL;
  633|  25.7k|}
igraph_i_attribute_copy:
  636|  3.38k|                            igraph_bool_t va, igraph_bool_t ea) {
  637|  3.38k|    igraph_i_attribute_destroy(to);
  638|  3.38k|    if (from->attr && igraph_i_attribute_table) {
  ------------------
  |  Branch (638:9): [True: 0, False: 3.38k]
  |  Branch (638:23): [True: 0, False: 0]
  ------------------
  639|      0|        IGRAPH_CHECK(igraph_i_attribute_table->copy(to, from, ga, va, ea));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  640|      0|        if (to->attr == NULL) {
  ------------------
  |  Branch (640:13): [True: 0, False: 0]
  ------------------
  641|      0|            IGRAPH_ERROR("Attribute handler did not initialize attr pointer.", IGRAPH_FAILURE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  642|      0|        }
  643|      0|    }
  644|  3.38k|    return IGRAPH_SUCCESS;
  645|  3.38k|}
igraph_i_attribute_permute_vertices:
  659|    588|                                        const igraph_vector_int_t *idx) {
  660|       |    /* graph and newgraph may be the same, in which case we need to support
  661|       |     * in-place operations. If they are _not_ the same, it is assumed that the
  662|       |     * new graph has no vertex attributes yet */
  663|    588|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (663:9): [True: 0, False: 588]
  ------------------
  664|      0|        return igraph_i_attribute_table->permute_vertices(graph, newgraph, idx);
  665|    588|    } else {
  666|    588|        return IGRAPH_SUCCESS;
  667|    588|    }
  668|    588|}
igraph_i_attribute_permute_edges:
  700|    588|                                     const igraph_vector_int_t *idx) {
  701|       |    /* graph and newgraph may be the same, in which case we need to support
  702|       |     * in-place operations. If they are _not_ the same, it is assumed that the
  703|       |     * new graph has no edge attributes yet */
  704|    588|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (704:9): [True: 0, False: 588]
  ------------------
  705|      0|        return igraph_i_attribute_table->permute_edges(graph, newgraph, idx);
  706|    588|    } else {
  707|    588|        return IGRAPH_SUCCESS;
  708|    588|    }
  709|    588|}

igraph_are_adjacent:
   50|  3.08k|                         igraph_bool_t *res) {
   51|       |
   52|  3.08k|    igraph_int_t nov = igraph_vcount(graph);
   53|  3.08k|    igraph_int_t eid = -1;
   54|       |
   55|  3.08k|    if (v1 < 0 || v2 < 0 || v1 > nov - 1 || v2 > nov - 1) {
  ------------------
  |  Branch (55:9): [True: 0, False: 3.08k]
  |  Branch (55:19): [True: 0, False: 3.08k]
  |  Branch (55:29): [True: 0, False: 3.08k]
  |  Branch (55:45): [True: 0, False: 3.08k]
  ------------------
   56|      0|        IGRAPH_ERROR("Invalid vertex ID when checking if two vertices are connected.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   57|      0|    }
   58|       |
   59|  3.08k|    igraph_get_eid(graph, &eid, v1, v2, IGRAPH_DIRECTED, /*error=*/ false);
   60|  3.08k|    *res = (eid >= 0);
   61|       |
   62|  3.08k|    return IGRAPH_SUCCESS;
   63|  3.08k|}

igraph_i_property_cache_init:
   32|  22.2k|igraph_error_t igraph_i_property_cache_init(igraph_i_property_cache_t *cache) {
   33|  22.2k|    IGRAPH_STATIC_ASSERT(IGRAPH_PROP_I_SIZE <= 32);
  ------------------
  |  |   68|  22.2k|#define IGRAPH_STATIC_ASSERT(condition) ((void)sizeof(char[1 - 2*!(condition)]))
  ------------------
   34|       |
   35|  22.2k|    memset(cache->value, 0, sizeof(cache->value));
   36|  22.2k|    cache->known = 0;
   37|  22.2k|    return IGRAPH_SUCCESS;
   38|  22.2k|}
igraph_i_property_cache_copy:
   45|     70|        const igraph_i_property_cache_t *other_cache) {
   46|     70|    *cache = *other_cache;
   47|     70|    return IGRAPH_SUCCESS;
   48|     70|}
igraph_i_property_cache_destroy:
   53|  22.3k|void igraph_i_property_cache_destroy(igraph_i_property_cache_t *cache) {
   54|  22.3k|    IGRAPH_UNUSED(cache);
  ------------------
  |  |   30|  22.3k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
   55|       |    /* Nothing to do */
   56|  22.3k|}
igraph_i_property_cache_get_bool:
   72|  64.0k|igraph_bool_t igraph_i_property_cache_get_bool(const igraph_t *graph, igraph_cached_property_t prop) {
   73|  64.0k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  64.0k|    do { \
  |  |  925|  64.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   128k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 64.0k]
  |  |  |  |  |  Branch (612:52): [True: 64.0k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 64.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  64.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 64.0k]
  |  |  ------------------
  ------------------
   74|  64.0k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (74:5): [True: 0, False: 64.0k]
  |  Branch (74:5): [True: 64.0k, False: 0]
  ------------------
   75|  64.0k|    return graph->cache->value[prop];
   76|  64.0k|}
igraph_i_property_cache_has:
   84|  89.2k|igraph_bool_t igraph_i_property_cache_has(const igraph_t *graph, igraph_cached_property_t prop) {
   85|  89.2k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  89.2k|    do { \
  |  |  925|  89.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   178k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 89.2k]
  |  |  |  |  |  Branch (612:52): [True: 89.2k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 89.2k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  89.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 89.2k]
  |  |  ------------------
  ------------------
   86|  89.2k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (86:5): [True: 0, False: 89.2k]
  |  Branch (86:5): [True: 89.2k, False: 0]
  ------------------
   87|  89.2k|    return graph->cache->known & (1 << prop);
   88|  89.2k|}
igraph_i_property_cache_set_bool:
   97|  11.8k|void igraph_i_property_cache_set_bool(const igraph_t *graph, igraph_cached_property_t prop, igraph_bool_t value) {
   98|  11.8k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  11.8k|    do { \
  |  |  925|  11.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  23.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 11.8k]
  |  |  |  |  |  Branch (612:52): [True: 11.8k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 11.8k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  11.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 11.8k]
  |  |  ------------------
  ------------------
   99|  11.8k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (99:5): [True: 0, False: 11.8k]
  |  Branch (99:5): [True: 11.8k, False: 0]
  ------------------
  100|       |    /* Even though graph is const, updating the cache is not considered modification.
  101|       |     * Functions that merely compute graph properties, and thus leave the graph structure
  102|       |     * intact, will often update the cache. */
  103|  11.8k|    graph->cache->value[prop] = value;
  104|  11.8k|    graph->cache->known |= (1 << prop);
  105|  11.8k|}
igraph_i_property_cache_set_bool_checked:
  123|  16.6k|void igraph_i_property_cache_set_bool_checked(const igraph_t *graph, igraph_cached_property_t prop, igraph_bool_t value) {
  124|  16.6k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  16.6k|    do { \
  |  |  925|  16.6k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  33.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 16.6k]
  |  |  |  |  |  Branch (612:52): [True: 16.6k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 16.6k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  16.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 16.6k]
  |  |  ------------------
  ------------------
  125|  16.6k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (125:5): [True: 0, False: 16.6k]
  |  Branch (125:5): [True: 16.6k, False: 0]
  ------------------
  126|       |    /* Even though graph is const, updating the cache is not considered modification.
  127|       |     * Functions that merely compute graph properties, and thus leave the graph structure
  128|       |     * intact, will often update the cache. */
  129|  16.6k|    if (graph->cache->known & (1 << prop)) {
  ------------------
  |  Branch (129:9): [True: 4.85k, False: 11.8k]
  ------------------
  130|  4.85k|        IGRAPH_ASSERT(graph->cache->value[prop] == value);
  ------------------
  |  |  924|  4.85k|    do { \
  |  |  925|  4.85k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.85k]
  |  |  ------------------
  ------------------
  131|  11.8k|    } else {
  132|  11.8k|        igraph_i_property_cache_set_bool(graph, prop, value);
  133|  11.8k|    }
  134|  16.6k|}
igraph_i_property_cache_invalidate_conditionally:
  182|  52.7k|) {
  183|  52.7k|    uint32_t invalidate = ~keep_always;
  184|  52.7k|    uint32_t mask;
  185|  52.7k|    uint32_t maybe_keep;
  186|  52.7k|    igraph_bool_t cached_value;
  187|       |
  188|  52.7k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (188:5): [True: 0, False: 52.7k]
  |  Branch (188:5): [True: 52.7k, False: 0]
  ------------------
  189|       |
  190|       |    /* The bits of maybe_keep are set to 1 for those properties that are:
  191|       |     *
  192|       |     * - currently cached
  193|       |     * - should _probably_ be invalidated
  194|       |     * - _but_ the current cached value of the property may change the decision
  195|       |     */
  196|  52.7k|    maybe_keep = graph->cache->known & invalidate & (keep_when_false | keep_when_true);
  197|       |
  198|  52.7k|    if (maybe_keep) {
  ------------------
  |  Branch (198:9): [True: 1.61k, False: 51.1k]
  ------------------
  199|  12.8k|        for (igraph_cached_property_t prop = (igraph_cached_property_t ) 0; prop < IGRAPH_PROP_I_SIZE; ++prop) {
  ------------------
  |  Branch (199:77): [True: 11.2k, False: 1.61k]
  ------------------
  200|  11.2k|            mask = 1 << prop;
  201|  11.2k|            if (maybe_keep & mask) {
  ------------------
  |  Branch (201:17): [True: 4.04k, False: 7.22k]
  ------------------
  202|       |                /* if we get here, we know that the property is cached; we have
  203|       |                 * masked maybe_keep with graph->cache->known */
  204|  4.04k|                cached_value = igraph_i_property_cache_get_bool(graph, prop);
  205|  4.04k|                if (
  206|  4.04k|                    ((keep_when_false & mask) && !cached_value) ||
  ------------------
  |  Branch (206:22): [True: 3.78k, False: 265]
  |  Branch (206:50): [True: 3.39k, False: 389]
  ------------------
  207|    654|                    ((keep_when_true & mask) && cached_value)
  ------------------
  |  Branch (207:22): [True: 265, False: 389]
  |  Branch (207:49): [True: 0, False: 265]
  ------------------
  208|  4.04k|                ) {
  209|  3.39k|                    invalidate &= ~mask;
  210|  3.39k|                }
  211|  4.04k|            }
  212|  11.2k|        }
  213|  1.61k|    }
  214|       |
  215|  52.7k|    graph->cache->known &= ~invalidate;
  216|  52.7k|}

graph_list.c:igraph_i_graph_list_destroy_item:
   58|    658|static void igraph_i_graph_list_destroy_item(igraph_t* item) {
   59|    658|    igraph_destroy(item);
   60|    658|}

igraph_vss_all:
  115|  47.3k|igraph_vs_t igraph_vss_all(void) {
  116|  47.3k|    igraph_vs_t allvs;
  117|  47.3k|    allvs.type = IGRAPH_VS_ALL;
  118|  47.3k|    return allvs;
  119|  47.3k|}
igraph_vss_1:
  292|  13.2k|igraph_vs_t igraph_vss_1(igraph_int_t vid) {
  293|  13.2k|    igraph_vs_t onevs;
  294|  13.2k|    onevs.type = IGRAPH_VS_1;
  295|  13.2k|    onevs.data.vid = vid;
  296|  13.2k|    return onevs;
  297|  13.2k|}
igraph_vss_vector:
  344|    728|igraph_vs_t igraph_vss_vector(const igraph_vector_int_t *v) {
  345|    728|    igraph_vs_t vecvs;
  346|    728|    vecvs.type = IGRAPH_VS_VECTORPTR;
  347|    728|    vecvs.data.vecptr = v;
  348|    728|    return vecvs;
  349|    728|}
igraph_vs_is_all:
  544|  4.81k|igraph_bool_t igraph_vs_is_all(const igraph_vs_t *vs) {
  545|  4.81k|    return vs->type == IGRAPH_VS_ALL;
  546|  4.81k|}
igraph_vs_size:
  614|    658|                   igraph_int_t *result) {
  615|    658|    igraph_vector_int_t vec;
  616|    658|    igraph_bool_t *seen;
  617|    658|    igraph_int_t i;
  618|    658|    igraph_int_t vec_len;
  619|       |
  620|    658|    switch (vs->type) {
  ------------------
  |  Branch (620:13): [True: 658, False: 0]
  ------------------
  621|      0|    case IGRAPH_VS_NONE:
  ------------------
  |  Branch (621:5): [True: 0, False: 658]
  ------------------
  622|      0|        *result = 0; return IGRAPH_SUCCESS;
  623|       |
  624|      0|    case IGRAPH_VS_1:
  ------------------
  |  Branch (624:5): [True: 0, False: 658]
  ------------------
  625|      0|        *result = 0;
  626|      0|        if (vs->data.vid < igraph_vcount(graph) && vs->data.vid >= 0) {
  ------------------
  |  Branch (626:13): [True: 0, False: 0]
  |  Branch (626:52): [True: 0, False: 0]
  ------------------
  627|      0|            *result = 1;
  628|      0|        }
  629|      0|        return IGRAPH_SUCCESS;
  630|       |
  631|      0|    case IGRAPH_VS_RANGE:
  ------------------
  |  Branch (631:5): [True: 0, False: 658]
  ------------------
  632|      0|        *result = vs->data.range.end - vs->data.range.start;
  633|      0|        return IGRAPH_SUCCESS;
  634|       |
  635|      0|    case IGRAPH_VS_ALL:
  ------------------
  |  Branch (635:5): [True: 0, False: 658]
  ------------------
  636|      0|        *result = igraph_vcount(graph); return IGRAPH_SUCCESS;
  637|       |
  638|      0|    case IGRAPH_VS_ADJ:
  ------------------
  |  Branch (638:5): [True: 0, False: 658]
  ------------------
  639|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vec, 0);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  640|      0|        IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  641|      0|            graph, &vec, vs->data.adj.vid, vs->data.adj.mode,
  642|      0|            vs->data.adj.loops, vs->data.adj.multiple
  643|      0|        ));
  644|      0|        *result = igraph_vector_int_size(&vec);
  645|      0|        igraph_vector_int_destroy(&vec);
  646|      0|        IGRAPH_FINALLY_CLEAN(1);
  647|      0|        return IGRAPH_SUCCESS;
  648|       |
  649|      0|    case IGRAPH_VS_NONADJ:
  ------------------
  |  Branch (649:5): [True: 0, False: 658]
  ------------------
  650|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vec, 0);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  651|      0|        IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  652|      0|            graph, &vec, vs->data.adj.vid, vs->data.adj.mode,
  653|      0|            vs->data.adj.loops, vs->data.adj.multiple
  654|      0|        ));
  655|      0|        vec_len = igraph_vector_int_size(&vec);
  656|      0|        *result = igraph_vcount(graph);
  657|      0|        seen = IGRAPH_CALLOC(*result, igraph_bool_t);
  ------------------
  |  |   33|      0|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|      0|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 0, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  658|      0|        IGRAPH_CHECK_OOM(seen, "Cannot calculate vertex selector length.");
  ------------------
  |  |  709|      0|    do { \
  |  |  710|      0|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  659|      0|        IGRAPH_FINALLY(igraph_free, seen);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  660|      0|        for (i = 0; i < vec_len; i++) {
  ------------------
  |  Branch (660:21): [True: 0, False: 0]
  ------------------
  661|      0|            if (!seen[ VECTOR(vec)[i] ]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (661:17): [True: 0, False: 0]
  ------------------
  662|      0|                (*result)--;
  663|      0|                seen[ VECTOR(vec)[i] ] = true;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  664|      0|            }
  665|      0|        }
  666|      0|        igraph_free(seen);
  667|      0|        igraph_vector_int_destroy(&vec);
  668|      0|        IGRAPH_FINALLY_CLEAN(2);
  669|      0|        return IGRAPH_SUCCESS;
  670|       |
  671|      0|    case IGRAPH_VS_VECTOR:
  ------------------
  |  Branch (671:5): [True: 0, False: 658]
  ------------------
  672|    658|    case IGRAPH_VS_VECTORPTR:
  ------------------
  |  Branch (672:5): [True: 658, False: 0]
  ------------------
  673|    658|        *result = igraph_vector_int_size(vs->data.vecptr);
  674|    658|        return IGRAPH_SUCCESS;
  675|    658|    }
  676|       |
  677|      0|    IGRAPH_ERROR("Cannot calculate selector length, invalid selector type.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  678|      0|                 IGRAPH_EINVAL);
  679|      0|}
igraph_vit_create:
  715|  59.3k|igraph_error_t igraph_vit_create(const igraph_t *graph, igraph_vs_t vs, igraph_vit_t *vit) {
  716|  59.3k|    igraph_vector_int_t vec;
  717|  59.3k|    igraph_vector_int_t *vec_int;
  718|  59.3k|    igraph_bool_t *seen;
  719|  59.3k|    igraph_int_t i, j, n;
  720|  59.3k|    igraph_int_t vec_len;
  721|       |
  722|  59.3k|    switch (vs.type) {
  723|  45.3k|    case IGRAPH_VS_ALL:
  ------------------
  |  Branch (723:5): [True: 45.3k, False: 13.9k]
  ------------------
  724|  45.3k|        vit->type = IGRAPH_VIT_RANGE;
  725|  45.3k|        vit->pos = 0;
  726|  45.3k|        vit->start = 0;
  727|  45.3k|        vit->end = igraph_vcount(graph);
  728|  45.3k|        break;
  729|      0|    case IGRAPH_VS_ADJ:
  ------------------
  |  Branch (729:5): [True: 0, False: 59.3k]
  ------------------
  730|      0|        vec_int = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   33|      0|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|      0|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  731|      0|        IGRAPH_CHECK_OOM(vec_int, "Cannot create vertex iterator.");
  ------------------
  |  |  709|      0|    do { \
  |  |  710|      0|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  732|      0|        IGRAPH_FINALLY(igraph_free, vec_int);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  733|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(vec_int, 0);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  734|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vec, 0);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  735|      0|        IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  736|      0|            graph, &vec, vs.data.adj.vid, vs.data.adj.mode,
  737|      0|            vs.data.adj.loops, vs.data.adj.multiple
  738|      0|        ));
  739|      0|        n = igraph_vector_int_size(&vec);
  740|      0|        IGRAPH_CHECK(igraph_vector_int_resize(vec_int, n));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  741|      0|        for (i = 0; i < n; i++) {
  ------------------
  |  Branch (741:21): [True: 0, False: 0]
  ------------------
  742|      0|            VECTOR(*vec_int)[i] = VECTOR(vec)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*vec_int)[i] = VECTOR(vec)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  743|      0|        }
  744|       |
  745|      0|        igraph_vector_int_destroy(&vec);
  746|      0|        IGRAPH_FINALLY_CLEAN(3);
  747|       |
  748|      0|        vit->type = IGRAPH_VIT_VECTOR;
  749|      0|        vit->pos = 0;
  750|      0|        vit->start = 0;
  751|      0|        vit->vec = vec_int;
  752|      0|        vit->end = n;
  753|       |
  754|      0|        break;
  755|      0|    case IGRAPH_VS_NONADJ:
  ------------------
  |  Branch (755:5): [True: 0, False: 59.3k]
  ------------------
  756|      0|        vec_int = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   33|      0|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|      0|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  757|      0|        IGRAPH_CHECK_OOM(vec_int, "Cannot create vertex iterator.");
  ------------------
  |  |  709|      0|    do { \
  |  |  710|      0|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  758|      0|        IGRAPH_FINALLY(igraph_free, vec_int);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  759|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(vec_int, 0);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  760|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vec, 0);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  761|      0|        IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  762|      0|            graph, &vec, vs.data.adj.vid, vs.data.adj.mode,
  763|      0|            vs.data.adj.loops, vs.data.adj.multiple
  764|      0|        ));
  765|      0|        vec_len = igraph_vector_int_size(&vec);
  766|      0|        n = igraph_vcount(graph);
  767|      0|        seen = IGRAPH_CALLOC(n, igraph_bool_t);
  ------------------
  |  |   33|      0|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|      0|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 0, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  768|      0|        IGRAPH_CHECK_OOM(seen, "Cannot create vertex iterator.");
  ------------------
  |  |  709|      0|    do { \
  |  |  710|      0|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  769|      0|        IGRAPH_FINALLY(igraph_free, seen);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  770|      0|        for (i = 0; i < vec_len; i++) {
  ------------------
  |  Branch (770:21): [True: 0, False: 0]
  ------------------
  771|      0|            if (! seen [ VECTOR(vec)[i] ] ) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (771:17): [True: 0, False: 0]
  ------------------
  772|      0|                n--;
  773|      0|                seen[ VECTOR(vec)[i] ] = true;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  774|      0|            }
  775|      0|        }
  776|      0|        IGRAPH_CHECK(igraph_vector_int_resize(vec_int, n));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  777|      0|        for (i = 0, j = 0; j < n; i++) {
  ------------------
  |  Branch (777:28): [True: 0, False: 0]
  ------------------
  778|      0|            if (!seen[i]) {
  ------------------
  |  Branch (778:17): [True: 0, False: 0]
  ------------------
  779|      0|                VECTOR(*vec_int)[j++] = i;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  780|      0|            }
  781|      0|        }
  782|       |
  783|      0|        IGRAPH_FREE(seen);
  ------------------
  |  |   36|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  784|      0|        igraph_vector_int_destroy(&vec);
  785|      0|        IGRAPH_FINALLY_CLEAN(4);
  786|       |
  787|      0|        vit->type = IGRAPH_VIT_VECTOR;
  788|      0|        vit->pos = 0;
  789|      0|        vit->start = 0;
  790|      0|        vit->vec = vec_int;
  791|      0|        vit->end = n;
  792|      0|        break;
  793|      0|    case IGRAPH_VS_NONE:
  ------------------
  |  Branch (793:5): [True: 0, False: 59.3k]
  ------------------
  794|      0|        vit->type = IGRAPH_VIT_RANGE;
  795|      0|        vit->pos = 0;
  796|      0|        vit->start = 0;
  797|      0|        vit->end = 0;
  798|      0|        break;
  799|  13.2k|    case IGRAPH_VS_1:
  ------------------
  |  Branch (799:5): [True: 13.2k, False: 46.1k]
  ------------------
  800|  13.2k|        if (vs.data.vid < 0 || vs.data.vid >= igraph_vcount(graph)) {
  ------------------
  |  Branch (800:13): [True: 0, False: 13.2k]
  |  Branch (800:32): [True: 0, False: 13.2k]
  ------------------
  801|      0|            IGRAPH_ERROR("Cannot create iterator, invalid vertex ID.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  802|      0|        }
  803|  13.2k|        vit->type = IGRAPH_VIT_RANGE;
  804|  13.2k|        vit->pos = vs.data.vid;
  805|  13.2k|        vit->start = vs.data.vid;
  806|  13.2k|        vit->end = vs.data.vid + 1;
  807|  13.2k|        break;
  808|    728|    case IGRAPH_VS_VECTORPTR:
  ------------------
  |  Branch (808:5): [True: 728, False: 58.6k]
  ------------------
  809|    728|    case IGRAPH_VS_VECTOR:
  ------------------
  |  Branch (809:5): [True: 0, False: 59.3k]
  ------------------
  810|    728|        vit->type = IGRAPH_VIT_VECTORPTR;
  811|    728|        vit->pos = 0;
  812|    728|        vit->start = 0;
  813|    728|        vit->vec = vs.data.vecptr;
  814|    728|        vit->end = igraph_vector_int_size(vit->vec);
  815|    728|        if (!igraph_vector_int_isininterval(vit->vec, 0, igraph_vcount(graph) - 1)) {
  ------------------
  |  Branch (815:13): [True: 0, False: 728]
  ------------------
  816|      0|            IGRAPH_ERROR("Cannot create iterator, invalid vertex ID.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  817|      0|        }
  818|    728|        break;
  819|    728|    case IGRAPH_VS_RANGE:
  ------------------
  |  Branch (819:5): [True: 0, False: 59.3k]
  ------------------
  820|      0|        {
  821|      0|            igraph_int_t no_of_nodes = igraph_vcount(graph);
  822|      0|            if (vs.data.range.start < 0 ||
  ------------------
  |  Branch (822:17): [True: 0, False: 0]
  ------------------
  823|      0|                vs.data.range.start > no_of_nodes ||
  ------------------
  |  Branch (823:17): [True: 0, False: 0]
  ------------------
  824|      0|                (no_of_nodes > 0 && vs.data.range.start == no_of_nodes)) {
  ------------------
  |  Branch (824:18): [True: 0, False: 0]
  |  Branch (824:37): [True: 0, False: 0]
  ------------------
  825|      0|                IGRAPH_ERROR("Cannot create range iterator, starting vertex ID out of range.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  826|      0|            }
  827|      0|            if (vs.data.range.end < 0 || vs.data.range.end > no_of_nodes) {
  ------------------
  |  Branch (827:17): [True: 0, False: 0]
  |  Branch (827:42): [True: 0, False: 0]
  ------------------
  828|      0|                IGRAPH_ERROR("Cannot create range iterator, ending vertex ID out of range.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  829|      0|            }
  830|      0|        }
  831|      0|        vit->type = IGRAPH_VIT_RANGE;
  832|      0|        vit->pos = vs.data.range.start;
  833|      0|        vit->start = vs.data.range.start;
  834|      0|        vit->end = vs.data.range.end;
  835|      0|        break;
  836|      0|    default:
  ------------------
  |  Branch (836:5): [True: 0, False: 59.3k]
  ------------------
  837|      0|        IGRAPH_ERROR("Cannot create iterator, invalid selector.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  838|      0|        break;
  839|  59.3k|    }
  840|  59.3k|    return IGRAPH_SUCCESS;
  841|  59.3k|}
igraph_vit_destroy:
  856|  59.3k|void igraph_vit_destroy(const igraph_vit_t *vit) {
  857|  59.3k|    switch (vit->type) {
  858|  58.6k|    case IGRAPH_VIT_RANGE:
  ------------------
  |  Branch (858:5): [True: 58.6k, False: 728]
  ------------------
  859|  59.3k|    case IGRAPH_VIT_VECTORPTR:
  ------------------
  |  Branch (859:5): [True: 728, False: 58.6k]
  ------------------
  860|  59.3k|        break;
  861|      0|    case IGRAPH_VIT_VECTOR:
  ------------------
  |  Branch (861:5): [True: 0, False: 59.3k]
  ------------------
  862|      0|        igraph_vector_int_destroy((igraph_vector_int_t*) vit->vec);
  863|      0|        igraph_free((igraph_vector_int_t*) vit->vec);
  864|      0|        break;
  865|      0|    default:
  ------------------
  |  Branch (865:5): [True: 0, False: 59.3k]
  ------------------
  866|       |        /*     IGRAPH_ERROR("Cannot destroy iterator, unknown type", IGRAPH_EINVAL); */
  867|      0|        break;
  868|  59.3k|    }
  869|  59.3k|}
igraph_vit_as_vector:
  871|    588|igraph_error_t igraph_vit_as_vector(const igraph_vit_t *vit, igraph_vector_int_t *v) {
  872|    588|    igraph_int_t i;
  873|       |
  874|    588|    IGRAPH_CHECK(igraph_vector_int_resize(v, IGRAPH_VIT_SIZE(*vit)));
  ------------------
  |  |  656|    588|    do { \
  |  |  657|    588|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    588|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    588|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 588]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    588|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 588]
  |  |  ------------------
  ------------------
  875|       |
  876|    588|    switch (vit->type) {
  877|      0|    case IGRAPH_VIT_RANGE:
  ------------------
  |  Branch (877:5): [True: 0, False: 588]
  ------------------
  878|      0|        for (i = 0; i < IGRAPH_VIT_SIZE(*vit); i++) {
  ------------------
  |  |  190|      0|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  |  Branch (878:21): [True: 0, False: 0]
  ------------------
  879|      0|            VECTOR(*v)[i] = vit->start + i;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  880|      0|        }
  881|      0|        break;
  882|      0|    case IGRAPH_VIT_VECTOR:
  ------------------
  |  Branch (882:5): [True: 0, False: 588]
  ------------------
  883|    588|    case IGRAPH_VIT_VECTORPTR:
  ------------------
  |  Branch (883:5): [True: 588, False: 0]
  ------------------
  884|  19.6k|        for (i = 0; i < IGRAPH_VIT_SIZE(*vit); i++) {
  ------------------
  |  |  190|  19.6k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  |  Branch (884:21): [True: 19.0k, False: 588]
  ------------------
  885|  19.0k|            VECTOR(*v)[i] = VECTOR(*vit->vec)[i];
  ------------------
  |  |   60|  19.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*v)[i] = VECTOR(*vit->vec)[i];
  ------------------
  |  |   60|  19.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  886|  19.0k|        }
  887|    588|        break;
  888|      0|    default:
  ------------------
  |  Branch (888:5): [True: 0, False: 588]
  ------------------
  889|      0|        IGRAPH_ERROR("Cannot convert to vector, unknown iterator type.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  890|      0|                     IGRAPH_EINVAL);
  891|      0|        break;
  892|    588|    }
  893|       |
  894|    588|    return IGRAPH_SUCCESS;
  895|    588|}
igraph_es_all:
  924|  14.3k|                  igraph_edgeorder_type_t order) {
  925|  14.3k|    switch (order) {
  926|  5.70k|    case IGRAPH_EDGEORDER_ID:
  ------------------
  |  Branch (926:5): [True: 5.70k, False: 8.63k]
  ------------------
  927|  5.70k|        es->type = IGRAPH_ES_ALL;
  928|  5.70k|        break;
  929|  4.63k|    case IGRAPH_EDGEORDER_FROM:
  ------------------
  |  Branch (929:5): [True: 4.63k, False: 9.70k]
  ------------------
  930|  4.63k|        es->type = IGRAPH_ES_ALLFROM;
  931|  4.63k|        break;
  932|  4.00k|    case IGRAPH_EDGEORDER_TO:
  ------------------
  |  Branch (932:5): [True: 4.00k, False: 10.3k]
  ------------------
  933|  4.00k|        es->type = IGRAPH_ES_ALLTO;
  934|  4.00k|        break;
  935|      0|    default:
  ------------------
  |  Branch (935:5): [True: 0, False: 14.3k]
  ------------------
  936|      0|        IGRAPH_ERROR("Invalid edge order, cannot create selector.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  937|      0|        break;
  938|  14.3k|    }
  939|  14.3k|    return IGRAPH_SUCCESS;
  940|  14.3k|}
igraph_ess_all:
  956|  13.4k|igraph_es_t igraph_ess_all(igraph_edgeorder_type_t order) {
  957|  13.4k|    igraph_es_t es;
  958|  13.4k|    igraph_es_all(&es, order); /* cannot fail */
  959|  13.4k|    return es;
  960|  13.4k|}
igraph_ess_1:
 1061|  2.00k|igraph_es_t igraph_ess_1(igraph_int_t eid) {
 1062|  2.00k|    igraph_es_t es;
 1063|  2.00k|    es.type = IGRAPH_ES_1;
 1064|  2.00k|    es.data.eid = eid;
 1065|  2.00k|    return es;
 1066|  2.00k|}
igraph_ess_vector:
 1142|    733|igraph_es_t igraph_ess_vector(const igraph_vector_int_t *v) {
 1143|    733|    igraph_es_t es;
 1144|    733|    es.type = IGRAPH_ES_VECTORPTR;
 1145|    733|    es.data.vecptr = v;
 1146|    733|    return es;
 1147|    733|}
igraph_es_destroy:
 1411|    916|void igraph_es_destroy(igraph_es_t *es) {
 1412|    916|    switch (es->type) {
 1413|    265|    case IGRAPH_ES_ALL:
  ------------------
  |  Branch (1413:5): [True: 265, False: 651]
  ------------------
 1414|    916|    case IGRAPH_ES_ALLFROM:
  ------------------
  |  Branch (1414:5): [True: 651, False: 265]
  ------------------
 1415|    916|    case IGRAPH_ES_ALLTO:
  ------------------
  |  Branch (1415:5): [True: 0, False: 916]
  ------------------
 1416|    916|    case IGRAPH_ES_INCIDENT:
  ------------------
  |  Branch (1416:5): [True: 0, False: 916]
  ------------------
 1417|    916|    case IGRAPH_ES_NONE:
  ------------------
  |  Branch (1417:5): [True: 0, False: 916]
  ------------------
 1418|    916|    case IGRAPH_ES_1:
  ------------------
  |  Branch (1418:5): [True: 0, False: 916]
  ------------------
 1419|    916|    case IGRAPH_ES_VECTORPTR:
  ------------------
  |  Branch (1419:5): [True: 0, False: 916]
  ------------------
 1420|    916|    case IGRAPH_ES_RANGE:
  ------------------
  |  Branch (1420:5): [True: 0, False: 916]
  ------------------
 1421|    916|    case IGRAPH_ES_ALL_BETWEEN:
  ------------------
  |  Branch (1421:5): [True: 0, False: 916]
  ------------------
 1422|    916|        break;
 1423|      0|    case IGRAPH_ES_VECTOR:
  ------------------
  |  Branch (1423:5): [True: 0, False: 916]
  ------------------
 1424|      0|        igraph_vector_int_destroy((igraph_vector_int_t*)es->data.vecptr);
 1425|      0|        IGRAPH_FREE(es->data.vecptr);
  ------------------
  |  |   36|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1426|      0|        break;
 1427|      0|    case IGRAPH_ES_PAIRS:
  ------------------
  |  Branch (1427:5): [True: 0, False: 916]
  ------------------
 1428|      0|    case IGRAPH_ES_PATH:
  ------------------
  |  Branch (1428:5): [True: 0, False: 916]
  ------------------
 1429|      0|        igraph_vector_int_destroy((igraph_vector_int_t*)es->data.path.ptr);
 1430|      0|        IGRAPH_FREE(es->data.path.ptr);
  ------------------
  |  |   36|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1431|      0|        break;
 1432|      0|    default:
  ------------------
  |  Branch (1432:5): [True: 0, False: 916]
  ------------------
 1433|      0|        break;
 1434|    916|    }
 1435|    916|}
igraph_es_is_all:
 1448|  3.33k|igraph_bool_t igraph_es_is_all(const igraph_es_t *es) {
 1449|  3.33k|    return es->type == IGRAPH_ES_ALL;
 1450|  3.33k|}
igraph_eit_create:
 1928|  16.0k|igraph_error_t igraph_eit_create(const igraph_t *graph, igraph_es_t es, igraph_eit_t *eit) {
 1929|  16.0k|    switch (es.type) {
 1930|  3.70k|    case IGRAPH_ES_ALL:
  ------------------
  |  Branch (1930:5): [True: 3.70k, False: 12.3k]
  ------------------
 1931|  3.70k|        eit->type = IGRAPH_EIT_RANGE;
 1932|  3.70k|        eit->pos = 0;
 1933|  3.70k|        eit->start = 0;
 1934|  3.70k|        eit->end = igraph_ecount(graph);
 1935|  3.70k|        break;
 1936|  4.63k|    case IGRAPH_ES_ALLFROM:
  ------------------
  |  Branch (1936:5): [True: 4.63k, False: 11.4k]
  ------------------
 1937|  4.63k|        IGRAPH_CHECK(igraph_i_eit_create_allfromto(graph, eit, IGRAPH_OUT));
  ------------------
  |  |  656|  4.63k|    do { \
  |  |  657|  4.63k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.63k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.63k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.63k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.63k]
  |  |  ------------------
  ------------------
 1938|  4.63k|        break;
 1939|  4.63k|    case IGRAPH_ES_ALLTO:
  ------------------
  |  Branch (1939:5): [True: 4.00k, False: 12.0k]
  ------------------
 1940|  4.00k|        IGRAPH_CHECK(igraph_i_eit_create_allfromto(graph, eit, IGRAPH_IN));
  ------------------
  |  |  656|  4.00k|    do { \
  |  |  657|  4.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
 1941|  4.00k|        break;
 1942|  4.00k|    case IGRAPH_ES_INCIDENT:
  ------------------
  |  Branch (1942:5): [True: 0, False: 16.0k]
  ------------------
 1943|      0|        IGRAPH_CHECK(igraph_i_eit_create_incident(graph, es, eit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1944|      0|        break;
 1945|      0|    case IGRAPH_ES_NONE:
  ------------------
  |  Branch (1945:5): [True: 0, False: 16.0k]
  ------------------
 1946|      0|        eit->type = IGRAPH_EIT_RANGE;
 1947|      0|        eit->pos = 0;
 1948|      0|        eit->start = 0;
 1949|      0|        eit->end = 0;
 1950|      0|        break;
 1951|  2.00k|    case IGRAPH_ES_1:
  ------------------
  |  Branch (1951:5): [True: 2.00k, False: 14.0k]
  ------------------
 1952|  2.00k|        if (es.data.eid < 0 || es.data.eid >= igraph_ecount(graph)) {
  ------------------
  |  Branch (1952:13): [True: 0, False: 2.00k]
  |  Branch (1952:32): [True: 0, False: 2.00k]
  ------------------
 1953|      0|            IGRAPH_ERROR("Cannot create iterator, invalid edge ID.", IGRAPH_EINVEID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1954|      0|        }
 1955|  2.00k|        eit->type = IGRAPH_EIT_RANGE;
 1956|  2.00k|        eit->pos = es.data.eid;
 1957|  2.00k|        eit->start = es.data.eid;
 1958|  2.00k|        eit->end = es.data.eid + 1;
 1959|  2.00k|        break;
 1960|      0|    case IGRAPH_ES_VECTOR:
  ------------------
  |  Branch (1960:5): [True: 0, False: 16.0k]
  ------------------
 1961|  1.71k|    case IGRAPH_ES_VECTORPTR:
  ------------------
  |  Branch (1961:5): [True: 1.71k, False: 14.3k]
  ------------------
 1962|  1.71k|        eit->type = IGRAPH_EIT_VECTORPTR;
 1963|  1.71k|        eit->pos = 0;
 1964|  1.71k|        eit->start = 0;
 1965|  1.71k|        eit->vec = es.data.vecptr;
 1966|  1.71k|        eit->end = igraph_vector_int_size(eit->vec);
 1967|  1.71k|        if (!igraph_vector_int_isininterval(eit->vec, 0, igraph_ecount(graph) - 1)) {
  ------------------
  |  Branch (1967:13): [True: 0, False: 1.71k]
  ------------------
 1968|      0|            IGRAPH_ERROR("Cannot create iterator.", IGRAPH_EINVEID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1969|      0|        }
 1970|  1.71k|        break;
 1971|  1.71k|    case IGRAPH_ES_RANGE:
  ------------------
  |  Branch (1971:5): [True: 0, False: 16.0k]
  ------------------
 1972|      0|        {
 1973|      0|            igraph_int_t no_of_edges = igraph_ecount(graph);
 1974|      0|            if (es.data.range.start < 0 ||
  ------------------
  |  Branch (1974:17): [True: 0, False: 0]
  ------------------
 1975|      0|                es.data.range.start > no_of_edges ||
  ------------------
  |  Branch (1975:17): [True: 0, False: 0]
  ------------------
 1976|      0|                (no_of_edges > 0 && es.data.range.start == no_of_edges)) {
  ------------------
  |  Branch (1976:18): [True: 0, False: 0]
  |  Branch (1976:37): [True: 0, False: 0]
  ------------------
 1977|      0|                IGRAPH_ERROR("Cannot create range iterator, starting edge ID out of range.", IGRAPH_EINVEID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1978|      0|            }
 1979|      0|            if (es.data.range.end < 0 || es.data.range.end > no_of_edges) {
  ------------------
  |  Branch (1979:17): [True: 0, False: 0]
  |  Branch (1979:42): [True: 0, False: 0]
  ------------------
 1980|      0|                IGRAPH_ERROR("Cannot create range iterator, ending edge ID out of range.", IGRAPH_EINVEID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1981|      0|            }
 1982|      0|        }
 1983|      0|        eit->type = IGRAPH_EIT_RANGE;
 1984|      0|        eit->pos = es.data.range.start;
 1985|      0|        eit->start = es.data.range.start;
 1986|      0|        eit->end = es.data.range.end;
 1987|      0|        break;
 1988|      0|    case IGRAPH_ES_PAIRS:
  ------------------
  |  Branch (1988:5): [True: 0, False: 16.0k]
  ------------------
 1989|      0|        IGRAPH_CHECK(igraph_i_eit_pairs(graph, es, eit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1990|      0|        break;
 1991|      0|    case IGRAPH_ES_PATH:
  ------------------
  |  Branch (1991:5): [True: 0, False: 16.0k]
  ------------------
 1992|      0|        IGRAPH_CHECK(igraph_i_eit_path(graph, es, eit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1993|      0|        break;
 1994|      0|    case IGRAPH_ES_ALL_BETWEEN:
  ------------------
  |  Branch (1994:5): [True: 0, False: 16.0k]
  ------------------
 1995|      0|        IGRAPH_CHECK(igraph_i_eit_all_between(graph, es, eit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1996|      0|        break;
 1997|      0|    default:
  ------------------
  |  Branch (1997:5): [True: 0, False: 16.0k]
  ------------------
 1998|      0|        IGRAPH_ERROR("Cannot create iterator, invalid selector.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1999|      0|        break;
 2000|  16.0k|    }
 2001|  16.0k|    return IGRAPH_SUCCESS;
 2002|  16.0k|}
igraph_eit_destroy:
 2014|  16.0k|void igraph_eit_destroy(const igraph_eit_t *eit) {
 2015|  16.0k|    switch (eit->type) {
 2016|  5.70k|    case IGRAPH_EIT_RANGE:
  ------------------
  |  Branch (2016:5): [True: 5.70k, False: 10.3k]
  ------------------
 2017|  7.42k|    case IGRAPH_EIT_VECTORPTR:
  ------------------
  |  Branch (2017:5): [True: 1.71k, False: 14.3k]
  ------------------
 2018|  7.42k|        break;
 2019|  8.63k|    case IGRAPH_EIT_VECTOR:
  ------------------
  |  Branch (2019:5): [True: 8.63k, False: 7.42k]
  ------------------
 2020|  8.63k|        igraph_vector_int_destroy((igraph_vector_int_t*)eit->vec);
 2021|  8.63k|        igraph_free((igraph_vector_int_t*)eit->vec);
 2022|  8.63k|        break;
 2023|      0|    default:
  ------------------
  |  Branch (2023:5): [True: 0, False: 16.0k]
  ------------------
 2024|       |        /*     IGRAPH_ERROR("Cannot destroy iterator, unknown type", IGRAPH_EINVAL); */
 2025|      0|        break;
 2026|  16.0k|    }
 2027|  16.0k|}
iterators.c:igraph_i_eit_create_allfromto:
 1702|  8.63k|                                         igraph_neimode_t mode) {
 1703|  8.63k|    igraph_vector_int_t *vec;
 1704|  8.63k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
 1705|  8.63k|    igraph_int_t no_of_edges = igraph_ecount(graph);
 1706|       |
 1707|  8.63k|    vec = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   33|  8.63k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  17.2k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 8.63k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1708|  8.63k|    IGRAPH_CHECK_OOM(vec, "Cannot create edge iterator.");
  ------------------
  |  |  709|  8.63k|    do { \
  |  |  710|  8.63k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  8.63k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  8.63k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 8.63k]
  |  |  ------------------
  ------------------
 1709|  8.63k|    IGRAPH_FINALLY(igraph_free, vec);
  ------------------
  |  |  603|  8.63k|    do { \
  |  |  604|  8.63k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  8.63k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  8.63k|         * incorrect destructor function with the pointer */ \
  |  |  607|  8.63k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 8.63k]
  |  |  ------------------
  |  |  608|  8.63k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  8.63k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 8.63k]
  |  |  ------------------
  ------------------
 1710|       |
 1711|  8.63k|    IGRAPH_VECTOR_INT_INIT_FINALLY(vec, 0);
  ------------------
  |  |  119|  8.63k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  8.63k|    do { \
  |  |  |  |  657|  8.63k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  8.63k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  8.63k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.63k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  8.63k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 8.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  8.63k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  8.63k|    do { \
  |  |  |  |  604|  8.63k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  8.63k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  8.63k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  8.63k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 8.63k]
  |  |  |  |  ------------------
  |  |  |  |  608|  8.63k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  8.63k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 8.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 8.63k]
  |  |  ------------------
  ------------------
 1712|  8.63k|    IGRAPH_CHECK(igraph_vector_int_reserve(vec, no_of_edges));
  ------------------
  |  |  656|  8.63k|    do { \
  |  |  657|  8.63k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  8.63k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  8.63k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  8.63k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 8.63k]
  |  |  ------------------
  ------------------
 1713|       |
 1714|  8.63k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (1714:9): [True: 8.63k, False: 0]
  ------------------
 1715|  8.63k|        igraph_vector_int_t adj;
 1716|  8.63k|        IGRAPH_VECTOR_INT_INIT_FINALLY(&adj, 0);
  ------------------
  |  |  119|  8.63k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  8.63k|    do { \
  |  |  |  |  657|  8.63k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  8.63k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  8.63k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.63k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  8.63k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 8.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  8.63k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  8.63k|    do { \
  |  |  |  |  604|  8.63k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  8.63k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  8.63k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  8.63k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 8.63k]
  |  |  |  |  ------------------
  |  |  |  |  608|  8.63k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  8.63k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 8.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 8.63k]
  |  |  ------------------
  ------------------
 1717|  1.42M|        for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (1717:34): [True: 1.41M, False: 8.63k]
  ------------------
 1718|  1.41M|            IGRAPH_CHECK(igraph_incident(graph, &adj, i, mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  1.41M|    do { \
  |  |  657|  1.41M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.41M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.41M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.41M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.41M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.41M]
  |  |  ------------------
  ------------------
 1719|  1.41M|            igraph_vector_int_append(vec, &adj);  /* reserved */
 1720|  1.41M|        }
 1721|  8.63k|        igraph_vector_int_destroy(&adj);
 1722|  8.63k|        IGRAPH_FINALLY_CLEAN(1);
 1723|  8.63k|    } else {
 1724|      0|        igraph_vector_int_t adj;
 1725|      0|        igraph_bool_t *added;
 1726|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&adj, 0);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1727|      0|        added = IGRAPH_CALLOC(no_of_edges, igraph_bool_t);
  ------------------
  |  |   33|      0|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|      0|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 0, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1728|      0|        IGRAPH_CHECK_OOM(added, "Cannot create edge iterator.");
  ------------------
  |  |  709|      0|    do { \
  |  |  710|      0|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1729|      0|        IGRAPH_FINALLY(igraph_free, added);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1730|      0|        for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (1730:34): [True: 0, False: 0]
  ------------------
 1731|      0|            IGRAPH_CHECK(igraph_incident(graph, &adj, i, IGRAPH_ALL, IGRAPH_LOOPS));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1732|      0|            const igraph_int_t length = igraph_vector_int_size(&adj);
 1733|      0|            for (igraph_int_t j = 0; j < length; j++) {
  ------------------
  |  Branch (1733:38): [True: 0, False: 0]
  ------------------
 1734|      0|                if (!added[ VECTOR(adj)[j] ]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1734:21): [True: 0, False: 0]
  ------------------
 1735|      0|                    igraph_vector_int_push_back(vec, VECTOR(adj)[j]);  /* reserved */
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1736|      0|                    added[ VECTOR(adj)[j] ] = true;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1737|      0|                }
 1738|      0|            }
 1739|      0|        }
 1740|      0|        igraph_vector_int_destroy(&adj);
 1741|      0|        IGRAPH_FREE(added);
  ------------------
  |  |   36|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1742|      0|        IGRAPH_FINALLY_CLEAN(2);
 1743|      0|    }
 1744|       |
 1745|  8.63k|    eit->type = IGRAPH_EIT_VECTOR;
 1746|  8.63k|    eit->pos = 0;
 1747|  8.63k|    eit->start = 0;
 1748|  8.63k|    eit->vec = vec;
 1749|  8.63k|    eit->end = igraph_vector_int_size(eit->vec);
 1750|       |
 1751|  8.63k|    IGRAPH_FINALLY_CLEAN(2);
 1752|  8.63k|    return IGRAPH_SUCCESS;
 1753|  8.63k|}

igraph_empty:
   64|  20.2k|igraph_error_t igraph_empty(igraph_t *graph, igraph_int_t n, igraph_bool_t directed) {
   65|  20.2k|    return igraph_empty_attrs(graph, n, directed, 0);
   66|  20.2k|}
igraph_delete_vertices:
   91|  2.00k|igraph_error_t igraph_delete_vertices(igraph_t *graph, const igraph_vs_t vertices) {
   92|  2.00k|    return igraph_delete_vertices_map(graph, vertices, /* idx= */ 0, /* invidx= */ 0);
   93|  2.00k|}
igraph_edge:
  132|  4.99k|) {
  133|       |
  134|  4.99k|    if (eid < 0 || eid >= igraph_ecount(graph)) {
  ------------------
  |  Branch (134:9): [True: 0, False: 4.99k]
  |  Branch (134:20): [True: 0, False: 4.99k]
  ------------------
  135|      0|        IGRAPH_ERROR("Cannot retrieve edge endpoints.", IGRAPH_EINVEID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  136|      0|    }
  137|       |
  138|  4.99k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (138:9): [True: 4.99k, False: 0]
  ------------------
  139|  4.99k|        *from = IGRAPH_FROM(graph, eid);
  ------------------
  |  |  115|  4.99k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  4.99k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  140|  4.99k|        *to   = IGRAPH_TO(graph, eid);
  ------------------
  |  |  128|  4.99k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  4.99k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  141|  4.99k|    } else {
  142|      0|        *from = IGRAPH_TO(graph, eid);
  ------------------
  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  143|      0|        *to   = IGRAPH_FROM(graph, eid);
  ------------------
  |  |  115|      0|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  144|      0|    }
  145|       |
  146|  4.99k|    return IGRAPH_SUCCESS;
  147|  4.99k|}
igraph_edges:
  173|  2.69k|) {
  174|  2.69k|    igraph_eit_t eit;
  175|  2.69k|    igraph_int_t n, ptr = 0, ptr2;
  176|       |
  177|  2.69k|    IGRAPH_CHECK(igraph_eit_create(graph, eids, &eit));
  ------------------
  |  |  656|  2.69k|    do { \
  |  |  657|  2.69k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.69k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.69k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.69k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.69k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.69k]
  |  |  ------------------
  ------------------
  178|  2.69k|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  603|  2.69k|    do { \
  |  |  604|  2.69k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.69k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.69k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.69k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.69k]
  |  |  ------------------
  |  |  608|  2.69k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.69k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.69k]
  |  |  ------------------
  ------------------
  179|  2.69k|    n = IGRAPH_EIT_SIZE(eit);
  ------------------
  |  |  382|  2.69k|#define IGRAPH_EIT_SIZE(eit)  ((eit).end - (eit).start)
  ------------------
  180|  2.69k|    IGRAPH_CHECK(igraph_vector_int_resize(edges, n * 2));
  ------------------
  |  |  656|  2.69k|    do { \
  |  |  657|  2.69k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.69k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.69k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.69k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.69k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.69k]
  |  |  ------------------
  ------------------
  181|       |
  182|  2.69k|    if (bycol) {
  ------------------
  |  Branch (182:9): [True: 0, False: 2.69k]
  ------------------
  183|      0|        ptr2 = n;
  184|      0|        if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (184:13): [True: 0, False: 0]
  ------------------
  185|      0|            for (; !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  371|      0|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                          for (; !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  359|      0|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (185:20): [True: 0, False: 0]
  ------------------
  186|      0|                igraph_int_t e = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|      0|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  406|      0|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  187|      0|                VECTOR(*edges)[ptr++] = IGRAPH_FROM(graph, e);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*edges)[ptr++] = IGRAPH_FROM(graph, e);
  ------------------
  |  |  115|      0|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  188|      0|                VECTOR(*edges)[ptr2++] = IGRAPH_TO(graph, e);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*edges)[ptr2++] = IGRAPH_TO(graph, e);
  ------------------
  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  189|      0|            }
  190|      0|        } else {
  191|      0|            for (; !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  371|      0|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                          for (; !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  359|      0|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (191:20): [True: 0, False: 0]
  ------------------
  192|      0|                igraph_int_t e = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|      0|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  406|      0|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  193|      0|                VECTOR(*edges)[ptr++] = IGRAPH_TO(graph, e);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*edges)[ptr++] = IGRAPH_TO(graph, e);
  ------------------
  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  194|      0|                VECTOR(*edges)[ptr2++] = IGRAPH_FROM(graph, e);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*edges)[ptr2++] = IGRAPH_FROM(graph, e);
  ------------------
  |  |  115|      0|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  195|      0|            }
  196|      0|        }
  197|  2.69k|    } else {
  198|  2.69k|        if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (198:13): [True: 2.69k, False: 0]
  ------------------
  199|   119k|            for (; !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  371|   119k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                          for (; !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  359|   116k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (199:20): [True: 116k, False: 2.69k]
  ------------------
  200|   116k|                igraph_int_t e = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|   116k|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 43.2k, False: 73.6k]
  |  |  ------------------
  |  |  406|   116k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|  73.6k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  201|   116k|                VECTOR(*edges)[ptr++] = IGRAPH_FROM(graph, e);
  ------------------
  |  |   60|   116k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*edges)[ptr++] = IGRAPH_FROM(graph, e);
  ------------------
  |  |  115|   116k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|   116k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  202|   116k|                VECTOR(*edges)[ptr++] = IGRAPH_TO(graph, e);
  ------------------
  |  |   60|   116k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*edges)[ptr++] = IGRAPH_TO(graph, e);
  ------------------
  |  |  128|   116k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|   116k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  203|   116k|            }
  204|  2.69k|        } else {
  205|      0|            for (; !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  371|      0|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                          for (; !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  359|      0|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (205:20): [True: 0, False: 0]
  ------------------
  206|      0|                igraph_int_t e = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|      0|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  406|      0|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  207|      0|                VECTOR(*edges)[ptr++] = IGRAPH_TO(graph, e);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*edges)[ptr++] = IGRAPH_TO(graph, e);
  ------------------
  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  208|      0|                VECTOR(*edges)[ptr++] = IGRAPH_FROM(graph, e);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*edges)[ptr++] = IGRAPH_FROM(graph, e);
  ------------------
  |  |  115|      0|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  209|      0|            }
  210|      0|        }
  211|  2.69k|    }
  212|       |
  213|  2.69k|    igraph_eit_destroy(&eit);
  214|  2.69k|    IGRAPH_FINALLY_CLEAN(1);
  215|       |
  216|  2.69k|    return IGRAPH_SUCCESS;
  217|  2.69k|}

igraph_empty_attrs:
  102|  20.2k|) {
  103|       |
  104|  20.2k|    if (n < 0) {
  ------------------
  |  Branch (104:9): [True: 0, False: 20.2k]
  ------------------
  105|      0|        IGRAPH_ERROR("Number of vertices must not be negative.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  106|      0|    }
  107|       |
  108|  20.2k|    memset(graph, 0, sizeof(igraph_t));
  109|       |
  110|  20.2k|    graph->n = 0;
  111|  20.2k|    graph->directed = directed;
  112|  20.2k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->from, 0);
  ------------------
  |  |  119|  20.2k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  20.2k|    do { \
  |  |  |  |  657|  20.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  20.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  20.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  20.2k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 20.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  20.2k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  20.2k|    do { \
  |  |  |  |  604|  20.2k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  20.2k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  20.2k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  20.2k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 20.2k]
  |  |  |  |  ------------------
  |  |  |  |  608|  20.2k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  20.2k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 20.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 20.2k]
  |  |  ------------------
  ------------------
  113|  20.2k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->to, 0);
  ------------------
  |  |  119|  20.2k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  20.2k|    do { \
  |  |  |  |  657|  20.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  20.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  20.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  20.2k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 20.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  20.2k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  20.2k|    do { \
  |  |  |  |  604|  20.2k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  20.2k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  20.2k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  20.2k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 20.2k]
  |  |  |  |  ------------------
  |  |  |  |  608|  20.2k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  20.2k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 20.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 20.2k]
  |  |  ------------------
  ------------------
  114|  20.2k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->oi, 0);
  ------------------
  |  |  119|  20.2k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  20.2k|    do { \
  |  |  |  |  657|  20.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  20.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  20.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  20.2k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 20.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  20.2k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  20.2k|    do { \
  |  |  |  |  604|  20.2k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  20.2k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  20.2k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  20.2k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 20.2k]
  |  |  |  |  ------------------
  |  |  |  |  608|  20.2k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  20.2k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 20.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 20.2k]
  |  |  ------------------
  ------------------
  115|  20.2k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->ii, 0);
  ------------------
  |  |  119|  20.2k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  20.2k|    do { \
  |  |  |  |  657|  20.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  20.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  20.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  20.2k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 20.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  20.2k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  20.2k|    do { \
  |  |  |  |  604|  20.2k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  20.2k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  20.2k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  20.2k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 20.2k]
  |  |  |  |  ------------------
  |  |  |  |  608|  20.2k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  20.2k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 20.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 20.2k]
  |  |  ------------------
  ------------------
  116|  20.2k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->os, 1);
  ------------------
  |  |  119|  20.2k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  20.2k|    do { \
  |  |  |  |  657|  20.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  20.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  20.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  20.2k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 20.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  20.2k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  20.2k|    do { \
  |  |  |  |  604|  20.2k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  20.2k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  20.2k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  20.2k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 20.2k]
  |  |  |  |  ------------------
  |  |  |  |  608|  20.2k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  20.2k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 20.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 20.2k]
  |  |  ------------------
  ------------------
  117|  20.2k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->is, 1);
  ------------------
  |  |  119|  20.2k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  20.2k|    do { \
  |  |  |  |  657|  20.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  20.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  20.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  20.2k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 20.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  20.2k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  20.2k|    do { \
  |  |  |  |  604|  20.2k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  20.2k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  20.2k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  20.2k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 20.2k]
  |  |  |  |  ------------------
  |  |  |  |  608|  20.2k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  20.2k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 20.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 20.2k]
  |  |  ------------------
  ------------------
  118|       |
  119|       |    /* init cache */
  120|  20.2k|    graph->cache = IGRAPH_CALLOC(1, igraph_i_property_cache_t);
  ------------------
  |  |   33|  20.2k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  40.4k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 20.2k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  121|  20.2k|    IGRAPH_CHECK_OOM(graph->cache, "Cannot create graph.");
  ------------------
  |  |  709|  20.2k|    do { \
  |  |  710|  20.2k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  20.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  20.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 20.2k]
  |  |  ------------------
  ------------------
  122|  20.2k|    IGRAPH_FINALLY(igraph_free, graph->cache);
  ------------------
  |  |  603|  20.2k|    do { \
  |  |  604|  20.2k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  20.2k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  20.2k|         * incorrect destructor function with the pointer */ \
  |  |  607|  20.2k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 20.2k]
  |  |  ------------------
  |  |  608|  20.2k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  20.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 20.2k]
  |  |  ------------------
  ------------------
  123|  20.2k|    IGRAPH_CHECK(igraph_i_property_cache_init(graph->cache));
  ------------------
  |  |  656|  20.2k|    do { \
  |  |  657|  20.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  20.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  20.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  20.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 20.2k]
  |  |  ------------------
  ------------------
  124|  20.2k|    IGRAPH_FINALLY(igraph_i_property_cache_destroy, graph->cache);
  ------------------
  |  |  603|  20.2k|    do { \
  |  |  604|  20.2k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  20.2k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  20.2k|         * incorrect destructor function with the pointer */ \
  |  |  607|  20.2k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 20.2k]
  |  |  ------------------
  |  |  608|  20.2k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  20.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 20.2k]
  |  |  ------------------
  ------------------
  125|       |
  126|  20.2k|    VECTOR(graph->os)[0] = 0;
  ------------------
  |  |   60|  20.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  127|  20.2k|    VECTOR(graph->is)[0] = 0;
  ------------------
  |  |   60|  20.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  128|       |
  129|       |    /* init attributes */
  130|  20.2k|    IGRAPH_CHECK(igraph_i_attribute_init(graph, attr));
  ------------------
  |  |  656|  20.2k|    do { \
  |  |  657|  20.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  20.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  20.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  20.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 20.2k]
  |  |  ------------------
  ------------------
  131|       |
  132|       |    /* add the vertices */
  133|  20.2k|    IGRAPH_CHECK(igraph_add_vertices(graph, n, 0));
  ------------------
  |  |  656|  20.2k|    do { \
  |  |  657|  20.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  20.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  20.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  20.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 20.2k]
  |  |  ------------------
  ------------------
  134|       |
  135|  20.2k|    IGRAPH_FINALLY_CLEAN(8);
  136|  20.2k|    return IGRAPH_SUCCESS;
  137|  20.2k|}
igraph_destroy:
  155|  22.3k|void igraph_destroy(igraph_t *graph) {
  156|  22.3k|    igraph_i_attribute_destroy(graph);
  157|       |
  158|  22.3k|    igraph_i_property_cache_destroy(graph->cache);
  159|  22.3k|    IGRAPH_FREE(graph->cache);
  ------------------
  |  |   36|  22.3k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  160|       |
  161|  22.3k|    igraph_vector_int_destroy(&graph->from);
  162|  22.3k|    igraph_vector_int_destroy(&graph->to);
  163|  22.3k|    igraph_vector_int_destroy(&graph->oi);
  164|  22.3k|    igraph_vector_int_destroy(&graph->ii);
  165|  22.3k|    igraph_vector_int_destroy(&graph->os);
  166|  22.3k|    igraph_vector_int_destroy(&graph->is);
  167|  22.3k|}
igraph_copy:
  195|     70|igraph_error_t igraph_copy(igraph_t *to, const igraph_t *from) {
  196|     70|    memset(to, 0, sizeof(igraph_t));
  197|       |
  198|     70|    to->n = from->n;
  199|     70|    to->directed = from->directed;
  200|     70|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->from, &from->from));
  ------------------
  |  |  656|     70|    do { \
  |  |  657|     70|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     70|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     70|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 70]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
  201|     70|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->from);
  ------------------
  |  |  603|     70|    do { \
  |  |  604|     70|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     70|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     70|         * incorrect destructor function with the pointer */ \
  |  |  607|     70|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 70]
  |  |  ------------------
  |  |  608|     70|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
  202|     70|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->to, &from->to));
  ------------------
  |  |  656|     70|    do { \
  |  |  657|     70|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     70|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     70|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 70]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
  203|     70|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->to);
  ------------------
  |  |  603|     70|    do { \
  |  |  604|     70|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     70|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     70|         * incorrect destructor function with the pointer */ \
  |  |  607|     70|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 70]
  |  |  ------------------
  |  |  608|     70|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
  204|     70|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->oi, &from->oi));
  ------------------
  |  |  656|     70|    do { \
  |  |  657|     70|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     70|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     70|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 70]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
  205|     70|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->oi);
  ------------------
  |  |  603|     70|    do { \
  |  |  604|     70|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     70|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     70|         * incorrect destructor function with the pointer */ \
  |  |  607|     70|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 70]
  |  |  ------------------
  |  |  608|     70|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
  206|     70|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->ii, &from->ii));
  ------------------
  |  |  656|     70|    do { \
  |  |  657|     70|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     70|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     70|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 70]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
  207|     70|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->ii);
  ------------------
  |  |  603|     70|    do { \
  |  |  604|     70|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     70|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     70|         * incorrect destructor function with the pointer */ \
  |  |  607|     70|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 70]
  |  |  ------------------
  |  |  608|     70|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
  208|     70|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->os, &from->os));
  ------------------
  |  |  656|     70|    do { \
  |  |  657|     70|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     70|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     70|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 70]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
  209|     70|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->os);
  ------------------
  |  |  603|     70|    do { \
  |  |  604|     70|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     70|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     70|         * incorrect destructor function with the pointer */ \
  |  |  607|     70|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 70]
  |  |  ------------------
  |  |  608|     70|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
  210|     70|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->is, &from->is));
  ------------------
  |  |  656|     70|    do { \
  |  |  657|     70|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     70|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     70|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 70]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
  211|     70|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->is);
  ------------------
  |  |  603|     70|    do { \
  |  |  604|     70|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     70|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     70|         * incorrect destructor function with the pointer */ \
  |  |  607|     70|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 70]
  |  |  ------------------
  |  |  608|     70|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
  212|       |
  213|     70|    to->cache = IGRAPH_CALLOC(1, igraph_i_property_cache_t);
  ------------------
  |  |   33|     70|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|    140|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 70, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  214|     70|    IGRAPH_CHECK_OOM(to->cache, "Cannot copy graph.");
  ------------------
  |  |  709|     70|    do { \
  |  |  710|     70|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|     70|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 70]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
  215|     70|    IGRAPH_FINALLY(igraph_free, to->cache);
  ------------------
  |  |  603|     70|    do { \
  |  |  604|     70|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     70|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     70|         * incorrect destructor function with the pointer */ \
  |  |  607|     70|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 70]
  |  |  ------------------
  |  |  608|     70|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
  216|     70|    IGRAPH_CHECK(igraph_i_property_cache_copy(to->cache, from->cache));
  ------------------
  |  |  656|     70|    do { \
  |  |  657|     70|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     70|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     70|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 70]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
  217|     70|    IGRAPH_FINALLY(igraph_i_property_cache_destroy, to->cache);
  ------------------
  |  |  603|     70|    do { \
  |  |  604|     70|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     70|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     70|         * incorrect destructor function with the pointer */ \
  |  |  607|     70|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 70]
  |  |  ------------------
  |  |  608|     70|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
  218|       |
  219|     70|    IGRAPH_CHECK(igraph_i_attribute_copy(to, from, true, true, true));
  ------------------
  |  |  656|     70|    do { \
  |  |  657|     70|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     70|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     70|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 70]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
  220|       |
  221|     70|    IGRAPH_FINALLY_CLEAN(8);
  222|     70|    return IGRAPH_SUCCESS;
  223|     70|}
igraph_add_edges:
  258|  22.4k|) {
  259|  22.4k|    igraph_int_t no_of_edges = igraph_vector_int_size(&graph->from);
  260|  22.4k|    igraph_int_t edges_to_add = igraph_vector_int_size(edges) / 2;
  261|  22.4k|    igraph_int_t new_no_of_edges;
  262|  22.4k|    igraph_int_t i = 0;
  263|  22.4k|    igraph_vector_int_t newoi, newii;
  264|  22.4k|    igraph_bool_t directed = igraph_is_directed(graph);
  265|       |
  266|  22.4k|    if (igraph_vector_int_size(edges) % 2 != 0) {
  ------------------
  |  Branch (266:9): [True: 0, False: 22.4k]
  ------------------
  267|      0|        IGRAPH_ERROR("Invalid (odd) length of edges vector.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  268|      0|    }
  269|  22.4k|    if (!igraph_vector_int_isininterval(edges, 0, igraph_vcount(graph) - 1)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 22.4k]
  ------------------
  270|      0|        IGRAPH_ERROR("Out-of-range vertex IDs when adding edges.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  271|      0|    }
  272|       |
  273|       |    /* from & to */
  274|  22.4k|    IGRAPH_SAFE_ADD(no_of_edges, edges_to_add, &new_no_of_edges);
  ------------------
  |  |   47|  22.4k|    do { \
  |  |   48|  22.4k|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  22.4k|        igraph_int_t _safe_sum; \
  |  |   50|  22.4k|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 22.4k]
  |  |  ------------------
  |  |   51|      0|            IGRAPH_ERRORF("Overflow when adding %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  464|      0|    do { \
  |  |  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  467|      0|        return igraph_errno; \
  |  |  |  |  468|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|        } \
  |  |   53|  22.4k|        *(res) = _safe_sum; \
  |  |   54|  22.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  275|  22.4k|    if (new_no_of_edges > IGRAPH_ECOUNT_MAX) {
  ------------------
  |  |  120|  22.4k|#define IGRAPH_ECOUNT_MAX (IGRAPH_INTEGER_MAX/2)
  |  |  ------------------
  |  |  |  |   74|  22.4k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  |  |  ------------------
  ------------------
  |  Branch (275:9): [True: 0, False: 22.4k]
  ------------------
  276|      0|        IGRAPH_ERRORF("Maximum edge count (%" IGRAPH_PRId ") exceeded.", IGRAPH_ERANGE,
  ------------------
  |  |  464|      0|    do { \
  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  467|      0|        return igraph_errno; \
  |  |  468|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  277|      0|                      IGRAPH_ECOUNT_MAX);
  278|      0|    }
  279|  22.4k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->from, no_of_edges + edges_to_add));
  ------------------
  |  |  656|  22.4k|    do { \
  |  |  657|  22.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  22.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  22.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 22.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  22.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  280|  22.4k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->to, no_of_edges + edges_to_add));
  ------------------
  |  |  656|  22.4k|    do { \
  |  |  657|  22.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  22.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  22.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 22.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  22.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  281|       |
  282|   756k|    while (i < edges_to_add * 2) {
  ------------------
  |  Branch (282:12): [True: 734k, False: 22.4k]
  ------------------
  283|   734k|        if (directed || VECTOR(*edges)[i] > VECTOR(*edges)[i + 1]) {
  ------------------
  |  |   60|   377k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (directed || VECTOR(*edges)[i] > VECTOR(*edges)[i + 1]) {
  ------------------
  |  |   60|   377k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (283:13): [True: 357k, False: 377k]
  |  Branch (283:25): [True: 54.0k, False: 323k]
  ------------------
  284|   411k|            igraph_vector_int_push_back(&graph->from, VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|   411k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  285|   411k|            igraph_vector_int_push_back(&graph->to,   VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|   411k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  286|   411k|        } else {
  287|   323k|            igraph_vector_int_push_back(&graph->to,   VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|   323k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  288|   323k|            igraph_vector_int_push_back(&graph->from, VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|   323k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  289|   323k|        }
  290|   734k|    }
  291|       |
  292|       |    /* If an error occurs while the edges are being added, we make the necessary fixup
  293|       |     * to ensure that the graph is still in a consistent state when this function returns.
  294|       |     * The graph may already be on the finally stack when calling this function. We use
  295|       |     * a separate finally stack level to avoid its destructor from being called on error,
  296|       |     * so that the fixup can succeed.
  297|       |     */
  298|       |
  299|  22.4k|#define CHECK_ERR(expr) \
  300|  22.4k|    do { \
  301|  22.4k|        igraph_error_t err = (expr); \
  302|  22.4k|        if (err != IGRAPH_SUCCESS) { \
  303|  22.4k|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  304|  22.4k|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  305|  22.4k|            IGRAPH_FINALLY_EXIT(); \
  306|  22.4k|            IGRAPH_ERROR("Cannot add edges.", err); \
  307|  22.4k|        } \
  308|  22.4k|    } while (0)
  309|       |
  310|       |    /* oi & ii */
  311|  22.4k|    IGRAPH_FINALLY_ENTER();
  312|  22.4k|    {
  313|  22.4k|        CHECK_ERR(igraph_vector_int_init(&newoi, no_of_edges));
  ------------------
  |  |  300|  22.4k|    do { \
  |  |  301|  22.4k|        igraph_error_t err = (expr); \
  |  |  302|  22.4k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (302:13): [True: 0, False: 22.4k]
  |  |  ------------------
  |  |  303|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  304|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  305|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  306|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  307|      0|        } \
  |  |  308|  22.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (308:14): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  314|  22.4k|        IGRAPH_FINALLY(igraph_vector_int_destroy, &newoi);
  ------------------
  |  |  603|  22.4k|    do { \
  |  |  604|  22.4k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  22.4k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  22.4k|         * incorrect destructor function with the pointer */ \
  |  |  607|  22.4k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 22.4k]
  |  |  ------------------
  |  |  608|  22.4k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  22.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  315|  22.4k|        CHECK_ERR(igraph_vector_int_init(&newii, no_of_edges));
  ------------------
  |  |  300|  22.4k|    do { \
  |  |  301|  22.4k|        igraph_error_t err = (expr); \
  |  |  302|  22.4k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (302:13): [True: 0, False: 22.4k]
  |  |  ------------------
  |  |  303|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  304|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  305|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  306|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  307|      0|        } \
  |  |  308|  22.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (308:14): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  316|  22.4k|        IGRAPH_FINALLY(igraph_vector_int_destroy, &newii);
  ------------------
  |  |  603|  22.4k|    do { \
  |  |  604|  22.4k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  22.4k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  22.4k|         * incorrect destructor function with the pointer */ \
  |  |  607|  22.4k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 22.4k]
  |  |  ------------------
  |  |  608|  22.4k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  22.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  317|  22.4k|        CHECK_ERR(igraph_vector_int_pair_order(&graph->from, &graph->to, &newoi, graph->n));
  ------------------
  |  |  300|  22.4k|    do { \
  |  |  301|  22.4k|        igraph_error_t err = (expr); \
  |  |  302|  22.4k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (302:13): [True: 0, False: 22.4k]
  |  |  ------------------
  |  |  303|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  304|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  305|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  306|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  307|      0|        } \
  |  |  308|  22.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (308:14): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  318|  22.4k|        CHECK_ERR(igraph_vector_int_pair_order(&graph->to, &graph->from, &newii, graph->n));
  ------------------
  |  |  300|  22.4k|    do { \
  |  |  301|  22.4k|        igraph_error_t err = (expr); \
  |  |  302|  22.4k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (302:13): [True: 0, False: 22.4k]
  |  |  ------------------
  |  |  303|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  304|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  305|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  306|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  307|      0|        } \
  |  |  308|  22.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (308:14): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  319|       |
  320|       |        /* Attributes */
  321|  22.4k|        if (graph->attr) {
  ------------------
  |  Branch (321:13): [True: 0, False: 22.4k]
  ------------------
  322|       |            /* TODO: Does this keep the attribute table in a consistent state upon failure? */
  323|      0|            CHECK_ERR(igraph_i_attribute_add_edges(graph, edges, attr));
  ------------------
  |  |  300|      0|    do { \
  |  |  301|      0|        igraph_error_t err = (expr); \
  |  |  302|      0|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (302:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  303|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  304|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  305|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  306|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  307|      0|        } \
  |  |  308|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (308:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  324|      0|        }
  325|       |
  326|       |        /* os & is, its length does not change, error safe */
  327|  22.4k|        igraph_i_create_start_vectors(&graph->os, &graph->from, &newoi, graph->n);
  328|  22.4k|        igraph_i_create_start_vectors(&graph->is, &graph->to, &newii, graph->n);
  329|       |
  330|       |        /* everything went fine */
  331|  22.4k|        igraph_vector_int_destroy(&graph->oi);
  332|  22.4k|        igraph_vector_int_destroy(&graph->ii);
  333|  22.4k|        IGRAPH_FINALLY_CLEAN(2);
  334|       |
  335|  22.4k|        graph->oi = newoi;
  336|  22.4k|        graph->ii = newii;
  337|  22.4k|    }
  338|      0|    IGRAPH_FINALLY_EXIT();
  339|       |
  340|  22.4k|#undef CHECK_ERR
  341|       |
  342|       |    /* modification successful, clear the cached properties of the graph.
  343|       |     *
  344|       |     * Adding one or more edges cannot make a strongly or weakly connected
  345|       |     * graph disconnected, so we keep those flags if they are cached as true.
  346|       |     *
  347|       |     * Adding one or more edges may turn a DAG into a non-DAG or a forest into
  348|       |     * a non-forest, so we can keep those flags only if they are cached as
  349|       |     * false.
  350|       |     *
  351|       |     * Also, adding one or more edges does not change HAS_LOOP, HAS_MULTI and
  352|       |     * HAS_MUTUAL if they were already true.
  353|       |     */
  354|  22.4k|    igraph_i_property_cache_invalidate_conditionally(
  355|  22.4k|        graph,
  356|  22.4k|        /* keep_always = */ 0,
  357|       |        /* keep_when_false = */
  358|  22.4k|        (1 << IGRAPH_PROP_IS_DAG) | (1 << IGRAPH_PROP_IS_FOREST),
  359|       |        /* keep_when_true = */
  360|  22.4k|        (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED) |
  361|  22.4k|        (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  362|  22.4k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  363|  22.4k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  364|  22.4k|        (1 << IGRAPH_PROP_HAS_MUTUAL)
  365|  22.4k|    );
  366|       |
  367|  22.4k|    return IGRAPH_SUCCESS;
  368|  22.4k|}
igraph_add_vertices:
  392|  23.8k|) {
  393|  23.8k|    igraph_int_t ec = igraph_ecount(graph);
  394|  23.8k|    igraph_int_t vc = igraph_vcount(graph);
  395|  23.8k|    igraph_int_t new_vc;
  396|  23.8k|    igraph_int_t i;
  397|       |
  398|  23.8k|    if (nv < 0) {
  ------------------
  |  Branch (398:9): [True: 0, False: 23.8k]
  ------------------
  399|      0|        IGRAPH_ERROR("Cannot add negative number of vertices.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  400|      0|    }
  401|       |
  402|  23.8k|    IGRAPH_SAFE_ADD(graph->n, nv, &new_vc);
  ------------------
  |  |   47|  23.8k|    do { \
  |  |   48|  23.8k|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  23.8k|        igraph_int_t _safe_sum; \
  |  |   50|  23.8k|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 23.8k]
  |  |  ------------------
  |  |   51|      0|            IGRAPH_ERRORF("Overflow when adding %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  464|      0|    do { \
  |  |  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  467|      0|        return igraph_errno; \
  |  |  |  |  468|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|        } \
  |  |   53|  23.8k|        *(res) = _safe_sum; \
  |  |   54|  23.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded, False: 23.8k]
  |  |  ------------------
  ------------------
  403|  23.8k|    if (new_vc > IGRAPH_VCOUNT_MAX) {
  ------------------
  |  |  102|  23.8k|#define IGRAPH_VCOUNT_MAX (IGRAPH_INTEGER_MAX-1)
  |  |  ------------------
  |  |  |  |   74|  23.8k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  |  |  ------------------
  ------------------
  |  Branch (403:9): [True: 0, False: 23.8k]
  ------------------
  404|      0|        IGRAPH_ERRORF("Maximum vertex count (%" IGRAPH_PRId ") exceeded.", IGRAPH_ERANGE,
  ------------------
  |  |  464|      0|    do { \
  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  467|      0|        return igraph_errno; \
  |  |  468|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  405|      0|                      IGRAPH_VCOUNT_MAX);
  406|      0|    }
  407|  23.8k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->os, new_vc + 1));
  ------------------
  |  |  656|  23.8k|    do { \
  |  |  657|  23.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  23.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  23.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  23.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 23.8k]
  |  |  ------------------
  ------------------
  408|  23.8k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->is, new_vc + 1));
  ------------------
  |  |  656|  23.8k|    do { \
  |  |  657|  23.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  23.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  23.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  23.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 23.8k]
  |  |  ------------------
  ------------------
  409|       |
  410|  23.8k|    igraph_vector_int_resize(&graph->os, new_vc + 1); /* reserved */
  411|  23.8k|    igraph_vector_int_resize(&graph->is, new_vc + 1); /* reserved */
  412|  5.37M|    for (i = graph->n + 1; i < new_vc + 1; i++) {
  ------------------
  |  Branch (412:28): [True: 5.34M, False: 23.8k]
  ------------------
  413|  5.34M|        VECTOR(graph->os)[i] = ec;
  ------------------
  |  |   60|  5.34M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  414|  5.34M|        VECTOR(graph->is)[i] = ec;
  ------------------
  |  |   60|  5.34M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  415|  5.34M|    }
  416|       |
  417|  23.8k|    graph->n += nv;
  418|       |
  419|       |    /* Add attributes if necessary. This section is protected with
  420|       |     * FINALLY_ENTER/EXIT so that the graph would not be accidentally
  421|       |     * free upon error until it could be restored to a consistent state. */
  422|       |
  423|  23.8k|    if (graph->attr) {
  ------------------
  |  Branch (423:9): [True: 0, False: 23.8k]
  ------------------
  424|      0|        igraph_error_t err;
  425|      0|        IGRAPH_FINALLY_ENTER();
  426|      0|        err = igraph_i_attribute_add_vertices(graph, nv, attr);
  427|      0|        if (err != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (427:13): [True: 0, False: 0]
  ------------------
  428|       |            /* Restore original vertex count on failure */
  429|      0|            graph->n = vc;
  430|      0|            igraph_vector_int_resize(&graph->os, vc + 1); /* shrinks */
  431|      0|            igraph_vector_int_resize(&graph->is, vc + 1); /* shrinks */
  432|      0|        }
  433|      0|        IGRAPH_FINALLY_EXIT();
  434|      0|        if (err != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (434:13): [True: 0, False: 0]
  ------------------
  435|      0|            IGRAPH_ERROR("Cannot add vertices.", err);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  436|      0|        }
  437|      0|    }
  438|       |
  439|       |    /* modification successful, clear the cached properties of the graph.
  440|       |     *
  441|       |     * Adding one or more nodes does not change the following cached properties:
  442|       |     *
  443|       |     * - IGRAPH_PROP_HAS_LOOP
  444|       |     * - IGRAPH_PROP_HAS_MULTI
  445|       |     * - IGRAPH_PROP_HAS_MUTUAL
  446|       |     * - IGRAPH_PROP_IS_DAG (adding a node does not create/destroy cycles)
  447|       |     * - IGRAPH_PROP_IS_FOREST (same)
  448|       |     *
  449|       |     * Adding one or more nodes without any edges incident on them is sure to
  450|       |     * make the graph disconnected (weakly or strongly), so we can keep the
  451|       |     * connectivity-related properties if they are currently cached as false.
  452|       |     * (Actually, even if they weren't cached as false, we could still set them
  453|       |     * to false, but we don't have that functionality yet). The only exception
  454|       |     * is when the graph had zero vertices and gained only one vertex, because
  455|       |     * it then becomes connected. That's why we have the condition below in the
  456|       |     * keep_when_false section.
  457|       |     */
  458|  23.8k|    igraph_i_property_cache_invalidate_conditionally(
  459|  23.8k|        graph,
  460|       |        /* keep_always = */
  461|  23.8k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  462|  23.8k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  463|  23.8k|        (1 << IGRAPH_PROP_HAS_MUTUAL) |
  464|  23.8k|        (1 << IGRAPH_PROP_IS_DAG) |
  465|  23.8k|        (1 << IGRAPH_PROP_IS_FOREST),
  466|       |        /* keep_when_false = */
  467|  23.8k|        igraph_vcount(graph) >= 2 ? (
  ------------------
  |  Branch (467:9): [True: 23.1k, False: 640]
  ------------------
  468|  23.1k|            (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  469|  23.1k|            (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED)
  470|  23.1k|        ) : 0,
  471|       |        /* keep_when_true = */
  472|  23.8k|        0
  473|  23.8k|    );
  474|       |
  475|  23.8k|    return IGRAPH_SUCCESS;
  476|  23.8k|}
igraph_delete_edges:
  501|  4.43k|igraph_error_t igraph_delete_edges(igraph_t *graph, igraph_es_t edges) {
  502|  4.43k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  503|  4.43k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  504|  4.43k|    igraph_int_t edges_to_remove = 0;
  505|  4.43k|    igraph_int_t remaining_edges;
  506|  4.43k|    igraph_eit_t eit;
  507|       |
  508|  4.43k|    igraph_vector_int_t newfrom, newto;
  509|  4.43k|    igraph_vector_int_t newoi, newii;
  510|       |
  511|  4.43k|    igraph_bool_t *mark;
  512|  4.43k|    igraph_int_t i, j;
  513|       |
  514|  4.43k|    mark = IGRAPH_CALLOC(no_of_edges, igraph_bool_t);
  ------------------
  |  |   33|  4.43k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  8.87k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 4.43k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 4.43k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 4.43k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  515|  4.43k|    IGRAPH_CHECK_OOM(mark, "Cannot delete edges.");
  ------------------
  |  |  709|  4.43k|    do { \
  |  |  710|  4.43k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  4.43k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  4.43k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 4.43k]
  |  |  ------------------
  ------------------
  516|  4.43k|    IGRAPH_FINALLY(igraph_free, mark);
  ------------------
  |  |  603|  4.43k|    do { \
  |  |  604|  4.43k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  4.43k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  4.43k|         * incorrect destructor function with the pointer */ \
  |  |  607|  4.43k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 4.43k]
  |  |  ------------------
  |  |  608|  4.43k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  4.43k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 4.43k]
  |  |  ------------------
  ------------------
  517|       |
  518|  4.43k|    IGRAPH_CHECK(igraph_eit_create(graph, edges, &eit));
  ------------------
  |  |  656|  4.43k|    do { \
  |  |  657|  4.43k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.43k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.43k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.43k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.43k]
  |  |  ------------------
  ------------------
  519|  4.43k|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  603|  4.43k|    do { \
  |  |  604|  4.43k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  4.43k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  4.43k|         * incorrect destructor function with the pointer */ \
  |  |  607|  4.43k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 4.43k]
  |  |  ------------------
  |  |  608|  4.43k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  4.43k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 4.43k]
  |  |  ------------------
  ------------------
  520|       |
  521|  53.4k|    for (IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  393|  4.43k|#define IGRAPH_EIT_RESET(eit) ((eit).pos = (eit).start)
  ------------------
                  for (IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  371|  53.4k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                  for (IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  359|  49.0k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (521:33): [True: 49.0k, False: 4.43k]
  ------------------
  522|  49.0k|        igraph_int_t e = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|  49.0k|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 45.2k, False: 3.79k]
  |  |  ------------------
  |  |  406|  49.0k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|  3.79k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  523|  49.0k|        if (! mark[e]) {
  ------------------
  |  Branch (523:13): [True: 49.0k, False: 0]
  ------------------
  524|  49.0k|            edges_to_remove++;
  525|  49.0k|            mark[e] = true;
  526|  49.0k|        }
  527|  49.0k|    }
  528|  4.43k|    remaining_edges = no_of_edges - edges_to_remove;
  529|       |
  530|       |    /* We don't need the iterator any more */
  531|  4.43k|    igraph_eit_destroy(&eit);
  532|  4.43k|    IGRAPH_FINALLY_CLEAN(1);
  533|       |
  534|  4.43k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newfrom, remaining_edges);
  ------------------
  |  |  119|  4.43k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  4.43k|    do { \
  |  |  |  |  657|  4.43k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.43k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.43k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.43k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.43k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  4.43k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.43k|    do { \
  |  |  |  |  604|  4.43k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.43k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.43k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.43k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.43k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.43k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.43k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 4.43k]
  |  |  ------------------
  ------------------
  535|  4.43k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newto, remaining_edges);
  ------------------
  |  |  119|  4.43k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  4.43k|    do { \
  |  |  |  |  657|  4.43k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.43k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.43k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.43k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.43k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  4.43k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.43k|    do { \
  |  |  |  |  604|  4.43k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.43k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.43k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.43k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.43k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.43k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.43k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 4.43k]
  |  |  ------------------
  ------------------
  536|       |
  537|       |    /* Actually remove the edges, move from pos i to pos j in newfrom/newto */
  538|  64.9k|    for (i = 0, j = 0; j < remaining_edges; i++) {
  ------------------
  |  Branch (538:24): [True: 60.5k, False: 4.43k]
  ------------------
  539|  60.5k|        if (! mark[i]) {
  ------------------
  |  Branch (539:13): [True: 57.0k, False: 3.49k]
  ------------------
  540|  57.0k|            VECTOR(newfrom)[j] = VECTOR(graph->from)[i];
  ------------------
  |  |   60|  57.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newfrom)[j] = VECTOR(graph->from)[i];
  ------------------
  |  |   60|  57.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  541|  57.0k|            VECTOR(newto)[j] = VECTOR(graph->to)[i];
  ------------------
  |  |   60|  57.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newto)[j] = VECTOR(graph->to)[i];
  ------------------
  |  |   60|  57.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  542|  57.0k|            j++;
  543|  57.0k|        }
  544|  60.5k|    }
  545|       |
  546|       |    /* Create index, this might require additional memory */
  547|  4.43k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newoi, remaining_edges);
  ------------------
  |  |  119|  4.43k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  4.43k|    do { \
  |  |  |  |  657|  4.43k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.43k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.43k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.43k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.43k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  4.43k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.43k|    do { \
  |  |  |  |  604|  4.43k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.43k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.43k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.43k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.43k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.43k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.43k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 4.43k]
  |  |  ------------------
  ------------------
  548|  4.43k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newii, remaining_edges);
  ------------------
  |  |  119|  4.43k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  4.43k|    do { \
  |  |  |  |  657|  4.43k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.43k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.43k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.43k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.43k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  4.43k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.43k|    do { \
  |  |  |  |  604|  4.43k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.43k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.43k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.43k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.43k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.43k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.43k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 4.43k]
  |  |  ------------------
  ------------------
  549|  4.43k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newfrom, &newto, &newoi, no_of_nodes));
  ------------------
  |  |  656|  4.43k|    do { \
  |  |  657|  4.43k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.43k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.43k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.43k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.43k]
  |  |  ------------------
  ------------------
  550|  4.43k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newto, &newfrom, &newii, no_of_nodes));
  ------------------
  |  |  656|  4.43k|    do { \
  |  |  657|  4.43k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.43k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.43k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.43k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.43k]
  |  |  ------------------
  ------------------
  551|       |
  552|       |    /* Edge attributes, we need an index that gives the IDs of the
  553|       |       original edges for every new edge.
  554|       |    */
  555|  4.43k|    if (graph->attr) {
  ------------------
  |  Branch (555:9): [True: 0, False: 4.43k]
  ------------------
  556|      0|        igraph_vector_int_t idx;
  557|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&idx, remaining_edges);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  558|      0|        for (i = 0, j = 0; i < no_of_edges; i++) {
  ------------------
  |  Branch (558:28): [True: 0, False: 0]
  ------------------
  559|      0|            if (! mark[i]) {
  ------------------
  |  Branch (559:17): [True: 0, False: 0]
  ------------------
  560|      0|                VECTOR(idx)[j++] = i;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  561|      0|            }
  562|      0|        }
  563|      0|        IGRAPH_CHECK(igraph_i_attribute_permute_edges(graph, graph, &idx));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  564|      0|        igraph_vector_int_destroy(&idx);
  565|      0|        IGRAPH_FINALLY_CLEAN(1);
  566|      0|    }
  567|       |
  568|       |    /* Ok, we've all memory needed, free the old structure  */
  569|  4.43k|    igraph_vector_int_destroy(&graph->from);
  570|  4.43k|    igraph_vector_int_destroy(&graph->to);
  571|  4.43k|    igraph_vector_int_destroy(&graph->oi);
  572|  4.43k|    igraph_vector_int_destroy(&graph->ii);
  573|  4.43k|    graph->from = newfrom;
  574|  4.43k|    graph->to = newto;
  575|  4.43k|    graph->oi = newoi;
  576|  4.43k|    graph->ii = newii;
  577|  4.43k|    IGRAPH_FINALLY_CLEAN(4);
  578|       |
  579|  4.43k|    IGRAPH_FREE(mark);
  ------------------
  |  |   36|  4.43k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  580|  4.43k|    IGRAPH_FINALLY_CLEAN(1);
  581|       |
  582|       |    /* Create start vectors, no memory is needed for this */
  583|  4.43k|    igraph_i_create_start_vectors(&graph->os, &graph->from, &graph->oi, no_of_nodes);
  584|  4.43k|    igraph_i_create_start_vectors(&graph->is, &graph->to,   &graph->ii, no_of_nodes);
  585|       |
  586|       |    /* modification successful, clear the cached properties of the graph.
  587|       |     *
  588|       |     * Deleting one or more edges cannot make a directed acyclic graph cyclic,
  589|       |     * or an undirected forest into a cyclic graph, so we keep those flags if
  590|       |     * they are cached as true.
  591|       |     *
  592|       |     * Similarly, deleting one or more edges cannot make a disconnected graph
  593|       |     * connected, so we keep the connectivity flags if they are cached as false.
  594|       |     *
  595|       |     * Also, if the graph had no loop edges before the deletion, it will have
  596|       |     * no loop edges after the deletion either. The same applies to reciprocal
  597|       |     * edges or multiple edges as well.
  598|       |     */
  599|  4.43k|    igraph_i_property_cache_invalidate_conditionally(
  600|  4.43k|        graph,
  601|  4.43k|        /* keep_always = */ 0,
  602|       |        /* keep_when_false = */
  603|  4.43k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  604|  4.43k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  605|  4.43k|        (1 << IGRAPH_PROP_HAS_MUTUAL) |
  606|  4.43k|        (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  607|  4.43k|        (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED),
  608|       |        /* keep_when_true = */
  609|  4.43k|        (1 << IGRAPH_PROP_IS_DAG) |
  610|  4.43k|        (1 << IGRAPH_PROP_IS_FOREST)
  611|  4.43k|    );
  612|       |
  613|       |    /* Nothing to deallocate... */
  614|  4.43k|    return IGRAPH_SUCCESS;
  615|  4.43k|}
igraph_delete_vertices_map:
  649|  2.07k|) {
  650|  2.07k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  651|  2.07k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  652|  2.07k|    igraph_vector_int_t edge_recoding, vertex_recoding;
  653|  2.07k|    igraph_vector_int_t *my_vertex_recoding = &vertex_recoding;
  654|  2.07k|    igraph_vit_t vit;
  655|  2.07k|    igraph_t newgraph;
  656|  2.07k|    igraph_int_t i, j;
  657|  2.07k|    igraph_int_t remaining_vertices, remaining_edges;
  658|       |
  659|  2.07k|    if (map) {
  ------------------
  |  Branch (659:9): [True: 70, False: 2.00k]
  ------------------
  660|     70|        my_vertex_recoding = map;
  661|     70|        IGRAPH_CHECK(igraph_vector_int_resize(map, no_of_nodes));
  ------------------
  |  |  656|     70|    do { \
  |  |  657|     70|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     70|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     70|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 70]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
  662|     70|        igraph_vector_int_null(map);
  663|  2.00k|    } else {
  664|  2.00k|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vertex_recoding, no_of_nodes);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  665|  2.00k|    }
  666|       |
  667|  2.07k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edge_recoding, no_of_edges);
  ------------------
  |  |  119|  2.07k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.07k|    do { \
  |  |  |  |  657|  2.07k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.07k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.07k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.07k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.07k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.07k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.07k|    do { \
  |  |  |  |  604|  2.07k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.07k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.07k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.07k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.07k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.07k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.07k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.07k]
  |  |  ------------------
  ------------------
  668|       |
  669|  2.07k|    IGRAPH_CHECK(igraph_vit_create(graph, vertices, &vit));
  ------------------
  |  |  656|  2.07k|    do { \
  |  |  657|  2.07k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.07k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.07k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.07k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.07k]
  |  |  ------------------
  ------------------
  670|  2.07k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  2.07k|    do { \
  |  |  604|  2.07k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.07k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.07k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.07k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.07k]
  |  |  ------------------
  |  |  608|  2.07k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.07k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.07k]
  |  |  ------------------
  ------------------
  671|       |
  672|       |    /* mark the vertices to delete */
  673|  5.84k|    for (; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit) ) {
  ------------------
  |  |  179|  5.84k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit) ) {
  ------------------
  |  |  167|  3.77k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (673:12): [True: 3.77k, False: 2.07k]
  ------------------
  674|  3.77k|        igraph_int_t vertex = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  3.77k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 2.00k, False: 1.77k]
  |  |  ------------------
  |  |  215|  3.77k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|  1.77k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  675|  3.77k|        if (vertex < 0 || vertex >= no_of_nodes) {
  ------------------
  |  Branch (675:13): [True: 0, False: 3.77k]
  |  Branch (675:27): [True: 0, False: 3.77k]
  ------------------
  676|      0|            IGRAPH_ERROR("Cannot delete vertices.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  677|      0|        }
  678|  3.77k|        VECTOR(*my_vertex_recoding)[vertex] = 1;
  ------------------
  |  |   60|  3.77k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  679|  3.77k|    }
  680|       |    /* create vertex recoding vector */
  681|   345k|    for (remaining_vertices = 0, i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (681:41): [True: 342k, False: 2.07k]
  ------------------
  682|   342k|        if (VECTOR(*my_vertex_recoding)[i] == 0) {
  ------------------
  |  |   60|   342k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (682:13): [True: 339k, False: 3.77k]
  ------------------
  683|   339k|            VECTOR(*my_vertex_recoding)[i] = remaining_vertices;
  ------------------
  |  |   60|   339k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  684|   339k|            remaining_vertices++;
  685|   339k|        } else {
  686|  3.77k|            VECTOR(*my_vertex_recoding)[i] = -1;
  ------------------
  |  |   60|  3.77k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  687|  3.77k|        }
  688|   342k|    }
  689|       |    /* create edge recoding vector */
  690|  57.6k|    for (remaining_edges = 0, i = 0; i < no_of_edges; i++) {
  ------------------
  |  Branch (690:38): [True: 55.5k, False: 2.07k]
  ------------------
  691|  55.5k|        igraph_int_t from = VECTOR(graph->from)[i];
  ------------------
  |  |   60|  55.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  692|  55.5k|        igraph_int_t to = VECTOR(graph->to)[i];
  ------------------
  |  |   60|  55.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  693|  55.5k|        if (VECTOR(*my_vertex_recoding)[from] >= 0 &&
  ------------------
  |  |   60|  55.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (693:13): [True: 52.6k, False: 2.95k]
  ------------------
  694|  52.6k|            VECTOR(*my_vertex_recoding)[to  ] >= 0) {
  ------------------
  |  |   60|  52.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (694:13): [True: 49.3k, False: 3.25k]
  ------------------
  695|  49.3k|            VECTOR(edge_recoding)[i] = remaining_edges + 1;
  ------------------
  |  |   60|  49.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  696|  49.3k|            remaining_edges++;
  697|  49.3k|        }
  698|  55.5k|    }
  699|       |
  700|       |    /* start creating the graph */
  701|  2.07k|    memset(&newgraph, 0, sizeof(igraph_t));
  702|  2.07k|    newgraph.n = remaining_vertices;
  703|  2.07k|    newgraph.directed = graph->directed;
  704|       |
  705|       |    /* allocate vectors */
  706|  2.07k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.from, remaining_edges);
  ------------------
  |  |  119|  2.07k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.07k|    do { \
  |  |  |  |  657|  2.07k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.07k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.07k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.07k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.07k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.07k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.07k|    do { \
  |  |  |  |  604|  2.07k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.07k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.07k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.07k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.07k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.07k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.07k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.07k]
  |  |  ------------------
  ------------------
  707|  2.07k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.to, remaining_edges);
  ------------------
  |  |  119|  2.07k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.07k|    do { \
  |  |  |  |  657|  2.07k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.07k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.07k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.07k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.07k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.07k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.07k|    do { \
  |  |  |  |  604|  2.07k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.07k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.07k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.07k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.07k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.07k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.07k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.07k]
  |  |  ------------------
  ------------------
  708|  2.07k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.oi, remaining_edges);
  ------------------
  |  |  119|  2.07k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.07k|    do { \
  |  |  |  |  657|  2.07k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.07k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.07k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.07k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.07k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.07k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.07k|    do { \
  |  |  |  |  604|  2.07k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.07k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.07k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.07k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.07k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.07k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.07k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.07k]
  |  |  ------------------
  ------------------
  709|  2.07k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.ii, remaining_edges);
  ------------------
  |  |  119|  2.07k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.07k|    do { \
  |  |  |  |  657|  2.07k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.07k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.07k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.07k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.07k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.07k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.07k|    do { \
  |  |  |  |  604|  2.07k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.07k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.07k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.07k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.07k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.07k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.07k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.07k]
  |  |  ------------------
  ------------------
  710|  2.07k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.os, remaining_vertices + 1);
  ------------------
  |  |  119|  2.07k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.07k|    do { \
  |  |  |  |  657|  2.07k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.07k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.07k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.07k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.07k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.07k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.07k|    do { \
  |  |  |  |  604|  2.07k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.07k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.07k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.07k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.07k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.07k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.07k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.07k]
  |  |  ------------------
  ------------------
  711|  2.07k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.is, remaining_vertices + 1);
  ------------------
  |  |  119|  2.07k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.07k|    do { \
  |  |  |  |  657|  2.07k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.07k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.07k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.07k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.07k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.07k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.07k|    do { \
  |  |  |  |  604|  2.07k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.07k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.07k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.07k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.07k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.07k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.07k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.07k]
  |  |  ------------------
  ------------------
  712|       |
  713|       |    /* Add the edges */
  714|  55.4k|    for (i = 0, j = 0; j < remaining_edges; i++) {
  ------------------
  |  Branch (714:24): [True: 53.4k, False: 2.07k]
  ------------------
  715|  53.4k|        if (VECTOR(edge_recoding)[i] > 0) {
  ------------------
  |  |   60|  53.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (715:13): [True: 49.3k, False: 4.02k]
  ------------------
  716|  49.3k|            igraph_int_t from = VECTOR(graph->from)[i];
  ------------------
  |  |   60|  49.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  717|  49.3k|            igraph_int_t to = VECTOR(graph->to  )[i];
  ------------------
  |  |   60|  49.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  718|  49.3k|            VECTOR(newgraph.from)[j] = VECTOR(*my_vertex_recoding)[from];
  ------------------
  |  |   60|  49.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newgraph.from)[j] = VECTOR(*my_vertex_recoding)[from];
  ------------------
  |  |   60|  49.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  719|  49.3k|            VECTOR(newgraph.to  )[j] = VECTOR(*my_vertex_recoding)[to];
  ------------------
  |  |   60|  49.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newgraph.to  )[j] = VECTOR(*my_vertex_recoding)[to];
  ------------------
  |  |   60|  49.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  720|  49.3k|            j++;
  721|  49.3k|        }
  722|  53.4k|    }
  723|       |
  724|       |    /* update oi & ii */
  725|  2.07k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newgraph.from, &newgraph.to, &newgraph.oi,
  ------------------
  |  |  656|  2.07k|    do { \
  |  |  657|  2.07k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.07k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.07k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.07k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.07k]
  |  |  ------------------
  ------------------
  726|  2.07k|                                         remaining_vertices));
  727|  2.07k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newgraph.to, &newgraph.from, &newgraph.ii,
  ------------------
  |  |  656|  2.07k|    do { \
  |  |  657|  2.07k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.07k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.07k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.07k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.07k]
  |  |  ------------------
  ------------------
  728|  2.07k|                                         remaining_vertices));
  729|       |
  730|  2.07k|    IGRAPH_CHECK(igraph_i_create_start_vectors(&newgraph.os, &newgraph.from,
  ------------------
  |  |  656|  2.07k|    do { \
  |  |  657|  2.07k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.07k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.07k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.07k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.07k]
  |  |  ------------------
  ------------------
  731|  2.07k|                                       &newgraph.oi, remaining_vertices));
  732|  2.07k|    IGRAPH_CHECK(igraph_i_create_start_vectors(&newgraph.is, &newgraph.to,
  ------------------
  |  |  656|  2.07k|    do { \
  |  |  657|  2.07k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.07k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.07k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.07k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.07k]
  |  |  ------------------
  ------------------
  733|  2.07k|                                       &newgraph.ii, remaining_vertices));
  734|       |
  735|  2.07k|    newgraph.cache = IGRAPH_CALLOC(1, igraph_i_property_cache_t);
  ------------------
  |  |   33|  2.07k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.14k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 2.07k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  736|  2.07k|    IGRAPH_CHECK_OOM(newgraph.cache, "Cannot delete vertices.");
  ------------------
  |  |  709|  2.07k|    do { \
  |  |  710|  2.07k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.07k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  2.07k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.07k]
  |  |  ------------------
  ------------------
  737|  2.07k|    IGRAPH_FINALLY(igraph_free, newgraph.cache);
  ------------------
  |  |  603|  2.07k|    do { \
  |  |  604|  2.07k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.07k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.07k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.07k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.07k]
  |  |  ------------------
  |  |  608|  2.07k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.07k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.07k]
  |  |  ------------------
  ------------------
  738|  2.07k|    IGRAPH_CHECK(igraph_i_property_cache_init(newgraph.cache));
  ------------------
  |  |  656|  2.07k|    do { \
  |  |  657|  2.07k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.07k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.07k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.07k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.07k]
  |  |  ------------------
  ------------------
  739|  2.07k|    IGRAPH_FINALLY(igraph_i_property_cache_destroy, newgraph.cache);
  ------------------
  |  |  603|  2.07k|    do { \
  |  |  604|  2.07k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.07k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.07k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.07k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.07k]
  |  |  ------------------
  |  |  608|  2.07k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.07k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.07k]
  |  |  ------------------
  ------------------
  740|       |
  741|       |    /* attributes */
  742|  2.07k|    IGRAPH_CHECK(igraph_i_attribute_copy(
  ------------------
  |  |  656|  2.07k|    do { \
  |  |  657|  2.07k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.07k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.07k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.07k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.07k]
  |  |  ------------------
  ------------------
  743|  2.07k|        &newgraph, graph, /* graph= */ true, /* vertex= */ false, /* edge= */ false
  744|  2.07k|    ));
  745|       |
  746|       |    /* at this point igraph_destroy can take over the responsibility of
  747|       |     * deallocating the graph */
  748|  2.07k|    IGRAPH_FINALLY_CLEAN(8);    /* 2 for the property cache, 6 for the vectors */
  749|  2.07k|    IGRAPH_FINALLY(igraph_destroy, &newgraph);
  ------------------
  |  |  603|  2.07k|    do { \
  |  |  604|  2.07k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.07k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.07k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.07k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.07k]
  |  |  ------------------
  |  |  608|  2.07k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.07k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.07k]
  |  |  ------------------
  ------------------
  750|       |
  751|  2.07k|    if (newgraph.attr) {
  ------------------
  |  Branch (751:9): [True: 0, False: 2.07k]
  ------------------
  752|      0|        igraph_vector_int_t iidx;
  753|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&iidx, remaining_vertices);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  754|      0|        for (i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (754:21): [True: 0, False: 0]
  ------------------
  755|      0|            igraph_int_t jj = VECTOR(*my_vertex_recoding)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  756|      0|            if (jj >= 0) {
  ------------------
  |  Branch (756:17): [True: 0, False: 0]
  ------------------
  757|      0|                VECTOR(iidx)[ jj ] = i;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  758|      0|            }
  759|      0|        }
  760|      0|        IGRAPH_CHECK(igraph_i_attribute_permute_vertices(graph, &newgraph, &iidx));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  761|      0|        IGRAPH_CHECK(igraph_vector_int_resize(&iidx, remaining_edges));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  762|      0|        for (i = 0; i < no_of_edges; i++) {
  ------------------
  |  Branch (762:21): [True: 0, False: 0]
  ------------------
  763|      0|            igraph_int_t jj = VECTOR(edge_recoding)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  764|      0|            if (jj != 0) {
  ------------------
  |  Branch (764:17): [True: 0, False: 0]
  ------------------
  765|      0|                VECTOR(iidx)[ jj - 1 ] = i;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  766|      0|            }
  767|      0|        }
  768|      0|        IGRAPH_CHECK(igraph_i_attribute_permute_edges(graph, &newgraph, &iidx));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  769|      0|        igraph_vector_int_destroy(&iidx);
  770|      0|        IGRAPH_FINALLY_CLEAN(1);
  771|      0|    }
  772|       |
  773|  2.07k|    igraph_vit_destroy(&vit);
  774|  2.07k|    igraph_vector_int_destroy(&edge_recoding);
  775|  2.07k|    igraph_destroy(graph);
  776|  2.07k|    *graph = newgraph;
  777|       |
  778|  2.07k|    IGRAPH_FINALLY_CLEAN(3);
  779|       |
  780|  2.07k|    if (invmap) {
  ------------------
  |  Branch (780:9): [True: 0, False: 2.07k]
  ------------------
  781|      0|        IGRAPH_CHECK(igraph_vector_int_resize(invmap, remaining_vertices));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  782|      0|        for (i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (782:21): [True: 0, False: 0]
  ------------------
  783|      0|            igraph_int_t newid = VECTOR(*my_vertex_recoding)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  784|      0|            if (newid >= 0) {
  ------------------
  |  Branch (784:17): [True: 0, False: 0]
  ------------------
  785|      0|                VECTOR(*invmap)[newid] = i;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  786|      0|            }
  787|      0|        }
  788|      0|    }
  789|       |
  790|  2.07k|    if (!map) {
  ------------------
  |  Branch (790:9): [True: 2.00k, False: 70]
  ------------------
  791|  2.00k|        igraph_vector_int_destroy(my_vertex_recoding);
  792|  2.00k|        IGRAPH_FINALLY_CLEAN(1);
  793|  2.00k|    }
  794|       |
  795|       |    /* modification successful, clear the cached properties of the graph.
  796|       |     *
  797|       |     * Deleting one or more vertices cannot make a directed acyclic graph cyclic,
  798|       |     * or an undirected forest into a cyclic graph, so we keep those flags if
  799|       |     * they are cached as true.
  800|       |     *
  801|       |     * Also, if the graph had no loop edges before the deletion, it will have
  802|       |     * no loop edges after the deletion either. The same applies to reciprocal
  803|       |     * edges or multiple edges as well.
  804|       |     */
  805|  2.07k|    igraph_i_property_cache_invalidate_conditionally(
  806|  2.07k|        graph,
  807|  2.07k|        /* keep_always = */ 0,
  808|       |        /* keep_when_false = */
  809|  2.07k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  810|  2.07k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  811|  2.07k|        (1 << IGRAPH_PROP_HAS_MUTUAL),
  812|       |        /* keep_when_true = */
  813|  2.07k|        (1 << IGRAPH_PROP_IS_DAG) |
  814|  2.07k|        (1 << IGRAPH_PROP_IS_FOREST)
  815|  2.07k|    );
  816|       |
  817|  2.07k|    return IGRAPH_SUCCESS;
  818|  2.07k|}
igraph_vcount:
  830|  7.54M|igraph_int_t igraph_vcount(const igraph_t *graph) {
  831|  7.54M|    return graph->n;
  832|  7.54M|}
igraph_ecount:
  844|  93.7k|igraph_int_t igraph_ecount(const igraph_t *graph) {
  845|  93.7k|    return igraph_vector_int_size(&graph->from);
  846|  93.7k|}
igraph_neighbors:
  895|  5.38M|) {
  896|       |
  897|  5.38M|#define DEDUPLICATE_IF_NEEDED(vertex, n)                                          \
  898|  5.38M|    if (should_filter_duplicates) {                                               \
  899|  5.38M|        if (vertex == pnode) {                                                    \
  900|       |            /* This is a loop edge */                                             \
  901|  5.38M|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  902|       |                /* Filtering loop edges unconditionally */                        \
  903|  5.38M|                length -= n;                                                      \
  904|  5.38M|                continue;                                                         \
  905|  5.38M|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  906|       |                /* Filtering every second endpoint of loop edges */               \
  907|  5.38M|                length -= n;                                                      \
  908|  5.38M|                last_added = -1;                                                  \
  909|  5.38M|                seen_loop = true;                                                 \
  910|  5.38M|                continue;                                                         \
  911|  5.38M|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  912|       |                /* Filtering multi-loop edges */                                  \
  913|  5.38M|                length -= n;                                                      \
  914|  5.38M|                continue;                                                         \
  915|  5.38M|            } else {                                                              \
  916|  5.38M|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  917|  5.38M|                last_added = vertex;                                              \
  918|  5.38M|            }                                                                     \
  919|  5.38M|        } else {                                                                  \
  920|       |            /* Not a loop edge */                                                 \
  921|  5.38M|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  922|       |                /* Filtering multi-edges */                                       \
  923|  5.38M|                length -= n;                                                      \
  924|  5.38M|                continue;                                                         \
  925|  5.38M|            } else {                                                              \
  926|  5.38M|                last_added = vertex;                                              \
  927|  5.38M|            }                                                                     \
  928|  5.38M|        }                                                                         \
  929|  5.38M|    }
  930|       |
  931|  5.38M|    igraph_int_t length = 0, idx = 0;
  932|  5.38M|    igraph_int_t i, j;
  933|       |
  934|  5.38M|    igraph_int_t node = pnode;
  935|  5.38M|    igraph_int_t last_added = -1;
  936|  5.38M|    igraph_bool_t should_filter_duplicates;
  937|       |
  938|       |    /* seen_loop stores whether we have already seen at least one full loop
  939|       |     * edge while iterating over the neighbor lists. This is needed to handle
  940|       |     * multi-loop edges properly. Since internally we always store loop edges
  941|       |     * twice, this flag should become true only if we processed both endpoints
  942|       |     * for a loop edge */
  943|  5.38M|    igraph_bool_t seen_loop = false;
  944|       |
  945|       |    /* normalize Boolean value to enable == comparisons below and in DEDUPLICATE_IF_NEEDED */
  946|  5.38M|    multiple = !!multiple;
  947|       |
  948|  5.38M|    if (node < 0 || node > igraph_vcount(graph) - 1) {
  ------------------
  |  Branch (948:9): [True: 0, False: 5.38M]
  |  Branch (948:21): [True: 0, False: 5.38M]
  ------------------
  949|      0|        IGRAPH_ERRORF("Vertex %" IGRAPH_PRId " is not in the graph.", IGRAPH_EINVVID, node);
  ------------------
  |  |  464|      0|    do { \
  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  467|      0|        return igraph_errno; \
  |  |  468|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  950|      0|    }
  951|  5.38M|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (951:9): [True: 2.13M, False: 3.24M]
  |  Branch (951:31): [True: 446k, False: 1.69M]
  |  Branch (951:52): [True: 0, False: 446k]
  ------------------
  952|      0|        IGRAPH_ERROR("Mode should be either IGRAPH_OUT, IGRAPH_IN or IGRAPH_ALL.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  953|      0|    }
  954|       |
  955|  5.38M|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (955:9): [True: 0, False: 5.38M]
  ------------------
  956|      0|        mode = IGRAPH_ALL;
  957|      0|    }
  958|       |
  959|  5.38M|    if (mode != IGRAPH_ALL && loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (959:9): [True: 4.93M, False: 446k]
  |  Branch (959:31): [True: 3.30M, False: 1.62M]
  ------------------
  960|       |        /*
  961|       |        IGRAPH_ERROR("For a directed graph (with directions not ignored), "
  962|       |                     "IGRAPH_LOOPS_TWICE does not make sense.", IGRAPH_EINVAL);
  963|       |        */
  964|  3.30M|        loops = IGRAPH_LOOPS_ONCE;
  965|  3.30M|    }
  966|       |
  967|       |    /* Calculate needed space first & allocate it */
  968|       |    /* Note that 'mode' is treated as a bit field here; it's okay because
  969|       |     * IGRAPH_ALL = IGRAPH_IN | IGRAPH_OUT, bit-wise */
  970|  5.38M|    if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (970:9): [True: 3.68M, False: 1.69M]
  ------------------
  971|  3.68M|        length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|  3.68M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|  3.68M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  972|  3.68M|    }
  973|  5.38M|    if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (973:9): [True: 2.13M, False: 3.24M]
  ------------------
  974|  2.13M|        length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|  2.13M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|  2.13M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  975|  2.13M|    }
  976|       |
  977|  5.38M|    IGRAPH_CHECK(igraph_vector_int_resize(neis, length));
  ------------------
  |  |  656|  5.38M|    do { \
  |  |  657|  5.38M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.38M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.38M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.38M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  5.38M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.38M]
  |  |  ------------------
  ------------------
  978|       |
  979|       |    /* We are dealing with two sorted lists; one for the successors and one
  980|       |     * for the predecessors. If we have requested only one of them, we have
  981|       |     * an easy job. If we have requested both, we need to merge the two lists
  982|       |     * to ensure that the output is sorted by the vertex IDs of the "other"
  983|       |     * endpoint of the affected edges. We don't need to merge if the graph
  984|       |     * is undirected, because in that case the data structure guarantees that
  985|       |     * the "out-edges" contain only (u, v) pairs where u <= v and the
  986|       |     * "in-edges" contains the rest, so the result is sorted even without
  987|       |     * merging. */
  988|  5.38M|    if (!igraph_is_directed(graph) || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (988:9): [True: 0, False: 5.38M]
  |  Branch (988:39): [True: 4.93M, False: 446k]
  ------------------
  989|       |        /* graph is undirected or we did not ask for both directions in a
  990|       |         * directed graph; this is the easy case */
  991|       |
  992|  4.93M|        should_filter_duplicates = !(multiple == IGRAPH_MULTIPLE &&
  ------------------
  |  Branch (992:38): [True: 4.91M, False: 17.7k]
  ------------------
  993|  4.91M|                ((!igraph_is_directed(graph) && loops == IGRAPH_LOOPS_TWICE) ||
  ------------------
  |  Branch (993:19): [True: 0, False: 4.91M]
  |  Branch (993:49): [True: 0, False: 0]
  ------------------
  994|  4.91M|                 (igraph_is_directed(graph) && loops != IGRAPH_NO_LOOPS)));
  ------------------
  |  Branch (994:19): [True: 4.91M, False: 0]
  |  Branch (994:48): [True: 4.76M, False: 152k]
  ------------------
  995|       |
  996|  4.93M|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (996:13): [True: 3.24M, False: 1.69M]
  ------------------
  997|  3.24M|            j = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|  3.24M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  998|  4.20M|            for (i = VECTOR(graph->os)[node]; i < j; i++) {
  ------------------
  |  |   60|  3.24M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (998:47): [True: 967k, False: 3.24M]
  ------------------
  999|   967k|                igraph_int_t to = VECTOR(graph->to)[ VECTOR(graph->oi)[i] ];
  ------------------
  |  |   60|   967k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_int_t to = VECTOR(graph->to)[ VECTOR(graph->oi)[i] ];
  ------------------
  |  |   60|   967k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1000|   967k|                DEDUPLICATE_IF_NEEDED(to, 1);
  ------------------
  |  |  898|   967k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (898:9): [True: 92.5k, False: 874k]
  |  |  ------------------
  |  |  899|  92.5k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (899:13): [True: 20.6k, False: 71.9k]
  |  |  ------------------
  |  |  900|  20.6k|            /* This is a loop edge */                                             \
  |  |  901|  20.6k|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (901:17): [True: 20.6k, False: 0]
  |  |  ------------------
  |  |  902|  20.6k|                /* Filtering loop edges unconditionally */                        \
  |  |  903|  20.6k|                length -= n;                                                      \
  |  |  904|  20.6k|                continue;                                                         \
  |  |  905|  20.6k|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (905:24): [True: 0, False: 0]
  |  |  |  Branch (905:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  906|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  907|      0|                length -= n;                                                      \
  |  |  908|      0|                last_added = -1;                                                  \
  |  |  909|      0|                seen_loop = true;                                                 \
  |  |  910|      0|                continue;                                                         \
  |  |  911|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (911:24): [True: 0, False: 0]
  |  |  |  Branch (911:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  912|      0|                /* Filtering multi-loop edges */                                  \
  |  |  913|      0|                length -= n;                                                      \
  |  |  914|      0|                continue;                                                         \
  |  |  915|      0|            } else {                                                              \
  |  |  916|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (916:30): [True: 0, False: 0]
  |  |  |  Branch (916:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  917|      0|                last_added = vertex;                                              \
  |  |  918|      0|            }                                                                     \
  |  |  919|  71.9k|        } else {                                                                  \
  |  |  920|  71.9k|            /* Not a loop edge */                                                 \
  |  |  921|  71.9k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (921:17): [True: 20.6k, False: 51.3k]
  |  |  |  Branch (921:51): [True: 9.06k, False: 11.5k]
  |  |  ------------------
  |  |  922|  9.06k|                /* Filtering multi-edges */                                       \
  |  |  923|  9.06k|                length -= n;                                                      \
  |  |  924|  9.06k|                continue;                                                         \
  |  |  925|  62.8k|            } else {                                                              \
  |  |  926|  62.8k|                last_added = vertex;                                              \
  |  |  927|  62.8k|            }                                                                     \
  |  |  928|  71.9k|        }                                                                         \
  |  |  929|  92.5k|    }
  ------------------
 1001|   937k|                VECTOR(*neis)[idx++] = to;
  ------------------
  |  |   60|   937k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1002|   937k|            }
 1003|  3.24M|        }
 1004|       |
 1005|  4.93M|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1005:13): [True: 1.69M, False: 3.24M]
  ------------------
 1006|  1.69M|            j = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|  1.69M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1007|  2.11M|            for (i = VECTOR(graph->is)[node]; i < j; i++) {
  ------------------
  |  |   60|  1.69M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1007:47): [True: 425k, False: 1.69M]
  ------------------
 1008|   425k|                igraph_int_t from = VECTOR(graph->from)[ VECTOR(graph->ii)[i] ];
  ------------------
  |  |   60|   425k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_int_t from = VECTOR(graph->from)[ VECTOR(graph->ii)[i] ];
  ------------------
  |  |   60|   425k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1009|   425k|                DEDUPLICATE_IF_NEEDED(from, 1);
  ------------------
  |  |  898|   425k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (898:9): [True: 33.3k, False: 391k]
  |  |  ------------------
  |  |  899|  33.3k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (899:13): [True: 10.3k, False: 22.9k]
  |  |  ------------------
  |  |  900|  10.3k|            /* This is a loop edge */                                             \
  |  |  901|  10.3k|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (901:17): [True: 10.3k, False: 0]
  |  |  ------------------
  |  |  902|  10.3k|                /* Filtering loop edges unconditionally */                        \
  |  |  903|  10.3k|                length -= n;                                                      \
  |  |  904|  10.3k|                continue;                                                         \
  |  |  905|  10.3k|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (905:24): [True: 0, False: 0]
  |  |  |  Branch (905:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  906|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  907|      0|                length -= n;                                                      \
  |  |  908|      0|                last_added = -1;                                                  \
  |  |  909|      0|                seen_loop = true;                                                 \
  |  |  910|      0|                continue;                                                         \
  |  |  911|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (911:24): [True: 0, False: 0]
  |  |  |  Branch (911:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  912|      0|                /* Filtering multi-loop edges */                                  \
  |  |  913|      0|                length -= n;                                                      \
  |  |  914|      0|                continue;                                                         \
  |  |  915|      0|            } else {                                                              \
  |  |  916|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (916:30): [True: 0, False: 0]
  |  |  |  Branch (916:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  917|      0|                last_added = vertex;                                              \
  |  |  918|      0|            }                                                                     \
  |  |  919|  22.9k|        } else {                                                                  \
  |  |  920|  22.9k|            /* Not a loop edge */                                                 \
  |  |  921|  22.9k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (921:17): [True: 19.8k, False: 3.18k]
  |  |  |  Branch (921:51): [True: 9.04k, False: 10.7k]
  |  |  ------------------
  |  |  922|  9.04k|                /* Filtering multi-edges */                                       \
  |  |  923|  9.04k|                length -= n;                                                      \
  |  |  924|  9.04k|                continue;                                                         \
  |  |  925|  13.9k|            } else {                                                              \
  |  |  926|  13.9k|                last_added = vertex;                                              \
  |  |  927|  13.9k|            }                                                                     \
  |  |  928|  22.9k|        }                                                                         \
  |  |  929|  33.3k|    }
  ------------------
 1010|   405k|                VECTOR(*neis)[idx++] = from;
  ------------------
  |  |   60|   405k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1011|   405k|            }
 1012|  1.69M|        }
 1013|  4.93M|    } else {
 1014|       |        /* Both in- and out- neighbors in a directed graph,
 1015|       |           we need to merge the two 'vectors' so the result is
 1016|       |           correctly ordered. */
 1017|   446k|        igraph_int_t j1 = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|   446k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1018|   446k|        igraph_int_t j2 = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|   446k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1019|   446k|        igraph_int_t i1 = VECTOR(graph->os)[node];
  ------------------
  |  |   60|   446k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1020|   446k|        igraph_int_t i2 = VECTOR(graph->is)[node];
  ------------------
  |  |   60|   446k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1021|   446k|        igraph_int_t eid1, eid2;
 1022|   446k|        igraph_int_t n1, n2;
 1023|       |
 1024|   446k|        should_filter_duplicates = !(multiple == IGRAPH_MULTIPLE &&
  ------------------
  |  Branch (1024:38): [True: 446k, False: 0]
  ------------------
 1025|   446k|                loops == IGRAPH_LOOPS_TWICE);
  ------------------
  |  Branch (1025:17): [True: 0, False: 446k]
  ------------------
 1026|       |
 1027|   524k|        while (i1 < j1 && i2 < j2) {
  ------------------
  |  Branch (1027:16): [True: 104k, False: 419k]
  |  Branch (1027:27): [True: 77.9k, False: 27.0k]
  ------------------
 1028|  77.9k|            eid1 = VECTOR(graph->oi)[i1];
  ------------------
  |  |   60|  77.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1029|  77.9k|            eid2 = VECTOR(graph->ii)[i2];
  ------------------
  |  |   60|  77.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1030|  77.9k|            n1 = VECTOR(graph->to)[eid1];
  ------------------
  |  |   60|  77.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1031|  77.9k|            n2 = VECTOR(graph->from)[eid2];
  ------------------
  |  |   60|  77.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1032|  77.9k|            if (n1 < n2) {
  ------------------
  |  Branch (1032:17): [True: 22.7k, False: 55.1k]
  ------------------
 1033|  22.7k|                i1++;
 1034|  22.7k|                DEDUPLICATE_IF_NEEDED(n1, 1);
  ------------------
  |  |  898|  22.7k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (898:9): [True: 22.7k, False: 0]
  |  |  ------------------
  |  |  899|  22.7k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (899:13): [True: 0, False: 22.7k]
  |  |  ------------------
  |  |  900|      0|            /* This is a loop edge */                                             \
  |  |  901|      0|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (901:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|                /* Filtering loop edges unconditionally */                        \
  |  |  903|      0|                length -= n;                                                      \
  |  |  904|      0|                continue;                                                         \
  |  |  905|      0|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (905:24): [True: 0, False: 0]
  |  |  |  Branch (905:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  906|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  907|      0|                length -= n;                                                      \
  |  |  908|      0|                last_added = -1;                                                  \
  |  |  909|      0|                seen_loop = true;                                                 \
  |  |  910|      0|                continue;                                                         \
  |  |  911|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (911:24): [True: 0, False: 0]
  |  |  |  Branch (911:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  912|      0|                /* Filtering multi-loop edges */                                  \
  |  |  913|      0|                length -= n;                                                      \
  |  |  914|      0|                continue;                                                         \
  |  |  915|      0|            } else {                                                              \
  |  |  916|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (916:30): [True: 0, False: 0]
  |  |  |  Branch (916:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  917|      0|                last_added = vertex;                                              \
  |  |  918|      0|            }                                                                     \
  |  |  919|  22.7k|        } else {                                                                  \
  |  |  920|  22.7k|            /* Not a loop edge */                                                 \
  |  |  921|  22.7k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (921:17): [True: 0, False: 22.7k]
  |  |  |  Branch (921:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  922|      0|                /* Filtering multi-edges */                                       \
  |  |  923|      0|                length -= n;                                                      \
  |  |  924|      0|                continue;                                                         \
  |  |  925|  22.7k|            } else {                                                              \
  |  |  926|  22.7k|                last_added = vertex;                                              \
  |  |  927|  22.7k|            }                                                                     \
  |  |  928|  22.7k|        }                                                                         \
  |  |  929|  22.7k|    }
  ------------------
 1035|  22.7k|                VECTOR(*neis)[idx++] = n1;
  ------------------
  |  |   60|  22.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1036|  55.1k|            } else if (n1 > n2) {
  ------------------
  |  Branch (1036:24): [True: 23.0k, False: 32.0k]
  ------------------
 1037|  23.0k|                i2++;
 1038|  23.0k|                DEDUPLICATE_IF_NEEDED(n2, 1);
  ------------------
  |  |  898|  23.0k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (898:9): [True: 23.0k, False: 0]
  |  |  ------------------
  |  |  899|  23.0k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (899:13): [True: 0, False: 23.0k]
  |  |  ------------------
  |  |  900|      0|            /* This is a loop edge */                                             \
  |  |  901|      0|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (901:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|                /* Filtering loop edges unconditionally */                        \
  |  |  903|      0|                length -= n;                                                      \
  |  |  904|      0|                continue;                                                         \
  |  |  905|      0|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (905:24): [True: 0, False: 0]
  |  |  |  Branch (905:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  906|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  907|      0|                length -= n;                                                      \
  |  |  908|      0|                last_added = -1;                                                  \
  |  |  909|      0|                seen_loop = true;                                                 \
  |  |  910|      0|                continue;                                                         \
  |  |  911|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (911:24): [True: 0, False: 0]
  |  |  |  Branch (911:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  912|      0|                /* Filtering multi-loop edges */                                  \
  |  |  913|      0|                length -= n;                                                      \
  |  |  914|      0|                continue;                                                         \
  |  |  915|      0|            } else {                                                              \
  |  |  916|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (916:30): [True: 0, False: 0]
  |  |  |  Branch (916:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  917|      0|                last_added = vertex;                                              \
  |  |  918|      0|            }                                                                     \
  |  |  919|  23.0k|        } else {                                                                  \
  |  |  920|  23.0k|            /* Not a loop edge */                                                 \
  |  |  921|  23.0k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (921:17): [True: 0, False: 23.0k]
  |  |  |  Branch (921:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  922|      0|                /* Filtering multi-edges */                                       \
  |  |  923|      0|                length -= n;                                                      \
  |  |  924|      0|                continue;                                                         \
  |  |  925|  23.0k|            } else {                                                              \
  |  |  926|  23.0k|                last_added = vertex;                                              \
  |  |  927|  23.0k|            }                                                                     \
  |  |  928|  23.0k|        }                                                                         \
  |  |  929|  23.0k|    }
  ------------------
 1039|  23.0k|                VECTOR(*neis)[idx++] = n2;
  ------------------
  |  |   60|  23.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1040|  32.0k|            } else {
 1041|  32.0k|                i1++;
 1042|  32.0k|                i2++;
 1043|  32.0k|                DEDUPLICATE_IF_NEEDED(n1, 2);
  ------------------
  |  |  898|  32.0k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (898:9): [True: 32.0k, False: 0]
  |  |  ------------------
  |  |  899|  32.0k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (899:13): [True: 20.9k, False: 11.1k]
  |  |  ------------------
  |  |  900|  20.9k|            /* This is a loop edge */                                             \
  |  |  901|  20.9k|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (901:17): [True: 20.9k, False: 0]
  |  |  ------------------
  |  |  902|  20.9k|                /* Filtering loop edges unconditionally */                        \
  |  |  903|  20.9k|                length -= n;                                                      \
  |  |  904|  20.9k|                continue;                                                         \
  |  |  905|  20.9k|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (905:24): [True: 0, False: 0]
  |  |  |  Branch (905:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  906|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  907|      0|                length -= n;                                                      \
  |  |  908|      0|                last_added = -1;                                                  \
  |  |  909|      0|                seen_loop = true;                                                 \
  |  |  910|      0|                continue;                                                         \
  |  |  911|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (911:24): [True: 0, False: 0]
  |  |  |  Branch (911:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  912|      0|                /* Filtering multi-loop edges */                                  \
  |  |  913|      0|                length -= n;                                                      \
  |  |  914|      0|                continue;                                                         \
  |  |  915|      0|            } else {                                                              \
  |  |  916|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (916:30): [True: 0, False: 0]
  |  |  |  Branch (916:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  917|      0|                last_added = vertex;                                              \
  |  |  918|      0|            }                                                                     \
  |  |  919|  20.9k|        } else {                                                                  \
  |  |  920|  11.1k|            /* Not a loop edge */                                                 \
  |  |  921|  11.1k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (921:17): [True: 0, False: 11.1k]
  |  |  |  Branch (921:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  922|      0|                /* Filtering multi-edges */                                       \
  |  |  923|      0|                length -= n;                                                      \
  |  |  924|      0|                continue;                                                         \
  |  |  925|  11.1k|            } else {                                                              \
  |  |  926|  11.1k|                last_added = vertex;                                              \
  |  |  927|  11.1k|            }                                                                     \
  |  |  928|  11.1k|        }                                                                         \
  |  |  929|  32.0k|    }
  ------------------
 1044|  11.1k|                VECTOR(*neis)[idx++] = n1;
  ------------------
  |  |   60|  11.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1045|  11.1k|                DEDUPLICATE_IF_NEEDED(n2, 1);
  ------------------
  |  |  898|  11.1k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (898:9): [True: 11.1k, False: 0]
  |  |  ------------------
  |  |  899|  11.1k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (899:13): [True: 0, False: 11.1k]
  |  |  ------------------
  |  |  900|      0|            /* This is a loop edge */                                             \
  |  |  901|      0|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (901:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|                /* Filtering loop edges unconditionally */                        \
  |  |  903|      0|                length -= n;                                                      \
  |  |  904|      0|                continue;                                                         \
  |  |  905|      0|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (905:24): [True: 0, False: 0]
  |  |  |  Branch (905:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  906|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  907|      0|                length -= n;                                                      \
  |  |  908|      0|                last_added = -1;                                                  \
  |  |  909|      0|                seen_loop = true;                                                 \
  |  |  910|      0|                continue;                                                         \
  |  |  911|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (911:24): [True: 0, False: 0]
  |  |  |  Branch (911:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  912|      0|                /* Filtering multi-loop edges */                                  \
  |  |  913|      0|                length -= n;                                                      \
  |  |  914|      0|                continue;                                                         \
  |  |  915|      0|            } else {                                                              \
  |  |  916|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (916:30): [True: 0, False: 0]
  |  |  |  Branch (916:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  917|      0|                last_added = vertex;                                              \
  |  |  918|      0|            }                                                                     \
  |  |  919|  11.1k|        } else {                                                                  \
  |  |  920|  11.1k|            /* Not a loop edge */                                                 \
  |  |  921|  11.1k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (921:17): [True: 0, False: 11.1k]
  |  |  |  Branch (921:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  922|      0|                /* Filtering multi-edges */                                       \
  |  |  923|      0|                length -= n;                                                      \
  |  |  924|      0|                continue;                                                         \
  |  |  925|  11.1k|            } else {                                                              \
  |  |  926|  11.1k|                last_added = vertex;                                              \
  |  |  927|  11.1k|            }                                                                     \
  |  |  928|  11.1k|        }                                                                         \
  |  |  929|  11.1k|    }
  ------------------
 1046|  11.1k|                VECTOR(*neis)[idx++] = n2;
  ------------------
  |  |   60|  11.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1047|  11.1k|            }
 1048|  77.9k|        }
 1049|       |
 1050|   488k|        while (i1 < j1) {
  ------------------
  |  Branch (1050:16): [True: 41.6k, False: 446k]
  ------------------
 1051|  41.6k|            eid1 = VECTOR(graph->oi)[i1++];
  ------------------
  |  |   60|  41.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1052|  41.6k|            igraph_int_t to = VECTOR(graph->to)[eid1];
  ------------------
  |  |   60|  41.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1053|  41.6k|            DEDUPLICATE_IF_NEEDED(to, 1);
  ------------------
  |  |  898|  41.6k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (898:9): [True: 41.6k, False: 0]
  |  |  ------------------
  |  |  899|  41.6k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (899:13): [True: 0, False: 41.6k]
  |  |  ------------------
  |  |  900|      0|            /* This is a loop edge */                                             \
  |  |  901|      0|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (901:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|                /* Filtering loop edges unconditionally */                        \
  |  |  903|      0|                length -= n;                                                      \
  |  |  904|      0|                continue;                                                         \
  |  |  905|      0|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (905:24): [True: 0, False: 0]
  |  |  |  Branch (905:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  906|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  907|      0|                length -= n;                                                      \
  |  |  908|      0|                last_added = -1;                                                  \
  |  |  909|      0|                seen_loop = true;                                                 \
  |  |  910|      0|                continue;                                                         \
  |  |  911|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (911:24): [True: 0, False: 0]
  |  |  |  Branch (911:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  912|      0|                /* Filtering multi-loop edges */                                  \
  |  |  913|      0|                length -= n;                                                      \
  |  |  914|      0|                continue;                                                         \
  |  |  915|      0|            } else {                                                              \
  |  |  916|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (916:30): [True: 0, False: 0]
  |  |  |  Branch (916:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  917|      0|                last_added = vertex;                                              \
  |  |  918|      0|            }                                                                     \
  |  |  919|  41.6k|        } else {                                                                  \
  |  |  920|  41.6k|            /* Not a loop edge */                                                 \
  |  |  921|  41.6k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (921:17): [True: 0, False: 41.6k]
  |  |  |  Branch (921:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  922|      0|                /* Filtering multi-edges */                                       \
  |  |  923|      0|                length -= n;                                                      \
  |  |  924|      0|                continue;                                                         \
  |  |  925|  41.6k|            } else {                                                              \
  |  |  926|  41.6k|                last_added = vertex;                                              \
  |  |  927|  41.6k|            }                                                                     \
  |  |  928|  41.6k|        }                                                                         \
  |  |  929|  41.6k|    }
  ------------------
 1054|  41.6k|            VECTOR(*neis)[idx++] = to;
  ------------------
  |  |   60|  41.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1055|  41.6k|        }
 1056|       |
 1057|   486k|        while (i2 < j2) {
  ------------------
  |  Branch (1057:16): [True: 40.3k, False: 446k]
  ------------------
 1058|  40.3k|            eid2 = VECTOR(graph->ii)[i2++];
  ------------------
  |  |   60|  40.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1059|  40.3k|            igraph_int_t from = VECTOR(graph->from)[eid2];
  ------------------
  |  |   60|  40.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1060|  40.3k|            DEDUPLICATE_IF_NEEDED(from, 1);
  ------------------
  |  |  898|  40.3k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (898:9): [True: 40.3k, False: 0]
  |  |  ------------------
  |  |  899|  40.3k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (899:13): [True: 0, False: 40.3k]
  |  |  ------------------
  |  |  900|      0|            /* This is a loop edge */                                             \
  |  |  901|      0|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (901:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|                /* Filtering loop edges unconditionally */                        \
  |  |  903|      0|                length -= n;                                                      \
  |  |  904|      0|                continue;                                                         \
  |  |  905|      0|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (905:24): [True: 0, False: 0]
  |  |  |  Branch (905:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  906|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  907|      0|                length -= n;                                                      \
  |  |  908|      0|                last_added = -1;                                                  \
  |  |  909|      0|                seen_loop = true;                                                 \
  |  |  910|      0|                continue;                                                         \
  |  |  911|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (911:24): [True: 0, False: 0]
  |  |  |  Branch (911:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  912|      0|                /* Filtering multi-loop edges */                                  \
  |  |  913|      0|                length -= n;                                                      \
  |  |  914|      0|                continue;                                                         \
  |  |  915|      0|            } else {                                                              \
  |  |  916|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (916:30): [True: 0, False: 0]
  |  |  |  Branch (916:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  917|      0|                last_added = vertex;                                              \
  |  |  918|      0|            }                                                                     \
  |  |  919|  40.3k|        } else {                                                                  \
  |  |  920|  40.3k|            /* Not a loop edge */                                                 \
  |  |  921|  40.3k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (921:17): [True: 0, False: 40.3k]
  |  |  |  Branch (921:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  922|      0|                /* Filtering multi-edges */                                       \
  |  |  923|      0|                length -= n;                                                      \
  |  |  924|      0|                continue;                                                         \
  |  |  925|  40.3k|            } else {                                                              \
  |  |  926|  40.3k|                last_added = vertex;                                              \
  |  |  927|  40.3k|            }                                                                     \
  |  |  928|  40.3k|        }                                                                         \
  |  |  929|  40.3k|    }
  ------------------
 1061|  40.3k|            VECTOR(*neis)[idx++] = from;
  ------------------
  |  |   60|  40.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1062|  40.3k|        }
 1063|       |
 1064|   446k|    }
 1065|  5.38M|    IGRAPH_CHECK(igraph_vector_int_resize(neis, length));
  ------------------
  |  |  656|  5.38M|    do { \
  |  |  657|  5.38M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.38M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.38M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.38M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  5.38M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.38M]
  |  |  ------------------
  ------------------
 1066|       |
 1067|  5.38M|    return IGRAPH_SUCCESS;
 1068|  5.38M|#undef DEDUPLICATE_IF_NEEDED
 1069|  5.38M|}
igraph_is_directed:
 1134|  22.6M|igraph_bool_t igraph_is_directed(const igraph_t *graph) {
 1135|  22.6M|    return graph->directed;
 1136|  22.6M|}
igraph_degree_1:
 1172|  6.00k|) {
 1173|  6.00k|    igraph_int_t loop_counter;
 1174|       |
 1175|  6.00k|    if (vid < 0 || vid >= igraph_vcount(graph)) {
  ------------------
  |  Branch (1175:9): [True: 0, False: 6.00k]
  |  Branch (1175:20): [True: 0, False: 6.00k]
  ------------------
 1176|      0|        IGRAPH_ERROR("Vertex ID out of range.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1177|      0|    }
 1178|       |
 1179|  6.00k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1179:9): [True: 0, False: 6.00k]
  ------------------
 1180|      0|        mode = IGRAPH_ALL;
 1181|      0|    }
 1182|       |
 1183|  6.00k|    if (loops != IGRAPH_NO_LOOPS && loops != IGRAPH_LOOPS_ONCE &&
  ------------------
  |  Branch (1183:9): [True: 2.00k, False: 4.00k]
  |  Branch (1183:37): [True: 2.00k, False: 0]
  ------------------
 1184|  2.00k|        loops != IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1184:9): [True: 0, False: 2.00k]
  ------------------
 1185|      0|        IGRAPH_ERROR("Invalid loops argument.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1186|      0|    }
 1187|       |
 1188|  6.00k|    if (loops == IGRAPH_LOOPS_ONCE && (mode & IGRAPH_ALL) != IGRAPH_ALL) {
  ------------------
  |  Branch (1188:9): [True: 0, False: 6.00k]
  |  Branch (1188:39): [True: 0, False: 0]
  ------------------
 1189|      0|        loops = IGRAPH_LOOPS_TWICE;
 1190|      0|    }
 1191|       |
 1192|  6.00k|    *deg = 0;
 1193|  6.00k|    if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1193:9): [True: 4.00k, False: 2.00k]
  ------------------
 1194|  4.00k|        *deg += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|  4.00k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      *deg += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|  4.00k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1195|  4.00k|    }
 1196|  6.00k|    if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1196:9): [True: 2.00k, False: 4.00k]
  ------------------
 1197|  2.00k|        *deg += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|  2.00k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      *deg += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|  2.00k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1198|  2.00k|    }
 1199|       |
 1200|  6.00k|    if (loops != IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1200:9): [True: 4.00k, False: 2.00k]
  ------------------
 1201|       |        /* When loops should not be counted, we remove their contribution from the
 1202|       |         * previously computed degree. */
 1203|  4.00k|        loop_counter = 0;
 1204|  4.00k|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1204:13): [True: 2.00k, False: 2.00k]
  ------------------
 1205|  17.3k|            for (igraph_int_t i = VECTOR(graph->os)[vid]; i < VECTOR(graph->os)[vid + 1]; i++) {
  ------------------
  |  |   60|  2.00k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          for (igraph_int_t i = VECTOR(graph->os)[vid]; i < VECTOR(graph->os)[vid + 1]; i++) {
  ------------------
  |  |   60|  17.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1205:59): [True: 15.3k, False: 2.00k]
  ------------------
 1206|  15.3k|                if (VECTOR(graph->to)[ VECTOR(graph->oi)[i] ] == vid) {
  ------------------
  |  |   60|  15.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (VECTOR(graph->to)[ VECTOR(graph->oi)[i] ] == vid) {
  ------------------
  |  |   60|  15.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1206:21): [True: 8.87k, False: 6.50k]
  ------------------
 1207|  8.87k|                    loop_counter++;
 1208|  8.87k|                }
 1209|  15.3k|            }
 1210|  2.00k|        }
 1211|  4.00k|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1211:13): [True: 2.00k, False: 2.00k]
  ------------------
 1212|  5.05k|            for (igraph_int_t i = VECTOR(graph->is)[vid]; i < VECTOR(graph->is)[vid + 1]; i++) {
  ------------------
  |  |   60|  2.00k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          for (igraph_int_t i = VECTOR(graph->is)[vid]; i < VECTOR(graph->is)[vid + 1]; i++) {
  ------------------
  |  |   60|  5.05k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1212:59): [True: 3.05k, False: 2.00k]
  ------------------
 1213|  3.05k|                if (VECTOR(graph->from)[ VECTOR(graph->ii)[i] ] == vid) {
  ------------------
  |  |   60|  3.05k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (VECTOR(graph->from)[ VECTOR(graph->ii)[i] ] == vid) {
  ------------------
  |  |   60|  3.05k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1213:21): [True: 0, False: 3.05k]
  ------------------
 1214|      0|                    loop_counter++;
 1215|      0|                }
 1216|  3.05k|            }
 1217|  2.00k|        }
 1218|       |
 1219|  4.00k|        if (loops == IGRAPH_NO_LOOPS || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1219:13): [True: 4.00k, False: 0]
  |  Branch (1219:41): [True: 0, False: 0]
  ------------------
 1220|  4.00k|            *deg -= loop_counter;
 1221|  4.00k|        } else {
 1222|       |            /* loops == IGRAPH_LOOPS_ONCE && mode == IGRAPH_ALL */
 1223|      0|            *deg -= loop_counter / 2;
 1224|      0|        }
 1225|  4.00k|    }
 1226|       |
 1227|  6.00k|    return IGRAPH_SUCCESS;
 1228|  6.00k|}
igraph_degree:
 1279|  41.3k|) {
 1280|       |
 1281|  41.3k|    igraph_int_t nodes_to_calc;
 1282|  41.3k|    igraph_int_t i, j;
 1283|  41.3k|    igraph_vit_t vit;
 1284|       |
 1285|  41.3k|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|  41.3k|    do { \
  |  |  657|  41.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  41.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  41.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 41.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  41.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 41.3k]
  |  |  ------------------
  ------------------
 1286|  41.3k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  41.3k|    do { \
  |  |  604|  41.3k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  41.3k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  41.3k|         * incorrect destructor function with the pointer */ \
  |  |  607|  41.3k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 41.3k]
  |  |  ------------------
  |  |  608|  41.3k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  41.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 41.3k]
  |  |  ------------------
  ------------------
 1287|       |
 1288|  41.3k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1288:9): [True: 20.5k, False: 20.8k]
  |  Branch (1288:31): [True: 2.25k, False: 18.2k]
  |  Branch (1288:52): [True: 0, False: 2.25k]
  ------------------
 1289|      0|        IGRAPH_ERROR("Invalid mode for degree calculation.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1290|      0|    }
 1291|       |
 1292|  41.3k|    if (loops == IGRAPH_NO_LOOPS || loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (1292:9): [True: 6.98k, False: 34.4k]
  |  Branch (1292:37): [True: 0, False: 34.4k]
  ------------------
 1293|       |        /* If the graph is known not to have loops, we can use the faster
 1294|       |         * loops == IGRAPH_LOOPS_TWICE code path, which has O(1) complexity
 1295|       |         * instead of of O(d). */
 1296|  6.98k|        if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (1296:13): [True: 6.98k, False: 0]
  ------------------
 1297|  6.98k|            !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (1297:13): [True: 4.82k, False: 2.15k]
  ------------------
 1298|  4.82k|            loops = IGRAPH_LOOPS_TWICE;
 1299|  4.82k|        }
 1300|  6.98k|    }
 1301|       |
 1302|       |    /* Must come before the mode != IGRAPH_ALL check below. */
 1303|  41.3k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1303:9): [True: 0, False: 41.3k]
  ------------------
 1304|      0|        mode = IGRAPH_ALL;
 1305|      0|    }
 1306|       |
 1307|  41.3k|    if (loops == IGRAPH_LOOPS_ONCE && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1307:9): [True: 0, False: 41.3k]
  |  Branch (1307:39): [True: 0, False: 0]
  ------------------
 1308|       |        /* We can use the faster loops == IGRAPH_LOOPS_TWICE path again */
 1309|      0|        loops = IGRAPH_LOOPS_TWICE;
 1310|      0|    }
 1311|       |
 1312|  41.3k|    nodes_to_calc = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|  41.3k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
 1313|       |
 1314|  41.3k|    IGRAPH_CHECK(igraph_vector_int_resize(res, nodes_to_calc));
  ------------------
  |  |  656|  41.3k|    do { \
  |  |  657|  41.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  41.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  41.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 41.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  41.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 41.3k]
  |  |  ------------------
  ------------------
 1315|  41.3k|    igraph_vector_int_null(res);
 1316|       |
 1317|  41.3k|    if (loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1317:9): [True: 39.2k, False: 2.15k]
  ------------------
 1318|  39.2k|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1318:13): [True: 21.6k, False: 17.6k]
  ------------------
 1319|  21.6k|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|  21.6k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1320|  3.59M|                 !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|  3.59M|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1320:18): [True: 3.57M, False: 21.6k]
  ------------------
 1321|  3.57M|                 IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|  3.57M|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1322|  3.57M|                igraph_int_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  3.57M|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 3.57M, False: 0]
  |  |  ------------------
  |  |  215|  3.57M|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1323|  3.57M|                VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|  3.57M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|  3.57M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|  3.57M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1324|  3.57M|            }
 1325|  21.6k|        }
 1326|  39.2k|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1326:13): [True: 19.0k, False: 20.1k]
  ------------------
 1327|  19.0k|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|  19.0k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1328|  3.17M|                 !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|  3.17M|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1328:18): [True: 3.15M, False: 19.0k]
  ------------------
 1329|  3.15M|                 IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|  3.15M|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1330|  3.15M|                igraph_int_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  3.15M|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 3.15M, False: 0]
  |  |  ------------------
  |  |  215|  3.15M|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1331|  3.15M|                VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|  3.15M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|  3.15M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|  3.15M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1332|  3.15M|            }
 1333|  19.0k|        }
 1334|  39.2k|    } else if (loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (1334:16): [True: 0, False: 2.15k]
  ------------------
 1335|      0|        IGRAPH_ASSERT((mode & IGRAPH_ALL) == IGRAPH_ALL);
  ------------------
  |  |  924|      0|    do { \
  |  |  925|      0|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1336|       |
 1337|       |        /* We arbitrarily count loop edges in the (mode & IGRAPH_OUT) branch but
 1338|       |         * not in the (mode & IGRAPH_IN) branch */
 1339|       |
 1340|      0|        if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (1340:13): [True: 0, False: 0]
  ------------------
 1341|       |            // When calculating degree for all vertices, iterating over edges is faster
 1342|      0|            igraph_int_t no_of_edges = igraph_ecount(graph);
 1343|       |
 1344|       |            /* mode & IGRAPH_OUT branch */
 1345|      0|            for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (1345:41): [True: 0, False: 0]
  ------------------
 1346|      0|                igraph_int_t from = IGRAPH_FROM(graph, edge);
  ------------------
  |  |  115|      0|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1347|      0|                VECTOR(*res)[from]++;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1348|      0|            }
 1349|       |
 1350|       |            /* mode & IGRAPH_IN branch */
 1351|      0|            for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (1351:41): [True: 0, False: 0]
  ------------------
 1352|      0|                igraph_int_t to = IGRAPH_TO(graph, edge);
  ------------------
  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1353|      0|                if (IGRAPH_FROM(graph, edge) != to) {
  ------------------
  |  |  115|      0|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1353:21): [True: 0, False: 0]
  ------------------
 1354|      0|                    VECTOR(*res)[to]++;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1355|      0|                }
 1356|      0|            }
 1357|      0|        } else {
 1358|       |            /* mode & IGRAPH_OUT branch */
 1359|      0|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1360|      0|                !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1360:17): [True: 0, False: 0]
  ------------------
 1361|      0|                IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1362|      0|                igraph_int_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|      0|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  215|      0|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1363|      0|                VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1364|      0|            }
 1365|       |
 1366|       |            /* mode & IGRAPH_IN branch */
 1367|      0|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1368|      0|                !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1368:17): [True: 0, False: 0]
  ------------------
 1369|      0|                IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1370|      0|                igraph_int_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|      0|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  215|      0|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1371|      0|                VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1372|      0|                for (j = VECTOR(graph->is)[vid];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1373|      0|                    j < VECTOR(graph->is)[vid + 1]; j++) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1373:21): [True: 0, False: 0]
  ------------------
 1374|      0|                    if (VECTOR(graph->from)[ VECTOR(graph->ii)[j] ] == vid) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  if (VECTOR(graph->from)[ VECTOR(graph->ii)[j] ] == vid) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1374:25): [True: 0, False: 0]
  ------------------
 1375|      0|                        VECTOR(*res)[i] -= 1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1376|      0|                    }
 1377|      0|                }
 1378|      0|            }
 1379|      0|        }
 1380|  2.15k|    } else {
 1381|       |        /* no loops should be counted */
 1382|  2.15k|        if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (1382:13): [True: 2.15k, False: 0]
  ------------------
 1383|       |            // When calculating degree for all vertices, iterating over edges is faster
 1384|  2.15k|            igraph_int_t no_of_edges = igraph_ecount(graph);
 1385|       |
 1386|  2.15k|            if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1386:17): [True: 1.47k, False: 675]
  ------------------
 1387|  69.1k|                for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (1387:45): [True: 67.7k, False: 1.47k]
  ------------------
 1388|  67.7k|                    igraph_int_t from = IGRAPH_FROM(graph, edge);
  ------------------
  |  |  115|  67.7k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  67.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1389|  67.7k|                    if (from != IGRAPH_TO(graph, edge)) {
  ------------------
  |  |  128|  67.7k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  67.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1389:25): [True: 37.5k, False: 30.1k]
  ------------------
 1390|  37.5k|                        VECTOR(*res)[from]++;
  ------------------
  |  |   60|  37.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1391|  37.5k|                    }
 1392|  67.7k|                }
 1393|  1.47k|            }
 1394|  2.15k|            if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1394:17): [True: 1.47k, False: 675]
  ------------------
 1395|  69.1k|                for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (1395:45): [True: 67.7k, False: 1.47k]
  ------------------
 1396|  67.7k|                    igraph_int_t to = IGRAPH_TO(graph, edge);
  ------------------
  |  |  128|  67.7k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  67.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1397|  67.7k|                    if (IGRAPH_FROM(graph, edge) != to) {
  ------------------
  |  |  115|  67.7k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  67.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1397:25): [True: 37.5k, False: 30.1k]
  ------------------
 1398|  37.5k|                        VECTOR(*res)[to]++;
  ------------------
  |  |   60|  37.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1399|  37.5k|                    }
 1400|  67.7k|                }
 1401|  1.47k|            }
 1402|  2.15k|        } else {
 1403|      0|            if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1403:17): [True: 0, False: 0]
  ------------------
 1404|      0|                for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1405|      0|                    !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1405:21): [True: 0, False: 0]
  ------------------
 1406|      0|                    IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1407|      0|                    igraph_int_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|      0|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  215|      0|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1408|      0|                    VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1409|      0|                    for (j = VECTOR(graph->os)[vid];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1410|      0|                        j < VECTOR(graph->os)[vid + 1]; j++) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1410:25): [True: 0, False: 0]
  ------------------
 1411|      0|                        if (VECTOR(graph->to)[ VECTOR(graph->oi)[j] ] == vid) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      if (VECTOR(graph->to)[ VECTOR(graph->oi)[j] ] == vid) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1411:29): [True: 0, False: 0]
  ------------------
 1412|      0|                            VECTOR(*res)[i] -= 1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1413|      0|                        }
 1414|      0|                    }
 1415|      0|                }
 1416|      0|            }
 1417|      0|            if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1417:17): [True: 0, False: 0]
  ------------------
 1418|      0|                for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1419|      0|                    !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1419:21): [True: 0, False: 0]
  ------------------
 1420|      0|                    IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1421|      0|                    igraph_int_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|      0|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  215|      0|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1422|      0|                    VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1423|      0|                    for (j = VECTOR(graph->is)[vid];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1424|      0|                        j < VECTOR(graph->is)[vid + 1]; j++) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1424:25): [True: 0, False: 0]
  ------------------
 1425|      0|                        if (VECTOR(graph->from)[ VECTOR(graph->ii)[j] ] == vid) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      if (VECTOR(graph->from)[ VECTOR(graph->ii)[j] ] == vid) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1425:29): [True: 0, False: 0]
  ------------------
 1426|      0|                            VECTOR(*res)[i] -= 1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1427|      0|                        }
 1428|      0|                    }
 1429|      0|                }
 1430|      0|            }
 1431|      0|        }
 1432|  2.15k|    }
 1433|       |
 1434|  41.3k|    igraph_vit_destroy(&vit);
 1435|  41.3k|    IGRAPH_FINALLY_CLEAN(1);
 1436|       |
 1437|  41.3k|    return IGRAPH_SUCCESS;
 1438|  41.3k|}
igraph_get_eid:
 1537|  3.08k|                   igraph_bool_t directed, igraph_bool_t error) {
 1538|       |
 1539|  3.08k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
 1540|       |
 1541|  3.08k|    if (from < 0 || to < 0 || from >= no_of_nodes || to >= no_of_nodes) {
  ------------------
  |  Branch (1541:9): [True: 0, False: 3.08k]
  |  Branch (1541:21): [True: 0, False: 3.08k]
  |  Branch (1541:31): [True: 0, False: 3.08k]
  |  Branch (1541:54): [True: 0, False: 3.08k]
  ------------------
 1542|      0|        IGRAPH_ERROR("Cannot get edge ID.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1543|      0|    }
 1544|       |
 1545|  3.08k|    *eid = -1;
 1546|  3.08k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (1546:9): [True: 3.08k, False: 0]
  ------------------
 1547|       |
 1548|       |        /* Directed graph */
 1549|  3.08k|        FIND_DIRECTED_EDGE(graph, from, to, eid);
  ------------------
  |  | 1482|  3.08k|    do { \
  |  | 1483|  3.08k|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   60|  3.08k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1484|  3.08k|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   60|  3.08k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1485|  3.08k|        igraph_int_t N = end; \
  |  | 1486|  3.08k|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   60|  3.08k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1487|  3.08k|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   60|  3.08k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1488|  3.08k|        igraph_int_t N2 = end2; \
  |  | 1489|  3.08k|        igraph_int_t *nullpointer = NULL; \
  |  | 1490|  3.08k|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1490:13): [True: 373, False: 2.71k]
  |  |  ------------------
  |  | 1491|    373|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1462|    373|    do { \
  |  |  |  | 1463|    801|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:16): [True: 428, False: 373]
  |  |  |  |  ------------------
  |  |  |  | 1464|    428|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1465|    428|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    428|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1466|    428|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    428|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:17): [True: 169, False: 259]
  |  |  |  |  ------------------
  |  |  |  | 1467|    169|                (start) = mid+1; \
  |  |  |  | 1468|    259|            } else { \
  |  |  |  | 1469|    259|                (end) = mid; \
  |  |  |  | 1470|    259|            } \
  |  |  |  | 1471|    428|        } \
  |  |  |  | 1472|    373|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1472:13): [True: 230, False: 143]
  |  |  |  |  ------------------
  |  |  |  | 1473|    230|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    230|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1474|    230|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    230|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1474:17): [True: 48, False: 182]
  |  |  |  |  ------------------
  |  |  |  | 1475|     48|                *(result) = e; \
  |  |  |  | 1476|     48|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1476:21): [True: 0, False: 48]
  |  |  |  |  ------------------
  |  |  |  | 1477|     48|            } \
  |  |  |  | 1478|    230|        } \
  |  |  |  | 1479|    373|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1479:14): [Folded, False: 373]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1492|  2.71k|        } else { \
  |  | 1493|  2.71k|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1462|  2.71k|    do { \
  |  |  |  | 1463|  5.56k|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:16): [True: 2.85k, False: 2.71k]
  |  |  |  |  ------------------
  |  |  |  | 1464|  2.85k|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1465|  2.85k|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  2.85k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1466|  2.85k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  2.85k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:17): [True: 1.31k, False: 1.54k]
  |  |  |  |  ------------------
  |  |  |  | 1467|  1.31k|                (start) = mid+1; \
  |  |  |  | 1468|  1.54k|            } else { \
  |  |  |  | 1469|  1.54k|                (end) = mid; \
  |  |  |  | 1470|  1.54k|            } \
  |  |  |  | 1471|  2.85k|        } \
  |  |  |  | 1472|  2.71k|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1472:13): [True: 1.43k, False: 1.27k]
  |  |  |  |  ------------------
  |  |  |  | 1473|  1.43k|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.43k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1474|  1.43k|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.43k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1474:17): [True: 94, False: 1.33k]
  |  |  |  |  ------------------
  |  |  |  | 1475|     94|                *(result) = e; \
  |  |  |  | 1476|     94|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1476:21): [True: 0, False: 94]
  |  |  |  |  ------------------
  |  |  |  | 1477|     94|            } \
  |  |  |  | 1478|  1.43k|        } \
  |  |  |  | 1479|  2.71k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1479:14): [Folded, False: 2.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1494|  2.71k|        } \
  |  | 1495|  3.08k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1495:14): [Folded, False: 3.08k]
  |  |  ------------------
  ------------------
 1550|  3.08k|        if (!directed && *eid < 0) {
  ------------------
  |  Branch (1550:13): [True: 0, False: 3.08k]
  |  Branch (1550:26): [True: 0, False: 0]
  ------------------
 1551|      0|            FIND_DIRECTED_EDGE(graph, to, from, eid);
  ------------------
  |  | 1482|      0|    do { \
  |  | 1483|      0|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1484|      0|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1485|      0|        igraph_int_t N = end; \
  |  | 1486|      0|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1487|      0|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1488|      0|        igraph_int_t N2 = end2; \
  |  | 1489|      0|        igraph_int_t *nullpointer = NULL; \
  |  | 1490|      0|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1490:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1491|      0|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1462|      0|    do { \
  |  |  |  | 1463|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1464|      0|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1465|      0|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1466|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1467|      0|                (start) = mid+1; \
  |  |  |  | 1468|      0|            } else { \
  |  |  |  | 1469|      0|                (end) = mid; \
  |  |  |  | 1470|      0|            } \
  |  |  |  | 1471|      0|        } \
  |  |  |  | 1472|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1472:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1473|      0|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1474|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1474:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1475|      0|                *(result) = e; \
  |  |  |  | 1476|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1476:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1477|      0|            } \
  |  |  |  | 1478|      0|        } \
  |  |  |  | 1479|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1479:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1492|      0|        } else { \
  |  | 1493|      0|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1462|      0|    do { \
  |  |  |  | 1463|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1464|      0|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1465|      0|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1466|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1467|      0|                (start) = mid+1; \
  |  |  |  | 1468|      0|            } else { \
  |  |  |  | 1469|      0|                (end) = mid; \
  |  |  |  | 1470|      0|            } \
  |  |  |  | 1471|      0|        } \
  |  |  |  | 1472|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1472:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1473|      0|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1474|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1474:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1475|      0|                *(result) = e; \
  |  |  |  | 1476|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1476:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1477|      0|            } \
  |  |  |  | 1478|      0|        } \
  |  |  |  | 1479|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1479:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1494|      0|        } \
  |  | 1495|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1495:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1552|      0|        }
 1553|       |
 1554|  3.08k|    } else {
 1555|       |
 1556|       |        /* Undirected graph, they only have one mode */
 1557|      0|        FIND_UNDIRECTED_EDGE(graph, from, to, eid);
  ------------------
  |  | 1498|      0|    do { \
  |  | 1499|      0|        igraph_int_t xfrom1 = from > to ? from : to; \
  |  |  ------------------
  |  |  |  Branch (1499:31): [True: 0, False: 0]
  |  |  ------------------
  |  | 1500|      0|        igraph_int_t xto1 = from > to ? to : from; \
  |  |  ------------------
  |  |  |  Branch (1500:29): [True: 0, False: 0]
  |  |  ------------------
  |  | 1501|      0|        FIND_DIRECTED_EDGE(graph, xfrom1, xto1, eid); \
  |  |  ------------------
  |  |  |  | 1482|      0|    do { \
  |  |  |  | 1483|      0|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1484|      0|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1485|      0|        igraph_int_t N = end; \
  |  |  |  | 1486|      0|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1487|      0|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1488|      0|        igraph_int_t N2 = end2; \
  |  |  |  | 1489|      0|        igraph_int_t *nullpointer = NULL; \
  |  |  |  | 1490|      0|        if (end-start < end2-start2) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1490:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1491|      0|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, eid, nullpointer); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1462|      0|    do { \
  |  |  |  |  |  | 1463|      0|        while ((start) < (end)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1463:16): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1464|      0|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  |  |  | 1465|      0|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1466|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1466:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1467|      0|                (start) = mid+1; \
  |  |  |  |  |  | 1468|      0|            } else { \
  |  |  |  |  |  | 1469|      0|                (end) = mid; \
  |  |  |  |  |  | 1470|      0|            } \
  |  |  |  |  |  | 1471|      0|        } \
  |  |  |  |  |  | 1472|      0|        if ((start) < (N)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1472:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1473|      0|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1474|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1474:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1475|      0|                *(result) = e; \
  |  |  |  |  |  | 1476|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1476:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1477|      0|            } \
  |  |  |  |  |  | 1478|      0|        } \
  |  |  |  |  |  | 1479|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1479:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1492|      0|        } else { \
  |  |  |  | 1493|      0|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, eid, nullpointer); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1462|      0|    do { \
  |  |  |  |  |  | 1463|      0|        while ((start) < (end)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1463:16): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1464|      0|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  |  |  | 1465|      0|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1466|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1466:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1467|      0|                (start) = mid+1; \
  |  |  |  |  |  | 1468|      0|            } else { \
  |  |  |  |  |  | 1469|      0|                (end) = mid; \
  |  |  |  |  |  | 1470|      0|            } \
  |  |  |  |  |  | 1471|      0|        } \
  |  |  |  |  |  | 1472|      0|        if ((start) < (N)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1472:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1473|      0|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1474|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1474:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1475|      0|                *(result) = e; \
  |  |  |  |  |  | 1476|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1476:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1477|      0|            } \
  |  |  |  |  |  | 1478|      0|        } \
  |  |  |  |  |  | 1479|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1479:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1494|      0|        } \
  |  |  |  | 1495|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1495:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1502|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1502:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1558|       |
 1559|      0|    }
 1560|       |
 1561|  3.08k|    if (*eid < 0) {
  ------------------
  |  Branch (1561:9): [True: 2.94k, False: 142]
  ------------------
 1562|  2.94k|        if (error) {
  ------------------
  |  Branch (1562:13): [True: 0, False: 2.94k]
  ------------------
 1563|      0|            IGRAPH_ERROR("Cannot get edge ID, no such edge.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1564|      0|        }
 1565|  2.94k|    }
 1566|       |
 1567|  3.08k|    return IGRAPH_SUCCESS;
 1568|  3.08k|}
igraph_get_eids:
 1615|  1.97k|                    igraph_bool_t directed, igraph_bool_t error) {
 1616|       |
 1617|  1.97k|    igraph_int_t n = pairs ? igraph_vector_int_size(pairs) : 0;
  ------------------
  |  Branch (1617:22): [True: 1.97k, False: 0]
  ------------------
 1618|  1.97k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
 1619|  1.97k|    igraph_int_t i;
 1620|  1.97k|    igraph_int_t eid = -1;
 1621|       |
 1622|  1.97k|    if (n == 0) {
  ------------------
  |  Branch (1622:9): [True: 0, False: 1.97k]
  ------------------
 1623|      0|        igraph_vector_int_clear(eids);
 1624|      0|        return IGRAPH_SUCCESS;
 1625|      0|    }
 1626|       |
 1627|  1.97k|    if (n % 2 != 0) {
  ------------------
  |  Branch (1627:9): [True: 0, False: 1.97k]
  ------------------
 1628|      0|        IGRAPH_ERROR("Cannot get edge IDs, invalid length of vertex pair vector.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1629|      0|                     IGRAPH_EINVAL);
 1630|      0|    }
 1631|       |
 1632|  1.97k|    if (!igraph_vector_int_isininterval(pairs, 0, no_of_nodes - 1)) {
  ------------------
  |  Branch (1632:9): [True: 0, False: 1.97k]
  ------------------
 1633|      0|        IGRAPH_ERROR("Cannot get edge IDs, invalid vertex ID.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1634|      0|    }
 1635|       |
 1636|  1.97k|    IGRAPH_CHECK(igraph_vector_int_resize(eids, n / 2));
  ------------------
  |  |  656|  1.97k|    do { \
  |  |  657|  1.97k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.97k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.97k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.97k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.97k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.97k]
  |  |  ------------------
  ------------------
 1637|       |
 1638|  1.97k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (1638:9): [True: 1.97k, False: 0]
  ------------------
 1639|  81.5k|        for (i = 0; i < n / 2; i++) {
  ------------------
  |  Branch (1639:21): [True: 79.6k, False: 1.97k]
  ------------------
 1640|  79.6k|            igraph_int_t from = VECTOR(*pairs)[2 * i];
  ------------------
  |  |   60|  79.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1641|  79.6k|            igraph_int_t to = VECTOR(*pairs)[2 * i + 1];
  ------------------
  |  |   60|  79.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1642|       |
 1643|  79.6k|            eid = -1;
 1644|  79.6k|            FIND_DIRECTED_EDGE(graph, from, to, &eid);
  ------------------
  |  | 1482|  79.6k|    do { \
  |  | 1483|  79.6k|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   60|  79.6k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1484|  79.6k|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   60|  79.6k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1485|  79.6k|        igraph_int_t N = end; \
  |  | 1486|  79.6k|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   60|  79.6k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1487|  79.6k|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   60|  79.6k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1488|  79.6k|        igraph_int_t N2 = end2; \
  |  | 1489|  79.6k|        igraph_int_t *nullpointer = NULL; \
  |  | 1490|  79.6k|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1490:13): [True: 23.6k, False: 55.9k]
  |  |  ------------------
  |  | 1491|  23.6k|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1462|  23.6k|    do { \
  |  |  |  | 1463|  88.3k|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:16): [True: 64.7k, False: 23.6k]
  |  |  |  |  ------------------
  |  |  |  | 1464|  64.7k|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1465|  64.7k|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  64.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1466|  64.7k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  64.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:17): [True: 1.56k, False: 63.1k]
  |  |  |  |  ------------------
  |  |  |  | 1467|  1.56k|                (start) = mid+1; \
  |  |  |  | 1468|  63.1k|            } else { \
  |  |  |  | 1469|  63.1k|                (end) = mid; \
  |  |  |  | 1470|  63.1k|            } \
  |  |  |  | 1471|  64.7k|        } \
  |  |  |  | 1472|  23.6k|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1472:13): [True: 22.8k, False: 817]
  |  |  |  |  ------------------
  |  |  |  | 1473|  22.8k|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  22.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1474|  22.8k|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  22.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1474:17): [True: 22.6k, False: 185]
  |  |  |  |  ------------------
  |  |  |  | 1475|  22.6k|                *(result) = e; \
  |  |  |  | 1476|  22.6k|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1476:21): [True: 0, False: 22.6k]
  |  |  |  |  ------------------
  |  |  |  | 1477|  22.6k|            } \
  |  |  |  | 1478|  22.8k|        } \
  |  |  |  | 1479|  23.6k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1479:14): [Folded, False: 23.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1492|  55.9k|        } else { \
  |  | 1493|  55.9k|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1462|  55.9k|    do { \
  |  |  |  | 1463|   191k|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:16): [True: 135k, False: 55.9k]
  |  |  |  |  ------------------
  |  |  |  | 1464|   135k|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1465|   135k|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   135k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1466|   135k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   135k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:17): [True: 4.93k, False: 130k]
  |  |  |  |  ------------------
  |  |  |  | 1467|  4.93k|                (start) = mid+1; \
  |  |  |  | 1468|   130k|            } else { \
  |  |  |  | 1469|   130k|                (end) = mid; \
  |  |  |  | 1470|   130k|            } \
  |  |  |  | 1471|   135k|        } \
  |  |  |  | 1472|  55.9k|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1472:13): [True: 52.4k, False: 3.50k]
  |  |  |  |  ------------------
  |  |  |  | 1473|  52.4k|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  52.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1474|  52.4k|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  52.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1474:17): [True: 51.8k, False: 608]
  |  |  |  |  ------------------
  |  |  |  | 1475|  51.8k|                *(result) = e; \
  |  |  |  | 1476|  51.8k|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1476:21): [True: 0, False: 51.8k]
  |  |  |  |  ------------------
  |  |  |  | 1477|  51.8k|            } \
  |  |  |  | 1478|  52.4k|        } \
  |  |  |  | 1479|  55.9k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1479:14): [Folded, False: 55.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1494|  55.9k|        } \
  |  | 1495|  79.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1495:14): [Folded, False: 79.6k]
  |  |  ------------------
  ------------------
 1645|  79.6k|            if (!directed && eid < 0) {
  ------------------
  |  Branch (1645:17): [True: 0, False: 79.6k]
  |  Branch (1645:30): [True: 0, False: 0]
  ------------------
 1646|      0|                FIND_DIRECTED_EDGE(graph, to, from, &eid);
  ------------------
  |  | 1482|      0|    do { \
  |  | 1483|      0|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1484|      0|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1485|      0|        igraph_int_t N = end; \
  |  | 1486|      0|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1487|      0|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1488|      0|        igraph_int_t N2 = end2; \
  |  | 1489|      0|        igraph_int_t *nullpointer = NULL; \
  |  | 1490|      0|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1490:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1491|      0|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1462|      0|    do { \
  |  |  |  | 1463|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1464|      0|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1465|      0|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1466|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1467|      0|                (start) = mid+1; \
  |  |  |  | 1468|      0|            } else { \
  |  |  |  | 1469|      0|                (end) = mid; \
  |  |  |  | 1470|      0|            } \
  |  |  |  | 1471|      0|        } \
  |  |  |  | 1472|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1472:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1473|      0|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1474|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1474:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1475|      0|                *(result) = e; \
  |  |  |  | 1476|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1476:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1477|      0|            } \
  |  |  |  | 1478|      0|        } \
  |  |  |  | 1479|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1479:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1492|      0|        } else { \
  |  | 1493|      0|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1462|      0|    do { \
  |  |  |  | 1463|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1464|      0|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1465|      0|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1466|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1467|      0|                (start) = mid+1; \
  |  |  |  | 1468|      0|            } else { \
  |  |  |  | 1469|      0|                (end) = mid; \
  |  |  |  | 1470|      0|            } \
  |  |  |  | 1471|      0|        } \
  |  |  |  | 1472|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1472:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1473|      0|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1474|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1474:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1475|      0|                *(result) = e; \
  |  |  |  | 1476|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1476:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1477|      0|            } \
  |  |  |  | 1478|      0|        } \
  |  |  |  | 1479|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1479:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1494|      0|        } \
  |  | 1495|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1495:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1647|      0|            }
 1648|       |
 1649|  79.6k|            VECTOR(*eids)[i] = eid;
  ------------------
  |  |   60|  79.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1650|  79.6k|            if (eid < 0 && error) {
  ------------------
  |  Branch (1650:17): [True: 5.11k, False: 74.4k]
  |  Branch (1650:28): [True: 0, False: 5.11k]
  ------------------
 1651|      0|                IGRAPH_ERROR("Cannot get edge ID, no such edge.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1652|      0|            }
 1653|  79.6k|        }
 1654|  1.97k|    } else {
 1655|      0|        for (i = 0; i < n / 2; i++) {
  ------------------
  |  Branch (1655:21): [True: 0, False: 0]
  ------------------
 1656|      0|            igraph_int_t from = VECTOR(*pairs)[2 * i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1657|      0|            igraph_int_t to = VECTOR(*pairs)[2 * i + 1];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1658|       |
 1659|      0|            eid = -1;
 1660|      0|            FIND_UNDIRECTED_EDGE(graph, from, to, &eid);
  ------------------
  |  | 1498|      0|    do { \
  |  | 1499|      0|        igraph_int_t xfrom1 = from > to ? from : to; \
  |  |  ------------------
  |  |  |  Branch (1499:31): [True: 0, False: 0]
  |  |  ------------------
  |  | 1500|      0|        igraph_int_t xto1 = from > to ? to : from; \
  |  |  ------------------
  |  |  |  Branch (1500:29): [True: 0, False: 0]
  |  |  ------------------
  |  | 1501|      0|        FIND_DIRECTED_EDGE(graph, xfrom1, xto1, eid); \
  |  |  ------------------
  |  |  |  | 1482|      0|    do { \
  |  |  |  | 1483|      0|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1484|      0|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1485|      0|        igraph_int_t N = end; \
  |  |  |  | 1486|      0|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1487|      0|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1488|      0|        igraph_int_t N2 = end2; \
  |  |  |  | 1489|      0|        igraph_int_t *nullpointer = NULL; \
  |  |  |  | 1490|      0|        if (end-start < end2-start2) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1490:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1491|      0|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, eid, nullpointer); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1462|      0|    do { \
  |  |  |  |  |  | 1463|      0|        while ((start) < (end)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1463:16): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1464|      0|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  |  |  | 1465|      0|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1466|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1466:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1467|      0|                (start) = mid+1; \
  |  |  |  |  |  | 1468|      0|            } else { \
  |  |  |  |  |  | 1469|      0|                (end) = mid; \
  |  |  |  |  |  | 1470|      0|            } \
  |  |  |  |  |  | 1471|      0|        } \
  |  |  |  |  |  | 1472|      0|        if ((start) < (N)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1472:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1473|      0|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1474|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1474:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1475|      0|                *(result) = e; \
  |  |  |  |  |  | 1476|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1476:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1477|      0|            } \
  |  |  |  |  |  | 1478|      0|        } \
  |  |  |  |  |  | 1479|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1479:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1492|      0|        } else { \
  |  |  |  | 1493|      0|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, eid, nullpointer); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1462|      0|    do { \
  |  |  |  |  |  | 1463|      0|        while ((start) < (end)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1463:16): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1464|      0|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  |  |  | 1465|      0|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1466|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1466:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1467|      0|                (start) = mid+1; \
  |  |  |  |  |  | 1468|      0|            } else { \
  |  |  |  |  |  | 1469|      0|                (end) = mid; \
  |  |  |  |  |  | 1470|      0|            } \
  |  |  |  |  |  | 1471|      0|        } \
  |  |  |  |  |  | 1472|      0|        if ((start) < (N)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1472:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1473|      0|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1474|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1474:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1475|      0|                *(result) = e; \
  |  |  |  |  |  | 1476|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1476:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1477|      0|            } \
  |  |  |  |  |  | 1478|      0|        } \
  |  |  |  |  |  | 1479|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1479:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1494|      0|        } \
  |  |  |  | 1495|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1495:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1502|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1502:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1661|      0|            VECTOR(*eids)[i] = eid;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1662|      0|            if (eid < 0 && error) {
  ------------------
  |  Branch (1662:17): [True: 0, False: 0]
  |  Branch (1662:28): [True: 0, False: 0]
  ------------------
 1663|      0|                IGRAPH_ERROR("Cannot get edge ID, no such edge.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1664|      0|            }
 1665|      0|        }
 1666|      0|    }
 1667|       |
 1668|  1.97k|    return IGRAPH_SUCCESS;
 1669|  1.97k|}
igraph_get_all_eids_between:
 1731|  5.93k|) {
 1732|  5.93k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
 1733|       |
 1734|  5.93k|    if (source < 0 || source >= no_of_nodes) {
  ------------------
  |  Branch (1734:9): [True: 0, False: 5.93k]
  |  Branch (1734:23): [True: 0, False: 5.93k]
  ------------------
 1735|      0|        IGRAPH_ERROR("Cannot get edge IDs, invalid source vertex ID.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1736|      0|    }
 1737|       |
 1738|  5.93k|    if (target < 0 || target >= no_of_nodes) {
  ------------------
  |  Branch (1738:9): [True: 0, False: 5.93k]
  |  Branch (1738:23): [True: 0, False: 5.93k]
  ------------------
 1739|      0|        IGRAPH_ERROR("Cannot get edge IDs, invalid target vertex ID.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1740|      0|    }
 1741|       |
 1742|  5.93k|    igraph_vector_int_clear(eids);
 1743|       |
 1744|  5.93k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (1744:9): [True: 5.93k, False: 0]
  ------------------
 1745|       |        /* look in the specified direction first */
 1746|  5.93k|        FIND_ALL_DIRECTED_EDGES(graph, source, target, eids);
  ------------------
  |  | 1675|  5.93k|    do { \
  |  | 1676|  5.93k|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   60|  5.93k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1677|  5.93k|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   60|  5.93k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1678|  5.93k|        igraph_int_t N = end; \
  |  | 1679|  5.93k|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   60|  5.93k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1680|  5.93k|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   60|  5.93k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1681|  5.93k|        igraph_int_t N2 = end2; \
  |  | 1682|  5.93k|        igraph_int_t eid = -1; \
  |  | 1683|  5.93k|        igraph_int_t pos = -1; \
  |  | 1684|  5.93k|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1684:13): [True: 1.46k, False: 4.47k]
  |  |  ------------------
  |  | 1685|  1.46k|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, &eid, &pos); \
  |  |  ------------------
  |  |  |  | 1462|  1.46k|    do { \
  |  |  |  | 1463|  2.77k|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:16): [True: 1.31k, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  | 1464|  1.31k|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1465|  1.31k|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.31k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1466|  1.31k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.31k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:17): [True: 41, False: 1.27k]
  |  |  |  |  ------------------
  |  |  |  | 1467|     41|                (start) = mid+1; \
  |  |  |  | 1468|  1.27k|            } else { \
  |  |  |  | 1469|  1.27k|                (end) = mid; \
  |  |  |  | 1470|  1.27k|            } \
  |  |  |  | 1471|  1.31k|        } \
  |  |  |  | 1472|  1.46k|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1472:13): [True: 632, False: 829]
  |  |  |  |  ------------------
  |  |  |  | 1473|    632|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    632|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1474|    632|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    632|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1474:17): [True: 377, False: 255]
  |  |  |  |  ------------------
  |  |  |  | 1475|    377|                *(result) = e; \
  |  |  |  | 1476|    377|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1476:21): [True: 377, Folded]
  |  |  |  |  ------------------
  |  |  |  | 1477|    377|            } \
  |  |  |  | 1478|    632|        } \
  |  |  |  | 1479|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1479:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1686|  6.60k|            while (pos >= 0 && pos < N) { \
  |  |  ------------------
  |  |  |  Branch (1686:20): [True: 5.52k, False: 1.08k]
  |  |  |  Branch (1686:32): [True: 5.25k, False: 267]
  |  |  ------------------
  |  | 1687|  5.25k|                eid = VECTOR(graph->oi)[pos++]; \
  |  |  ------------------
  |  |  |  |   60|  5.25k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1688|  5.25k|                if (VECTOR(graph->to)[eid] != xto) { break; } \
  |  |  ------------------
  |  |  |  |   60|  5.25k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  |  Branch (1688:21): [True: 110, False: 5.14k]
  |  |  ------------------
  |  | 1689|  5.25k|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  ------------------
  |  |  |  |  656|  5.14k|    do { \
  |  |  |  |  657|  5.14k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  5.14k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  5.14k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.14k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  5.14k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 5.14k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1690|  5.14k|            } \
  |  | 1691|  4.47k|        } else { \
  |  | 1692|  4.47k|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, &eid, &pos); \
  |  |  ------------------
  |  |  |  | 1462|  4.47k|    do { \
  |  |  |  | 1463|  7.34k|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:16): [True: 2.87k, False: 4.47k]
  |  |  |  |  ------------------
  |  |  |  | 1464|  2.87k|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1465|  2.87k|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  2.87k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1466|  2.87k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  2.87k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:17): [True: 104, False: 2.76k]
  |  |  |  |  ------------------
  |  |  |  | 1467|    104|                (start) = mid+1; \
  |  |  |  | 1468|  2.76k|            } else { \
  |  |  |  | 1469|  2.76k|                (end) = mid; \
  |  |  |  | 1470|  2.76k|            } \
  |  |  |  | 1471|  2.87k|        } \
  |  |  |  | 1472|  4.47k|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1472:13): [True: 1.51k, False: 2.96k]
  |  |  |  |  ------------------
  |  |  |  | 1473|  1.51k|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.51k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1474|  1.51k|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.51k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1474:17): [True: 715, False: 796]
  |  |  |  |  ------------------
  |  |  |  | 1475|    715|                *(result) = e; \
  |  |  |  | 1476|    715|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1476:21): [True: 715, Folded]
  |  |  |  |  ------------------
  |  |  |  | 1477|    715|            } \
  |  |  |  | 1478|  1.51k|        } \
  |  |  |  | 1479|  4.47k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1479:14): [Folded, False: 4.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1693|  12.2k|            while (pos >= 0 && pos < N2) { \
  |  |  ------------------
  |  |  |  Branch (1693:20): [True: 8.51k, False: 3.76k]
  |  |  |  Branch (1693:32): [True: 8.04k, False: 470]
  |  |  ------------------
  |  | 1694|  8.04k|                eid = VECTOR(graph->ii)[pos++]; \
  |  |  ------------------
  |  |  |  |   60|  8.04k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1695|  8.04k|                if (VECTOR(graph->from)[eid] != xfrom) { break; } \
  |  |  ------------------
  |  |  |  |   60|  8.04k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  |  Branch (1695:21): [True: 245, False: 7.80k]
  |  |  ------------------
  |  | 1696|  8.04k|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  ------------------
  |  |  |  |  656|  7.80k|    do { \
  |  |  |  |  657|  7.80k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  7.80k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  7.80k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.80k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  7.80k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 7.80k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1697|  7.80k|            } \
  |  | 1698|  4.47k|        } \
  |  | 1699|  5.93k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1699:14): [Folded, False: 5.93k]
  |  |  ------------------
  ------------------
 1747|  5.93k|        if (!directed) {
  ------------------
  |  Branch (1747:13): [True: 3.95k, False: 1.97k]
  ------------------
 1748|       |            /* look in the reverse direction as well */
 1749|  3.95k|            FIND_ALL_DIRECTED_EDGES(graph, target, source, eids);
  ------------------
  |  | 1675|  3.95k|    do { \
  |  | 1676|  3.95k|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   60|  3.95k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1677|  3.95k|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   60|  3.95k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1678|  3.95k|        igraph_int_t N = end; \
  |  | 1679|  3.95k|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   60|  3.95k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1680|  3.95k|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   60|  3.95k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1681|  3.95k|        igraph_int_t N2 = end2; \
  |  | 1682|  3.95k|        igraph_int_t eid = -1; \
  |  | 1683|  3.95k|        igraph_int_t pos = -1; \
  |  | 1684|  3.95k|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1684:13): [True: 669, False: 3.28k]
  |  |  ------------------
  |  | 1685|    669|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, &eid, &pos); \
  |  |  ------------------
  |  |  |  | 1462|    669|    do { \
  |  |  |  | 1463|  1.50k|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:16): [True: 835, False: 669]
  |  |  |  |  ------------------
  |  |  |  | 1464|    835|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1465|    835|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    835|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1466|    835|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    835|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:17): [True: 41, False: 794]
  |  |  |  |  ------------------
  |  |  |  | 1467|     41|                (start) = mid+1; \
  |  |  |  | 1468|    794|            } else { \
  |  |  |  | 1469|    794|                (end) = mid; \
  |  |  |  | 1470|    794|            } \
  |  |  |  | 1471|    835|        } \
  |  |  |  | 1472|    669|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1472:13): [True: 374, False: 295]
  |  |  |  |  ------------------
  |  |  |  | 1473|    374|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    374|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1474|    374|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    374|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1474:17): [True: 221, False: 153]
  |  |  |  |  ------------------
  |  |  |  | 1475|    221|                *(result) = e; \
  |  |  |  | 1476|    221|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1476:21): [True: 221, Folded]
  |  |  |  |  ------------------
  |  |  |  | 1477|    221|            } \
  |  |  |  | 1478|    374|        } \
  |  |  |  | 1479|    669|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1479:14): [Folded, False: 669]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1686|  4.18k|            while (pos >= 0 && pos < N) { \
  |  |  ------------------
  |  |  |  Branch (1686:20): [True: 3.73k, False: 448]
  |  |  |  Branch (1686:32): [True: 3.59k, False: 146]
  |  |  ------------------
  |  | 1687|  3.59k|                eid = VECTOR(graph->oi)[pos++]; \
  |  |  ------------------
  |  |  |  |   60|  3.59k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1688|  3.59k|                if (VECTOR(graph->to)[eid] != xto) { break; } \
  |  |  ------------------
  |  |  |  |   60|  3.59k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  |  Branch (1688:21): [True: 75, False: 3.51k]
  |  |  ------------------
  |  | 1689|  3.59k|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  ------------------
  |  |  |  |  656|  3.51k|    do { \
  |  |  |  |  657|  3.51k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  3.51k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  3.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.51k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  3.51k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 3.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1690|  3.51k|            } \
  |  | 1691|  3.28k|        } else { \
  |  | 1692|  3.28k|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, &eid, &pos); \
  |  |  ------------------
  |  |  |  | 1462|  3.28k|    do { \
  |  |  |  | 1463|  5.47k|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:16): [True: 2.18k, False: 3.28k]
  |  |  |  |  ------------------
  |  |  |  | 1464|  2.18k|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1465|  2.18k|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  2.18k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1466|  2.18k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  2.18k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:17): [True: 0, False: 2.18k]
  |  |  |  |  ------------------
  |  |  |  | 1467|      0|                (start) = mid+1; \
  |  |  |  | 1468|  2.18k|            } else { \
  |  |  |  | 1469|  2.18k|                (end) = mid; \
  |  |  |  | 1470|  2.18k|            } \
  |  |  |  | 1471|  2.18k|        } \
  |  |  |  | 1472|  3.28k|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1472:13): [True: 1.19k, False: 2.09k]
  |  |  |  |  ------------------
  |  |  |  | 1473|  1.19k|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.19k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1474|  1.19k|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.19k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1474:17): [True: 556, False: 642]
  |  |  |  |  ------------------
  |  |  |  | 1475|    556|                *(result) = e; \
  |  |  |  | 1476|    556|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1476:21): [True: 556, Folded]
  |  |  |  |  ------------------
  |  |  |  | 1477|    556|            } \
  |  |  |  | 1478|  1.19k|        } \
  |  |  |  | 1479|  3.28k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1479:14): [Folded, False: 3.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1693|  8.97k|            while (pos >= 0 && pos < N2) { \
  |  |  ------------------
  |  |  |  Branch (1693:20): [True: 6.24k, False: 2.73k]
  |  |  |  Branch (1693:32): [True: 5.90k, False: 334]
  |  |  ------------------
  |  | 1694|  5.90k|                eid = VECTOR(graph->ii)[pos++]; \
  |  |  ------------------
  |  |  |  |   60|  5.90k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1695|  5.90k|                if (VECTOR(graph->from)[eid] != xfrom) { break; } \
  |  |  ------------------
  |  |  |  |   60|  5.90k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  |  Branch (1695:21): [True: 222, False: 5.68k]
  |  |  ------------------
  |  | 1696|  5.90k|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  ------------------
  |  |  |  |  656|  5.68k|    do { \
  |  |  |  |  657|  5.68k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  5.68k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  5.68k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.68k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  5.68k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 5.68k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1697|  5.68k|            } \
  |  | 1698|  3.28k|        } \
  |  | 1699|  3.95k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1699:14): [Folded, False: 3.95k]
  |  |  ------------------
  ------------------
 1750|  3.95k|        }
 1751|  5.93k|    } else {
 1752|      0|        FIND_ALL_UNDIRECTED_EDGES(graph, source, target, eids);
  ------------------
  |  | 1702|      0|    do { \
  |  | 1703|      0|        igraph_int_t xfrom1 = from > to ? from : to; \
  |  |  ------------------
  |  |  |  Branch (1703:31): [True: 0, False: 0]
  |  |  ------------------
  |  | 1704|      0|        igraph_int_t xto1 = from > to ? to : from; \
  |  |  ------------------
  |  |  |  Branch (1704:29): [True: 0, False: 0]
  |  |  ------------------
  |  | 1705|      0|        FIND_ALL_DIRECTED_EDGES(graph, xfrom1, xto1, eidvec); \
  |  |  ------------------
  |  |  |  | 1675|      0|    do { \
  |  |  |  | 1676|      0|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1677|      0|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1678|      0|        igraph_int_t N = end; \
  |  |  |  | 1679|      0|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1680|      0|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1681|      0|        igraph_int_t N2 = end2; \
  |  |  |  | 1682|      0|        igraph_int_t eid = -1; \
  |  |  |  | 1683|      0|        igraph_int_t pos = -1; \
  |  |  |  | 1684|      0|        if (end-start < end2-start2) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1684:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1685|      0|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, &eid, &pos); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1462|      0|    do { \
  |  |  |  |  |  | 1463|      0|        while ((start) < (end)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1463:16): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1464|      0|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  |  |  | 1465|      0|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1466|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1466:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1467|      0|                (start) = mid+1; \
  |  |  |  |  |  | 1468|      0|            } else { \
  |  |  |  |  |  | 1469|      0|                (end) = mid; \
  |  |  |  |  |  | 1470|      0|            } \
  |  |  |  |  |  | 1471|      0|        } \
  |  |  |  |  |  | 1472|      0|        if ((start) < (N)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1472:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1473|      0|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1474|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1474:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1475|      0|                *(result) = e; \
  |  |  |  |  |  | 1476|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1476:21): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1477|      0|            } \
  |  |  |  |  |  | 1478|      0|        } \
  |  |  |  |  |  | 1479|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1479:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1686|      0|            while (pos >= 0 && pos < N) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1686:20): [True: 0, False: 0]
  |  |  |  |  |  Branch (1686:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1687|      0|                eid = VECTOR(graph->oi)[pos++]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1688|      0|                if (VECTOR(graph->to)[eid] != xto) { break; } \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1688:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1689|      0|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  656|      0|    do { \
  |  |  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  660|      0|        } \
  |  |  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1690|      0|            } \
  |  |  |  | 1691|      0|        } else { \
  |  |  |  | 1692|      0|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, &eid, &pos); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1462|      0|    do { \
  |  |  |  |  |  | 1463|      0|        while ((start) < (end)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1463:16): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1464|      0|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  |  |  | 1465|      0|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1466|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1466:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1467|      0|                (start) = mid+1; \
  |  |  |  |  |  | 1468|      0|            } else { \
  |  |  |  |  |  | 1469|      0|                (end) = mid; \
  |  |  |  |  |  | 1470|      0|            } \
  |  |  |  |  |  | 1471|      0|        } \
  |  |  |  |  |  | 1472|      0|        if ((start) < (N)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1472:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1473|      0|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1474|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1474:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1475|      0|                *(result) = e; \
  |  |  |  |  |  | 1476|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1476:21): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1477|      0|            } \
  |  |  |  |  |  | 1478|      0|        } \
  |  |  |  |  |  | 1479|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1479:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1693|      0|            while (pos >= 0 && pos < N2) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1693:20): [True: 0, False: 0]
  |  |  |  |  |  Branch (1693:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1694|      0|                eid = VECTOR(graph->ii)[pos++]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1695|      0|                if (VECTOR(graph->from)[eid] != xfrom) { break; } \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1695:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1696|      0|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  656|      0|    do { \
  |  |  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  660|      0|        } \
  |  |  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1697|      0|            } \
  |  |  |  | 1698|      0|        } \
  |  |  |  | 1699|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1699:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1706|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1706:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1753|      0|    }
 1754|       |
 1755|  5.93k|    return IGRAPH_SUCCESS;
 1756|  5.93k|}
igraph_incident:
 1791|  1.86M|) {
 1792|  1.86M|    igraph_int_t length = 0, idx = 0;
 1793|  1.86M|    igraph_int_t i, j;
 1794|  1.86M|    igraph_int_t node = pnode;
 1795|  1.86M|    igraph_bool_t directed = igraph_is_directed(graph);
 1796|       |
 1797|  1.86M|    if (node < 0 || node > igraph_vcount(graph) - 1) {
  ------------------
  |  Branch (1797:9): [True: 0, False: 1.86M]
  |  Branch (1797:21): [True: 0, False: 1.86M]
  ------------------
 1798|      0|        IGRAPH_ERRORF("Vertex %" IGRAPH_PRId " is not in the graph.", IGRAPH_EINVVID, node);
  ------------------
  |  |  464|      0|    do { \
  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  467|      0|        return igraph_errno; \
  |  |  468|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1799|      0|    }
 1800|  1.86M|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (1800:9): [True: 865k, False: 996k]
  |  Branch (1800:31): [True: 34.0k, False: 831k]
  ------------------
 1801|  34.0k|        mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1801:9): [True: 0, False: 34.0k]
  ------------------
 1802|      0|        IGRAPH_ERROR("Mode should be either IGRAPH_OUT, IGRAPH_IN or IGRAPH_ALL.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1803|      0|    }
 1804|       |
 1805|  1.86M|    if (!directed) {
  ------------------
  |  Branch (1805:9): [True: 0, False: 1.86M]
  ------------------
 1806|      0|        mode = IGRAPH_ALL;
 1807|      0|    }
 1808|       |
 1809|  1.86M|    if (mode != IGRAPH_ALL && loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1809:9): [True: 1.82M, False: 34.0k]
  |  Branch (1809:31): [True: 1.66M, False: 165k]
  ------------------
 1810|       |        /*
 1811|       |        IGRAPH_ERROR("For a directed graph (with directions not ignored), "
 1812|       |                     "IGRAPH_LOOPS_TWICE does not make sense.", IGRAPH_EINVAL);
 1813|       |        */
 1814|  1.66M|        loops = IGRAPH_LOOPS_ONCE;
 1815|  1.66M|    }
 1816|       |
 1817|       |    /* Calculate needed space first & allocate it */
 1818|       |    /* Note that 'mode' is treated as a bit field here; it's okay because
 1819|       |     * IGRAPH_ALL = IGRAPH_IN | IGRAPH_OUT, bit-wise */
 1820|  1.86M|    if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1820:9): [True: 1.03M, False: 831k]
  ------------------
 1821|  1.03M|        length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|  1.03M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|  1.03M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1822|  1.03M|    }
 1823|  1.86M|    if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1823:9): [True: 865k, False: 996k]
  ------------------
 1824|   865k|        length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|   865k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|   865k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1825|   865k|    }
 1826|       |
 1827|  1.86M|    IGRAPH_CHECK(igraph_vector_int_resize(eids, length));
  ------------------
  |  |  656|  1.86M|    do { \
  |  |  657|  1.86M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.86M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.86M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.86M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.86M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.86M]
  |  |  ------------------
  ------------------
 1828|       |
 1829|       |    /* The loops below produce an ordering what is consistent with the
 1830|       |     * ordering returned by igraph_neighbors(), and this should be preserved.
 1831|       |     * We are dealing with two sorted lists; one for the successors and one
 1832|       |     * for the predecessors. If we have requested only one of them, we have
 1833|       |     * an easy job. If we have requested both, we need to merge the two lists
 1834|       |     * to ensure that the output is sorted by the vertex IDs of the "other"
 1835|       |     * endpoint of the affected edges */
 1836|  1.86M|    if (!directed || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1836:9): [True: 0, False: 1.86M]
  |  Branch (1836:22): [True: 1.82M, False: 34.0k]
  ------------------
 1837|       |        /* We did not ask for both directions; this is the easy case */
 1838|       |
 1839|  1.82M|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1839:13): [True: 996k, False: 831k]
  ------------------
 1840|   996k|            j = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|   996k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1841|  1.42M|            for (i = VECTOR(graph->os)[node]; i < j; i++) {
  ------------------
  |  |   60|   996k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1841:47): [True: 425k, False: 996k]
  ------------------
 1842|   425k|                igraph_int_t edge = VECTOR(graph->oi)[i];
  ------------------
  |  |   60|   425k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1843|   425k|                igraph_int_t other = VECTOR(graph->to)[edge];
  ------------------
  |  |   60|   425k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1844|   425k|                if (loops == IGRAPH_NO_LOOPS && other == pnode) {
  ------------------
  |  Branch (1844:21): [True: 0, False: 425k]
  |  Branch (1844:49): [True: 0, False: 0]
  ------------------
 1845|      0|                    length--;
 1846|   425k|                } else {
 1847|   425k|                    VECTOR(*eids)[idx++] = edge;
  ------------------
  |  |   60|   425k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1848|   425k|                }
 1849|   425k|            }
 1850|   996k|        }
 1851|       |
 1852|  1.82M|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1852:13): [True: 831k, False: 996k]
  ------------------
 1853|   831k|            j = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|   831k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1854|  1.09M|            for (i = VECTOR(graph->is)[node]; i < j; i++) {
  ------------------
  |  |   60|   831k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1854:47): [True: 259k, False: 831k]
  ------------------
 1855|   259k|                igraph_int_t edge = VECTOR(graph->ii)[i];
  ------------------
  |  |   60|   259k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1856|   259k|                igraph_int_t other = VECTOR(graph->from)[edge];
  ------------------
  |  |   60|   259k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1857|   259k|                if ((loops == IGRAPH_NO_LOOPS || (loops == IGRAPH_LOOPS_ONCE && !directed)) && other == pnode) {
  ------------------
  |  Branch (1857:22): [True: 0, False: 259k]
  |  Branch (1857:51): [True: 259k, False: 0]
  |  Branch (1857:81): [True: 0, False: 259k]
  |  Branch (1857:96): [True: 0, False: 0]
  ------------------
 1858|      0|                    length--;
 1859|   259k|                } else {
 1860|   259k|                    VECTOR(*eids)[idx++] = edge;
  ------------------
  |  |   60|   259k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1861|   259k|                }
 1862|   259k|            }
 1863|   831k|        }
 1864|  1.82M|    } else {
 1865|       |        /* both in- and out- neighbors in a directed graph,
 1866|       |           we need to merge the two 'vectors' */
 1867|  34.0k|        igraph_int_t j1 = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|  34.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1868|  34.0k|        igraph_int_t j2 = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|  34.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1869|  34.0k|        igraph_int_t i1 = VECTOR(graph->os)[node];
  ------------------
  |  |   60|  34.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1870|  34.0k|        igraph_int_t i2 = VECTOR(graph->is)[node];
  ------------------
  |  |   60|  34.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1871|  34.0k|        igraph_int_t eid1, eid2;
 1872|  34.0k|        igraph_int_t n1, n2;
 1873|  34.0k|        igraph_bool_t seen_loop_edge = false;
 1874|       |
 1875|  64.9k|        while (i1 < j1 && i2 < j2) {
  ------------------
  |  Branch (1875:16): [True: 47.2k, False: 17.7k]
  |  Branch (1875:27): [True: 30.8k, False: 16.3k]
  ------------------
 1876|  30.8k|            eid1 = VECTOR(graph->oi)[i1];
  ------------------
  |  |   60|  30.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1877|  30.8k|            eid2 = VECTOR(graph->ii)[i2];
  ------------------
  |  |   60|  30.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1878|  30.8k|            n1 = VECTOR(graph->to)[eid1];
  ------------------
  |  |   60|  30.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1879|  30.8k|            n2 = VECTOR(graph->from)[eid2];
  ------------------
  |  |   60|  30.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1880|  30.8k|            if (n1 < n2) {
  ------------------
  |  Branch (1880:17): [True: 13.2k, False: 17.6k]
  ------------------
 1881|  13.2k|                i1++;
 1882|  13.2k|                VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|  13.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1883|  17.6k|            } else if (n1 > n2) {
  ------------------
  |  Branch (1883:24): [True: 13.4k, False: 4.18k]
  ------------------
 1884|  13.4k|                i2++;
 1885|  13.4k|                VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|  13.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1886|  13.4k|            } else if (n1 != pnode) {
  ------------------
  |  Branch (1886:24): [True: 4.18k, False: 0]
  ------------------
 1887|       |                /* multiple edge */
 1888|  4.18k|                i1++;
 1889|  4.18k|                i2++;
 1890|  4.18k|                VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|  4.18k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1891|  4.18k|                VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|  4.18k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1892|  4.18k|            } else {
 1893|       |                /* loop edge */
 1894|      0|                i1++;
 1895|      0|                i2++;
 1896|      0|                if (loops == IGRAPH_NO_LOOPS) {
  ------------------
  |  Branch (1896:21): [True: 0, False: 0]
  ------------------
 1897|      0|                    length -= 2;
 1898|      0|                } else if (loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (1898:28): [True: 0, False: 0]
  ------------------
 1899|      0|                    length--;
 1900|      0|                    if (!seen_loop_edge) {
  ------------------
  |  Branch (1900:25): [True: 0, False: 0]
  ------------------
 1901|      0|                        VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1902|      0|                    } else {
 1903|      0|                        VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1904|      0|                    }
 1905|      0|                    seen_loop_edge = !seen_loop_edge;
 1906|      0|                } else {
 1907|      0|                    VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1908|      0|                    VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1909|      0|                }
 1910|      0|            }
 1911|  30.8k|        }
 1912|       |
 1913|  54.5k|        while (i1 < j1) {
  ------------------
  |  Branch (1913:16): [True: 20.4k, False: 34.0k]
  ------------------
 1914|  20.4k|            eid1 = VECTOR(graph->oi)[i1++];
  ------------------
  |  |   60|  20.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1915|  20.4k|            VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|  20.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1916|  20.4k|        }
 1917|       |
 1918|  54.3k|        while (i2 < j2) {
  ------------------
  |  Branch (1918:16): [True: 20.2k, False: 34.0k]
  ------------------
 1919|  20.2k|            eid2 = VECTOR(graph->ii)[i2++];
  ------------------
  |  |   60|  20.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1920|  20.2k|            VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|  20.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1921|  20.2k|        }
 1922|  34.0k|    }
 1923|  1.86M|    IGRAPH_CHECK(igraph_vector_int_resize(eids, length));
  ------------------
  |  |  656|  1.86M|    do { \
  |  |  657|  1.86M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.86M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.86M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.86M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.86M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.86M]
  |  |  ------------------
  ------------------
 1924|  1.86M|    return IGRAPH_SUCCESS;
 1925|  1.86M|}
igraph_i_reverse:
 2015|  2.00k|igraph_error_t igraph_i_reverse(igraph_t *graph) {
 2016|       |
 2017|       |    /* Nothing to do for undirected graphs. */
 2018|  2.00k|    if (! igraph_is_directed(graph)) {
  ------------------
  |  Branch (2018:9): [True: 0, False: 2.00k]
  ------------------
 2019|      0|        return IGRAPH_SUCCESS;
 2020|      0|    }
 2021|       |
 2022|  2.00k|    igraph_vector_int_swap(&graph->to, &graph->from);
 2023|  2.00k|    igraph_vector_int_swap(&graph->oi, &graph->ii);
 2024|  2.00k|    igraph_vector_int_swap(&graph->os, &graph->is);
 2025|       |
 2026|  2.00k|    return IGRAPH_SUCCESS;
 2027|  2.00k|}
type_indexededgelist.c:igraph_i_create_start_vectors:
 1077|  57.8k|        igraph_vector_int_t *iindex, igraph_int_t nodes) {
 1078|       |
 1079|  57.8k|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
 1080|       |
 1081|  57.8k|    igraph_int_t no_of_nodes;
 1082|  57.8k|    igraph_int_t no_of_edges;
 1083|  57.8k|    igraph_int_t i, j, idx;
 1084|       |
 1085|  57.8k|    no_of_nodes = nodes;
 1086|  57.8k|    no_of_edges = igraph_vector_int_size(el);
 1087|       |
 1088|       |    /* result */
 1089|       |
 1090|  57.8k|    IGRAPH_CHECK(igraph_vector_int_resize(res, nodes + 1));
  ------------------
  |  |  656|  57.8k|    do { \
  |  |  657|  57.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  57.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  57.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 57.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  57.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 57.8k]
  |  |  ------------------
  ------------------
 1091|       |
 1092|       |    /* create the index */
 1093|       |
 1094|  57.8k|    if (no_of_edges == 0) {
  ------------------
  |  Branch (1094:9): [True: 4.45k, False: 53.4k]
  ------------------
 1095|       |        /* empty graph */
 1096|  4.45k|        igraph_vector_int_null(res);
 1097|  53.4k|    } else {
 1098|  53.4k|        idx = -1;
 1099|  2.64M|        for (i = 0; i <= EDGE(0); i++) {
  ------------------
  |  | 1079|  2.64M|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  2.64M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  2.64M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1099:21): [True: 2.59M, False: 53.4k]
  ------------------
 1100|  2.59M|            idx++; VECTOR(*res)[idx] = 0;
  ------------------
  |  |   60|  2.59M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1101|  2.59M|        }
 1102|  1.78M|        for (i = 1; i < no_of_edges; i++) {
  ------------------
  |  Branch (1102:21): [True: 1.72M, False: 53.4k]
  ------------------
 1103|  1.72M|            igraph_int_t n = EDGE(i) - EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1079|  1.72M|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  1.72M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  1.72M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                          igraph_int_t n = EDGE(i) - EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1079|  1.72M|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  1.72M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  1.72M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1104|  8.90M|            for (j = 0; j < n; j++) {
  ------------------
  |  Branch (1104:25): [True: 7.17M, False: 1.72M]
  ------------------
 1105|  7.17M|                idx++; VECTOR(*res)[idx] = i;
  ------------------
  |  |   60|  7.17M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1106|  7.17M|            }
 1107|  1.72M|        }
 1108|  53.4k|        j = EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1079|  53.4k|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  53.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  53.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1109|  3.52M|        for (i = 0; i < no_of_nodes - j; i++) {
  ------------------
  |  Branch (1109:21): [True: 3.47M, False: 53.4k]
  ------------------
 1110|  3.47M|            idx++; VECTOR(*res)[idx] = no_of_edges;
  ------------------
  |  |   60|  3.47M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1111|  3.47M|        }
 1112|  53.4k|    }
 1113|       |
 1114|       |    /* clean */
 1115|       |
 1116|  57.8k|# undef EDGE
 1117|  57.8k|    return IGRAPH_SUCCESS;
 1118|  57.8k|}

igraph_bfs:
  112|  2.00k|               void *extra) {
  113|       |
  114|  2.00k|    const igraph_int_t no_of_nodes = igraph_vcount(graph);
  115|       |
  116|  2.00k|    igraph_error_t ret;
  117|       |
  118|  2.00k|    igraph_dqueue_int_t Q;
  119|  2.00k|    igraph_int_t actroot = 0;
  120|  2.00k|    igraph_bitset_t added;
  121|       |
  122|  2.00k|    igraph_lazy_adjlist_t adjlist;
  123|       |
  124|  2.00k|    igraph_int_t act_rank = 0;
  125|  2.00k|    igraph_int_t pred_vec = -1;
  126|       |
  127|  2.00k|    igraph_int_t rootpos = 0;
  128|  2.00k|    igraph_int_t noroots = roots ? igraph_vector_int_size(roots) : 1;
  ------------------
  |  Branch (128:28): [True: 0, False: 2.00k]
  ------------------
  129|       |
  130|  2.00k|    if (!roots && (root < 0 || root >= no_of_nodes)) {
  ------------------
  |  Branch (130:9): [True: 2.00k, False: 0]
  |  Branch (130:20): [True: 0, False: 2.00k]
  |  Branch (130:32): [True: 0, False: 2.00k]
  ------------------
  131|      0|        IGRAPH_ERROR("Invalid root vertex in BFS.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  132|      0|    }
  133|       |
  134|  2.00k|    if (roots && !igraph_vector_int_isininterval(roots, 0, no_of_nodes-1)) {
  ------------------
  |  Branch (134:9): [True: 0, False: 2.00k]
  |  Branch (134:18): [True: 0, False: 0]
  ------------------
  135|      0|        IGRAPH_ERROR("Invalid root vertex in BFS.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  136|      0|    }
  137|       |
  138|  2.00k|    if (restricted && !igraph_vector_int_isininterval(restricted, 0, no_of_nodes-1)) {
  ------------------
  |  Branch (138:9): [True: 0, False: 2.00k]
  |  Branch (138:23): [True: 0, False: 0]
  ------------------
  139|      0|        IGRAPH_ERROR("Invalid vertex ID in restricted set.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  140|      0|    }
  141|       |
  142|  2.00k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (142:9): [True: 0, False: 2.00k]
  |  Branch (142:31): [True: 0, False: 0]
  ------------------
  143|      0|        mode != IGRAPH_ALL) {
  ------------------
  |  Branch (143:9): [True: 0, False: 0]
  ------------------
  144|      0|        IGRAPH_ERROR("Invalid mode argument.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  145|      0|    }
  146|       |
  147|  2.00k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 2.00k]
  ------------------
  148|      0|        mode = IGRAPH_ALL;
  149|      0|    }
  150|       |
  151|  2.00k|    IGRAPH_BITSET_INIT_FINALLY(&added, no_of_nodes);
  ------------------
  |  |  265|  2.00k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  266|  2.00k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  267|  2.00k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (267:62): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  152|  2.00k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&Q, 100);
  ------------------
  |  |   61|  2.00k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.00k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  153|       |
  154|  2.00k|    IGRAPH_CHECK(igraph_lazy_adjlist_init(graph, &adjlist, mode, IGRAPH_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  155|  2.00k|    IGRAPH_FINALLY(igraph_lazy_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  156|       |
  157|       |    /* Mark the vertices that are not in the restricted set, as already
  158|       |       found. Special care must be taken for vertices that are not in
  159|       |       the restricted set, but are to be used as 'root' vertices. */
  160|  2.00k|    if (restricted) {
  ------------------
  |  Branch (160:9): [True: 0, False: 2.00k]
  ------------------
  161|      0|        igraph_int_t i, n = igraph_vector_int_size(restricted);
  162|      0|        igraph_bitset_fill(&added, true);
  163|      0|        for (i = 0; i < n; i++) {
  ------------------
  |  Branch (163:21): [True: 0, False: 0]
  ------------------
  164|      0|            igraph_int_t v = VECTOR(*restricted)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  165|      0|            IGRAPH_BIT_CLEAR(added, v);
  ------------------
  |  |  121|      0|#define IGRAPH_BIT_CLEAR(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] &= ~IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_CLEAR(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] &= ~IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|      0|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|      0|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_CLEAR(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] &= ~IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|      0|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|      0|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  166|      0|        }
  167|      0|    }
  168|       |
  169|       |    /* Resize result vectors, and fill them with the initial value. */
  170|       |
  171|  2.00k|# define VINIT(v, initial) \
  172|  2.00k|    if (v) { \
  173|  2.00k|        IGRAPH_CHECK(igraph_vector_int_resize((v), no_of_nodes)); \
  174|  2.00k|        igraph_vector_int_fill((v), initial); \
  175|  2.00k|    }
  176|       |
  177|  2.00k|    VINIT(order, -1);
  ------------------
  |  |  172|  2.00k|    if (v) { \
  |  |  ------------------
  |  |  |  Branch (172:9): [True: 2.00k, False: 0]
  |  |  ------------------
  |  |  173|  2.00k|        IGRAPH_CHECK(igraph_vector_int_resize((v), no_of_nodes)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|  2.00k|        igraph_vector_int_fill((v), initial); \
  |  |  175|  2.00k|    }
  ------------------
  178|  2.00k|    VINIT(rank, -1);
  ------------------
  |  |  172|  2.00k|    if (v) { \
  |  |  ------------------
  |  |  |  Branch (172:9): [True: 2.00k, False: 0]
  |  |  ------------------
  |  |  173|  2.00k|        IGRAPH_CHECK(igraph_vector_int_resize((v), no_of_nodes)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|  2.00k|        igraph_vector_int_fill((v), initial); \
  |  |  175|  2.00k|    }
  ------------------
  179|  2.00k|    VINIT(parents, -2);
  ------------------
  |  |  172|  2.00k|    if (v) { \
  |  |  ------------------
  |  |  |  Branch (172:9): [True: 2.00k, False: 0]
  |  |  ------------------
  |  |  173|  2.00k|        IGRAPH_CHECK(igraph_vector_int_resize((v), no_of_nodes)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|  2.00k|        igraph_vector_int_fill((v), initial); \
  |  |  175|  2.00k|    }
  ------------------
  180|  2.00k|    VINIT(pred, -2);
  ------------------
  |  |  172|  2.00k|    if (v) { \
  |  |  ------------------
  |  |  |  Branch (172:9): [True: 2.00k, False: 0]
  |  |  ------------------
  |  |  173|  2.00k|        IGRAPH_CHECK(igraph_vector_int_resize((v), no_of_nodes)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|  2.00k|        igraph_vector_int_fill((v), initial); \
  |  |  175|  2.00k|    }
  ------------------
  181|  2.00k|    VINIT(succ, -2);
  ------------------
  |  |  172|  2.00k|    if (v) { \
  |  |  ------------------
  |  |  |  Branch (172:9): [True: 0, False: 2.00k]
  |  |  ------------------
  |  |  173|      0|        IGRAPH_CHECK(igraph_vector_int_resize((v), no_of_nodes)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|        igraph_vector_int_fill((v), initial); \
  |  |  175|      0|    }
  ------------------
  182|  2.00k|    VINIT(dist, -1);
  ------------------
  |  |  172|  2.00k|    if (v) { \
  |  |  ------------------
  |  |  |  Branch (172:9): [True: 2.00k, False: 0]
  |  |  ------------------
  |  |  173|  2.00k|        IGRAPH_CHECK(igraph_vector_int_resize((v), no_of_nodes)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|  2.00k|        igraph_vector_int_fill((v), initial); \
  |  |  175|  2.00k|    }
  ------------------
  183|  2.00k|# undef VINIT
  184|       |
  185|   336k|    while (1) {
  ------------------
  |  Branch (185:12): [True: 336k, Folded]
  ------------------
  186|       |
  187|       |        /* Get the next root vertex, if any */
  188|       |
  189|   336k|        if (roots && rootpos < noroots) {
  ------------------
  |  Branch (189:13): [True: 0, False: 336k]
  |  Branch (189:22): [True: 0, False: 0]
  ------------------
  190|       |            /* We are still going through the 'roots' vector */
  191|      0|            actroot = VECTOR(*roots)[rootpos++];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  192|   336k|        } else if (!roots && rootpos == 0) {
  ------------------
  |  Branch (192:20): [True: 336k, False: 0]
  |  Branch (192:30): [True: 2.00k, False: 334k]
  ------------------
  193|       |            /* We have a single root vertex given, and start now */
  194|  2.00k|            actroot = root;
  195|  2.00k|            rootpos++;
  196|   334k|        } else if (rootpos == noroots && unreachable) {
  ------------------
  |  Branch (196:20): [True: 2.00k, False: 332k]
  |  Branch (196:42): [True: 2.00k, False: 0]
  ------------------
  197|       |            /* We finished the given root(s), but other vertices are also
  198|       |            tried as root */
  199|  2.00k|            actroot = 0;
  200|  2.00k|            rootpos++;
  201|   332k|        } else if (unreachable && actroot + 1 < no_of_nodes) {
  ------------------
  |  Branch (201:20): [True: 332k, False: 0]
  |  Branch (201:35): [True: 330k, False: 2.00k]
  ------------------
  202|       |            /* We are already doing the other vertices, take the next one */
  203|   330k|            actroot++;
  204|   330k|        } else {
  205|       |            /* No more root nodes to do */
  206|  2.00k|            break;
  207|  2.00k|        }
  208|       |
  209|       |        /* OK, we have a new root, start BFS */
  210|   334k|        if (IGRAPH_BIT_TEST(added, actroot)) {
  ------------------
  |  |  142|   334k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   334k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|   334k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   334k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|   334k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   334k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (142:36): [True: 34.7k, False: 299k]
  |  |  ------------------
  ------------------
  211|  34.7k|            continue;
  212|  34.7k|        }
  213|   299k|        IGRAPH_CHECK(igraph_dqueue_int_push(&Q, actroot));
  ------------------
  |  |  656|   299k|    do { \
  |  |  657|   299k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   299k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   299k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 299k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   299k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 299k]
  |  |  ------------------
  ------------------
  214|   299k|        IGRAPH_CHECK(igraph_dqueue_int_push(&Q, 0));
  ------------------
  |  |  656|   299k|    do { \
  |  |  657|   299k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   299k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   299k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 299k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   299k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 299k]
  |  |  ------------------
  ------------------
  215|   299k|        IGRAPH_BIT_SET(added, actroot);
  ------------------
  |  |  103|   299k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   299k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|   299k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   299k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|   299k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   299k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  216|   299k|        if (parents) {
  ------------------
  |  Branch (216:13): [True: 299k, False: 0]
  ------------------
  217|   299k|            VECTOR(*parents)[actroot] = -1;
  ------------------
  |  |   60|   299k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  218|   299k|        }
  219|       |
  220|   299k|        pred_vec = -1;
  221|       |
  222|   632k|        while (!igraph_dqueue_int_empty(&Q)) {
  ------------------
  |  Branch (222:16): [True: 332k, False: 299k]
  ------------------
  223|   332k|            igraph_int_t actvect = igraph_dqueue_int_pop(&Q);
  224|   332k|            igraph_int_t actdist = igraph_dqueue_int_pop(&Q);
  225|   332k|            igraph_int_t succ_vec;
  226|   332k|            igraph_vector_int_t *neis = igraph_lazy_adjlist_get(&adjlist, actvect);
  ------------------
  |  |  158|   332k|    (igraph_lazy_adjlist_has(al,no) ? ((al)->adjs[(igraph_int_t)(no)]) \
  |  |  ------------------
  |  |  |  |  133|   332k|#define igraph_lazy_adjlist_has(al,no) ((al)->adjs[(igraph_int_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (133:40): [True: 0, False: 332k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  159|   332k|                                    : (igraph_i_lazy_adjlist_get_real(al, no)))
  ------------------
  227|       |
  228|   332k|            IGRAPH_CHECK_OOM(neis, "Failed to query neighbors.");
  ------------------
  |  |  709|   332k|    do { \
  |  |  710|   332k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|   332k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 332k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|   332k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 332k]
  |  |  ------------------
  ------------------
  229|   332k|            const igraph_int_t n = igraph_vector_int_size(neis);
  230|       |
  231|   332k|            if (pred) {
  ------------------
  |  Branch (231:17): [True: 332k, False: 0]
  ------------------
  232|   332k|                VECTOR(*pred)[actvect] = pred_vec;
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  233|   332k|            }
  234|   332k|            if (rank) {
  ------------------
  |  Branch (234:17): [True: 332k, False: 0]
  ------------------
  235|   332k|                VECTOR(*rank)[actvect] = act_rank;
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  236|   332k|            }
  237|   332k|            if (order) {
  ------------------
  |  Branch (237:17): [True: 332k, False: 0]
  ------------------
  238|   332k|                VECTOR(*order)[act_rank++] = actvect;
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  239|   332k|            }
  240|   332k|            if (dist) {
  ------------------
  |  Branch (240:17): [True: 332k, False: 0]
  ------------------
  241|   332k|                VECTOR(*dist)[actvect] = actdist;
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  242|   332k|            }
  243|       |
  244|   407k|            for (igraph_int_t i = 0; i < n; i++) {
  ------------------
  |  Branch (244:38): [True: 74.9k, False: 332k]
  ------------------
  245|  74.9k|                igraph_int_t nei = VECTOR(*neis)[i];
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  246|  74.9k|                if (! IGRAPH_BIT_TEST(added, nei)) {
  ------------------
  |  |  142|  74.9k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  74.9k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  74.9k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  74.9k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  74.9k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (246:21): [True: 32.7k, False: 42.2k]
  ------------------
  247|  32.7k|                    IGRAPH_BIT_SET(added, nei);
  ------------------
  |  |  103|  32.7k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  32.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  32.7k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  32.7k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  32.7k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  32.7k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  248|  32.7k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&Q, nei));
  ------------------
  |  |  656|  32.7k|    do { \
  |  |  657|  32.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  32.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  32.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 32.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  32.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 32.7k]
  |  |  ------------------
  ------------------
  249|  32.7k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&Q, actdist + 1));
  ------------------
  |  |  656|  32.7k|    do { \
  |  |  657|  32.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  32.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  32.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 32.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  32.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 32.7k]
  |  |  ------------------
  ------------------
  250|  32.7k|                    if (parents) {
  ------------------
  |  Branch (250:25): [True: 32.7k, False: 0]
  ------------------
  251|  32.7k|                        VECTOR(*parents)[nei] = actvect;
  ------------------
  |  |   60|  32.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  252|  32.7k|                    }
  253|  32.7k|                }
  254|  74.9k|            }
  255|       |
  256|   332k|            succ_vec = igraph_dqueue_int_empty(&Q)
  ------------------
  |  Branch (256:24): [True: 299k, False: 32.7k]
  ------------------
  257|   332k|                           ? -1
  258|   332k|                           : igraph_dqueue_int_head(&Q);
  259|   332k|            if (callback) {
  ------------------
  |  Branch (259:17): [True: 0, False: 332k]
  ------------------
  260|      0|                IGRAPH_CHECK_CALLBACK(
  ------------------
  |  |  689|      0|    do { \
  |  |  690|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  691|      0|        *(code) = igraph_i_ret; \
  |  |  692|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS && igraph_i_ret != IGRAPH_STOP)) { \
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 0, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  693|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  694|      0|        } \
  |  |  695|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (695:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  261|      0|                    callback(graph, actvect, pred_vec, succ_vec, act_rank - 1, actdist, extra),
  262|      0|                    &ret
  263|      0|                );
  264|       |
  265|      0|                if (ret == IGRAPH_STOP) {
  ------------------
  |  Branch (265:21): [True: 0, False: 0]
  ------------------
  266|      0|                    goto cleanup;
  267|      0|                }
  268|      0|            }
  269|       |
  270|   332k|            if (succ) {
  ------------------
  |  Branch (270:17): [True: 0, False: 332k]
  ------------------
  271|      0|                VECTOR(*succ)[actvect] = succ_vec;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  272|      0|            }
  273|   332k|            pred_vec = actvect;
  274|       |
  275|   332k|        } /* while Q !empty */
  276|       |
  277|   299k|    } /* for actroot < no_of_nodes */
  278|       |
  279|  2.00k|cleanup:
  280|       |
  281|  2.00k|    igraph_lazy_adjlist_destroy(&adjlist);
  282|  2.00k|    igraph_dqueue_int_destroy(&Q);
  283|  2.00k|    igraph_bitset_destroy(&added);
  284|  2.00k|    IGRAPH_FINALLY_CLEAN(3);
  285|       |
  286|  2.00k|    return IGRAPH_SUCCESS;
  287|  2.00k|}
igraph_bfs_simple:
  332|  2.00k|) {
  333|       |
  334|  2.00k|    const igraph_int_t no_of_nodes = igraph_vcount(graph);
  335|  2.00k|    igraph_dqueue_int_t q;
  336|  2.00k|    igraph_int_t num_visited = 0;
  337|  2.00k|    igraph_vector_int_t neis;
  338|  2.00k|    igraph_bitset_t added;
  339|  2.00k|    igraph_int_t lastlayer = -1;
  340|       |
  341|  2.00k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (341:9): [True: 0, False: 2.00k]
  ------------------
  342|      0|        mode = IGRAPH_ALL;
  343|      0|    }
  344|       |
  345|  2.00k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (345:9): [True: 0, False: 2.00k]
  |  Branch (345:31): [True: 0, False: 0]
  ------------------
  346|      0|        mode != IGRAPH_ALL) {
  ------------------
  |  Branch (346:9): [True: 0, False: 0]
  ------------------
  347|      0|        IGRAPH_ERROR("Invalid mode argument.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  348|      0|    }
  349|       |
  350|  2.00k|    if (root < 0 || root >= no_of_nodes) {
  ------------------
  |  Branch (350:9): [True: 0, False: 2.00k]
  |  Branch (350:21): [True: 0, False: 2.00k]
  ------------------
  351|      0|        IGRAPH_ERROR("Invalid root vertex in BFS.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  352|      0|    }
  353|       |
  354|       |    /* temporary storage */
  355|       |
  356|  2.00k|    IGRAPH_BITSET_INIT_FINALLY(&added, no_of_nodes);
  ------------------
  |  |  265|  2.00k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  266|  2.00k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  267|  2.00k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (267:62): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  357|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  358|  2.00k|    IGRAPH_CHECK(igraph_dqueue_int_init(&q, 100));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  359|  2.00k|    IGRAPH_FINALLY(igraph_dqueue_int_destroy, &q);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  360|       |
  361|       |    /* results */
  362|  2.00k|    if (order) {
  ------------------
  |  Branch (362:9): [True: 2.00k, False: 0]
  ------------------
  363|  2.00k|        igraph_vector_int_clear(order);
  364|  2.00k|    }
  365|  2.00k|    if (layers) {
  ------------------
  |  Branch (365:9): [True: 2.00k, False: 0]
  ------------------
  366|  2.00k|        igraph_vector_int_clear(layers);
  367|  2.00k|    }
  368|  2.00k|    if (parents) {
  ------------------
  |  Branch (368:9): [True: 2.00k, False: 0]
  ------------------
  369|  2.00k|        IGRAPH_CHECK(igraph_vector_int_resize(parents, no_of_nodes));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  370|  2.00k|        igraph_vector_int_fill(parents, -2);
  371|  2.00k|    }
  372|       |
  373|       |    /* ok start with root */
  374|  2.00k|    IGRAPH_CHECK(igraph_dqueue_int_push(&q, root));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  375|  2.00k|    IGRAPH_CHECK(igraph_dqueue_int_push(&q, 0));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  376|  2.00k|    if (layers) {
  ------------------
  |  Branch (376:9): [True: 2.00k, False: 0]
  ------------------
  377|  2.00k|        IGRAPH_CHECK(igraph_vector_int_push_back(layers, num_visited));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  378|  2.00k|    }
  379|  2.00k|    if (order) {
  ------------------
  |  Branch (379:9): [True: 2.00k, False: 0]
  ------------------
  380|  2.00k|        IGRAPH_CHECK(igraph_vector_int_push_back(order, root));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  381|  2.00k|    }
  382|  2.00k|    if (parents) {
  ------------------
  |  Branch (382:9): [True: 2.00k, False: 0]
  ------------------
  383|  2.00k|        VECTOR(*parents)[root] = -1;
  ------------------
  |  |   60|  2.00k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  384|  2.00k|    }
  385|  2.00k|    num_visited++;
  386|  2.00k|    IGRAPH_BIT_SET(added, root);
  ------------------
  |  |  103|  2.00k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  2.00k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  2.00k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  2.00k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  2.00k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  2.00k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  387|       |
  388|  26.6k|    while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (388:12): [True: 24.6k, False: 2.00k]
  ------------------
  389|  24.6k|        igraph_int_t actvect = igraph_dqueue_int_pop(&q);
  390|  24.6k|        igraph_int_t actdist = igraph_dqueue_int_pop(&q);
  391|  24.6k|        IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|  24.6k|    do { \
  |  |  657|  24.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  24.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  24.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 24.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  24.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 24.6k]
  |  |  ------------------
  ------------------
  392|  24.6k|            graph, &neis, actvect, mode, IGRAPH_LOOPS, IGRAPH_MULTIPLE
  393|  24.6k|        ));
  394|  24.6k|        igraph_int_t nei_count = igraph_vector_int_size(&neis);
  395|  69.3k|        for (igraph_int_t i = 0; i < nei_count; i++) {
  ------------------
  |  Branch (395:34): [True: 44.7k, False: 24.6k]
  ------------------
  396|  44.7k|            const igraph_int_t neighbor = VECTOR(neis)[i];
  ------------------
  |  |   60|  44.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  397|  44.7k|            if (! IGRAPH_BIT_TEST(added, neighbor)) {
  ------------------
  |  |  142|  44.7k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  44.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  44.7k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  44.7k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  44.7k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  44.7k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (397:17): [True: 22.6k, False: 22.1k]
  ------------------
  398|  22.6k|                IGRAPH_BIT_SET(added, neighbor);
  ------------------
  |  |  103|  22.6k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  22.6k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  22.6k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  22.6k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  22.6k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  399|  22.6k|                if (parents) {
  ------------------
  |  Branch (399:21): [True: 22.6k, False: 0]
  ------------------
  400|  22.6k|                    VECTOR(*parents)[neighbor] = actvect;
  ------------------
  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  401|  22.6k|                }
  402|  22.6k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  22.6k|    do { \
  |  |  657|  22.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  22.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  22.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 22.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  22.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 22.6k]
  |  |  ------------------
  ------------------
  403|  22.6k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, actdist + 1));
  ------------------
  |  |  656|  22.6k|    do { \
  |  |  657|  22.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  22.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  22.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 22.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  22.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 22.6k]
  |  |  ------------------
  ------------------
  404|  22.6k|                if (layers && lastlayer != actdist + 1) {
  ------------------
  |  Branch (404:21): [True: 22.6k, False: 0]
  |  Branch (404:31): [True: 10.7k, False: 11.8k]
  ------------------
  405|  10.7k|                    IGRAPH_CHECK(igraph_vector_int_push_back(layers, num_visited));
  ------------------
  |  |  656|  10.7k|    do { \
  |  |  657|  10.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  10.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  10.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 10.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  10.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 10.7k]
  |  |  ------------------
  ------------------
  406|  10.7k|                }
  407|  22.6k|                if (order) {
  ------------------
  |  Branch (407:21): [True: 22.6k, False: 0]
  ------------------
  408|  22.6k|                    IGRAPH_CHECK(igraph_vector_int_push_back(order, neighbor));
  ------------------
  |  |  656|  22.6k|    do { \
  |  |  657|  22.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  22.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  22.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 22.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  22.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 22.6k]
  |  |  ------------------
  ------------------
  409|  22.6k|                }
  410|  22.6k|                num_visited++;
  411|  22.6k|                lastlayer = actdist + 1;
  412|  22.6k|            }
  413|  44.7k|        } /* for i in neis */
  414|  24.6k|    } /* while ! dqueue_int_empty */
  415|       |
  416|  2.00k|    if (layers) {
  ------------------
  |  Branch (416:9): [True: 2.00k, False: 0]
  ------------------
  417|  2.00k|        IGRAPH_CHECK(igraph_vector_int_push_back(layers, num_visited));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  418|  2.00k|    }
  419|       |
  420|  2.00k|    igraph_vector_int_destroy(&neis);
  421|  2.00k|    igraph_dqueue_int_destroy(&q);
  422|  2.00k|    igraph_bitset_destroy(&added);
  423|  2.00k|    IGRAPH_FINALLY_CLEAN(3);
  424|       |
  425|  2.00k|    return IGRAPH_SUCCESS;
  426|  2.00k|}
igraph_dfs:
  489|  4.00k|               void *extra) {
  490|       |
  491|  4.00k|    const igraph_int_t no_of_nodes = igraph_vcount(graph);
  492|  4.00k|    igraph_lazy_adjlist_t adjlist;
  493|  4.00k|    igraph_stack_int_t stack;
  494|  4.00k|    igraph_bitset_t added;
  495|  4.00k|    igraph_vector_int_t nptr;
  496|  4.00k|    igraph_error_t ret;
  497|  4.00k|    igraph_int_t act_rank = 0;
  498|  4.00k|    igraph_int_t rank_out = 0;
  499|  4.00k|    igraph_int_t act_dist = 0;
  500|       |
  501|  4.00k|    if (root < 0 || root >= no_of_nodes) {
  ------------------
  |  Branch (501:9): [True: 0, False: 4.00k]
  |  Branch (501:21): [True: 0, False: 4.00k]
  ------------------
  502|      0|        IGRAPH_ERROR("Invalid root vertex for DFS.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  503|      0|    }
  504|       |
  505|  4.00k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (505:9): [True: 0, False: 4.00k]
  |  Branch (505:31): [True: 0, False: 0]
  ------------------
  506|      0|        mode != IGRAPH_ALL) {
  ------------------
  |  Branch (506:9): [True: 0, False: 0]
  ------------------
  507|      0|        IGRAPH_ERROR("Invalid mode argument.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  508|      0|    }
  509|       |
  510|  4.00k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (510:9): [True: 0, False: 4.00k]
  ------------------
  511|      0|        mode = IGRAPH_ALL;
  512|      0|    }
  513|       |
  514|  4.00k|    IGRAPH_BITSET_INIT_FINALLY(&added, no_of_nodes);
  ------------------
  |  |  265|  4.00k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  266|  4.00k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|  4.00k|    do { \
  |  |  |  |  657|  4.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  267|  4.00k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.00k|    do { \
  |  |  |  |  604|  4.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (267:62): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
  515|  4.00k|    IGRAPH_STACK_INT_INIT_FINALLY(&stack, 100);
  ------------------
  |  |   61|  4.00k|    do { IGRAPH_CHECK(igraph_stack_int_init(s, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  4.00k|    do { \
  |  |  |  |  657|  4.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  4.00k|        IGRAPH_FINALLY(igraph_stack_int_destroy, s); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.00k|    do { \
  |  |  |  |  604|  4.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:63): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
  516|       |
  517|  4.00k|    IGRAPH_CHECK(igraph_lazy_adjlist_init(graph, &adjlist, mode, IGRAPH_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  4.00k|    do { \
  |  |  657|  4.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
  518|  4.00k|    IGRAPH_FINALLY(igraph_lazy_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  4.00k|    do { \
  |  |  604|  4.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  4.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  4.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  4.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 4.00k]
  |  |  ------------------
  |  |  608|  4.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  4.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
  519|       |
  520|  4.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&nptr, no_of_nodes);
  ------------------
  |  |  119|  4.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  4.00k|    do { \
  |  |  |  |  657|  4.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  4.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.00k|    do { \
  |  |  |  |  604|  4.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
  521|       |
  522|  4.00k|# define FREE_ALL() do { \
  523|  4.00k|        igraph_vector_int_destroy(&nptr); \
  524|  4.00k|        igraph_lazy_adjlist_destroy(&adjlist); \
  525|  4.00k|        igraph_stack_int_destroy(&stack); \
  526|  4.00k|        igraph_bitset_destroy(&added); \
  527|  4.00k|        IGRAPH_FINALLY_CLEAN(4); } while (0)
  528|       |
  529|       |    /* Resize result vectors and fill them with the initial value */
  530|       |
  531|  4.00k|# define VINIT(v, initial) if (v) { \
  532|  4.00k|        IGRAPH_CHECK(igraph_vector_int_resize(v, no_of_nodes)); \
  533|  4.00k|        igraph_vector_int_fill(v, initial); }
  534|       |
  535|  4.00k|    VINIT(order, -1);
  ------------------
  |  |  531|  4.00k|# define VINIT(v, initial) if (v) { \
  |  |  ------------------
  |  |  |  Branch (531:32): [True: 4.00k, False: 0]
  |  |  ------------------
  |  |  532|  4.00k|        IGRAPH_CHECK(igraph_vector_int_resize(v, no_of_nodes)); \
  |  |  ------------------
  |  |  |  |  656|  4.00k|    do { \
  |  |  |  |  657|  4.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  533|  4.00k|        igraph_vector_int_fill(v, initial); }
  ------------------
  536|  4.00k|    VINIT(order_out, -1);
  ------------------
  |  |  531|  4.00k|# define VINIT(v, initial) if (v) { \
  |  |  ------------------
  |  |  |  Branch (531:32): [True: 2.00k, False: 2.00k]
  |  |  ------------------
  |  |  532|  2.00k|        IGRAPH_CHECK(igraph_vector_int_resize(v, no_of_nodes)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  533|  2.00k|        igraph_vector_int_fill(v, initial); }
  ------------------
  537|  4.00k|    VINIT(parents, -2);
  ------------------
  |  |  531|  4.00k|# define VINIT(v, initial) if (v) { \
  |  |  ------------------
  |  |  |  Branch (531:32): [True: 4.00k, False: 0]
  |  |  ------------------
  |  |  532|  4.00k|        IGRAPH_CHECK(igraph_vector_int_resize(v, no_of_nodes)); \
  |  |  ------------------
  |  |  |  |  656|  4.00k|    do { \
  |  |  |  |  657|  4.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  533|  4.00k|        igraph_vector_int_fill(v, initial); }
  ------------------
  538|  4.00k|    VINIT(dist, -1);
  ------------------
  |  |  531|  4.00k|# define VINIT(v, initial) if (v) { \
  |  |  ------------------
  |  |  |  Branch (531:32): [True: 2.00k, False: 2.00k]
  |  |  ------------------
  |  |  532|  2.00k|        IGRAPH_CHECK(igraph_vector_int_resize(v, no_of_nodes)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  533|  2.00k|        igraph_vector_int_fill(v, initial); }
  ------------------
  539|       |
  540|  4.00k|# undef VINIT
  541|       |
  542|  4.00k|    IGRAPH_CHECK(igraph_stack_int_push(&stack, root));
  ------------------
  |  |  656|  4.00k|    do { \
  |  |  657|  4.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
  543|  4.00k|    IGRAPH_BIT_SET(added, root);
  ------------------
  |  |  103|  4.00k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  4.00k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  4.00k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  4.00k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  4.00k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  4.00k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  544|  4.00k|    if (parents) {
  ------------------
  |  Branch (544:9): [True: 4.00k, False: 0]
  ------------------
  545|  4.00k|        VECTOR(*parents)[root] = -1;
  ------------------
  |  |   60|  4.00k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  546|  4.00k|    }
  547|  4.00k|    if (order) {
  ------------------
  |  Branch (547:9): [True: 4.00k, False: 0]
  ------------------
  548|  4.00k|        VECTOR(*order)[act_rank++] = root;
  ------------------
  |  |   60|  4.00k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  549|  4.00k|    }
  550|  4.00k|    if (dist) {
  ------------------
  |  Branch (550:9): [True: 2.00k, False: 2.00k]
  ------------------
  551|  2.00k|        VECTOR(*dist)[root] = 0;
  ------------------
  |  |   60|  2.00k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  552|  2.00k|    }
  553|  4.00k|    if (in_callback) {
  ------------------
  |  Branch (553:9): [True: 0, False: 4.00k]
  ------------------
  554|      0|        IGRAPH_CHECK_CALLBACK(in_callback(graph, root, 0, extra), &ret);
  ------------------
  |  |  689|      0|    do { \
  |  |  690|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  691|      0|        *(code) = igraph_i_ret; \
  |  |  692|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS && igraph_i_ret != IGRAPH_STOP)) { \
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 0, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  693|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  694|      0|        } \
  |  |  695|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (695:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  555|      0|        if (ret == IGRAPH_STOP) {
  ------------------
  |  Branch (555:13): [True: 0, False: 0]
  ------------------
  556|      0|            FREE_ALL();
  ------------------
  |  |  522|      0|# define FREE_ALL() do { \
  |  |  523|      0|        igraph_vector_int_destroy(&nptr); \
  |  |  524|      0|        igraph_lazy_adjlist_destroy(&adjlist); \
  |  |  525|      0|        igraph_stack_int_destroy(&stack); \
  |  |  526|      0|        igraph_bitset_destroy(&added); \
  |  |  527|      0|        IGRAPH_FINALLY_CLEAN(4); } while (0)
  |  |  ------------------
  |  |  |  Branch (527:43): [Folded, False: 0]
  |  |  ------------------
  ------------------
  557|      0|            return IGRAPH_SUCCESS;
  558|      0|        }
  559|      0|    }
  560|       |
  561|   340k|    for (igraph_int_t actroot = 0; actroot < no_of_nodes; ) {
  ------------------
  |  Branch (561:36): [True: 338k, False: 2.00k]
  ------------------
  562|       |
  563|       |        /* 'root' first, then all other vertices */
  564|   338k|        if (igraph_stack_int_empty(&stack)) {
  ------------------
  |  Branch (564:13): [True: 334k, False: 4.00k]
  ------------------
  565|   334k|            if (!unreachable) {
  ------------------
  |  Branch (565:17): [True: 2.00k, False: 332k]
  ------------------
  566|  2.00k|                break;
  567|  2.00k|            }
  568|   332k|            if (IGRAPH_BIT_TEST(added, actroot)) {
  ------------------
  |  |  142|   332k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|   332k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   332k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|   332k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   332k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (142:36): [True: 33.0k, False: 299k]
  |  |  ------------------
  ------------------
  569|  33.0k|                actroot++;
  570|  33.0k|                continue;
  571|  33.0k|            }
  572|   299k|            IGRAPH_CHECK(igraph_stack_int_push(&stack, actroot));
  ------------------
  |  |  656|   299k|    do { \
  |  |  657|   299k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   299k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   299k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 299k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   299k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 299k]
  |  |  ------------------
  ------------------
  573|   299k|            IGRAPH_BIT_SET(added, actroot);
  ------------------
  |  |  103|   299k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   299k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|   299k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   299k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|   299k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   299k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  574|   299k|            if (parents) {
  ------------------
  |  Branch (574:17): [True: 299k, False: 0]
  ------------------
  575|   299k|                VECTOR(*parents)[actroot] = -1;
  ------------------
  |  |   60|   299k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  576|   299k|            }
  577|   299k|            if (order) {
  ------------------
  |  Branch (577:17): [True: 299k, False: 0]
  ------------------
  578|   299k|                VECTOR(*order)[act_rank++] = actroot;
  ------------------
  |  |   60|   299k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  579|   299k|            }
  580|   299k|            if (dist) {
  ------------------
  |  Branch (580:17): [True: 299k, False: 0]
  ------------------
  581|   299k|                VECTOR(*dist)[actroot] = 0;
  ------------------
  |  |   60|   299k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  582|   299k|            }
  583|       |
  584|   299k|            if (in_callback) {
  ------------------
  |  Branch (584:17): [True: 0, False: 299k]
  ------------------
  585|      0|                IGRAPH_CHECK_CALLBACK(in_callback(graph, actroot, 0, extra), &ret);
  ------------------
  |  |  689|      0|    do { \
  |  |  690|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  691|      0|        *(code) = igraph_i_ret; \
  |  |  692|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS && igraph_i_ret != IGRAPH_STOP)) { \
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 0, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  693|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  694|      0|        } \
  |  |  695|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (695:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  586|      0|                if (ret == IGRAPH_STOP) {
  ------------------
  |  Branch (586:21): [True: 0, False: 0]
  ------------------
  587|      0|                    FREE_ALL();
  ------------------
  |  |  522|      0|# define FREE_ALL() do { \
  |  |  523|      0|        igraph_vector_int_destroy(&nptr); \
  |  |  524|      0|        igraph_lazy_adjlist_destroy(&adjlist); \
  |  |  525|      0|        igraph_stack_int_destroy(&stack); \
  |  |  526|      0|        igraph_bitset_destroy(&added); \
  |  |  527|      0|        IGRAPH_FINALLY_CLEAN(4); } while (0)
  |  |  ------------------
  |  |  |  Branch (527:43): [Folded, False: 0]
  |  |  ------------------
  ------------------
  588|      0|                    return IGRAPH_SUCCESS;
  589|      0|                }
  590|      0|            }
  591|       |
  592|   299k|            actroot++;
  593|   299k|        }
  594|       |
  595|   714k|        while (!igraph_stack_int_empty(&stack)) {
  ------------------
  |  Branch (595:16): [True: 410k, False: 303k]
  ------------------
  596|   410k|            igraph_int_t actvect = igraph_stack_int_top(&stack);
  597|   410k|            igraph_int_t *ptr = igraph_vector_int_get_ptr(&nptr, actvect);
  598|       |
  599|   410k|            igraph_vector_int_t *neis = igraph_lazy_adjlist_get(&adjlist, actvect);
  ------------------
  |  |  158|   410k|    (igraph_lazy_adjlist_has(al,no) ? ((al)->adjs[(igraph_int_t)(no)]) \
  |  |  ------------------
  |  |  |  |  133|   410k|#define igraph_lazy_adjlist_has(al,no) ((al)->adjs[(igraph_int_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (133:40): [True: 53.6k, False: 357k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  159|   410k|                                    : (igraph_i_lazy_adjlist_get_real(al, no)))
  ------------------
  600|   410k|            IGRAPH_CHECK_OOM(neis, "Failed to query neighbors.");
  ------------------
  |  |  709|   410k|    do { \
  |  |  710|   410k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|   410k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 410k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|   410k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 410k]
  |  |  ------------------
  ------------------
  601|       |
  602|   410k|            const igraph_int_t n = igraph_vector_int_size(neis);
  603|       |
  604|       |            /* Search for a neighbor that was not yet visited */
  605|   410k|            igraph_bool_t any = false;
  606|   410k|            igraph_int_t nei = 0;
  607|   530k|            while (!any && (*ptr) < n) {
  ------------------
  |  Branch (607:20): [True: 477k, False: 53.6k]
  |  Branch (607:28): [True: 119k, False: 357k]
  ------------------
  608|   119k|                nei = VECTOR(*neis)[(*ptr)];
  ------------------
  |  |   60|   119k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  609|   119k|                any = !IGRAPH_BIT_TEST(added, nei);
  ------------------
  |  |  142|   119k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   119k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|   119k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   119k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|   119k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   119k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  610|   119k|                (*ptr) ++;
  611|   119k|            }
  612|   410k|            if (any) {
  ------------------
  |  Branch (612:17): [True: 53.6k, False: 357k]
  ------------------
  613|       |                /* There is such a neighbor, add it */
  614|  53.6k|                IGRAPH_CHECK(igraph_stack_int_push(&stack, nei));
  ------------------
  |  |  656|  53.6k|    do { \
  |  |  657|  53.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  53.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  53.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 53.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  53.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 53.6k]
  |  |  ------------------
  ------------------
  615|  53.6k|                IGRAPH_BIT_SET(added, nei);
  ------------------
  |  |  103|  53.6k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  53.6k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  53.6k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  53.6k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  53.6k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  53.6k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  616|  53.6k|                if (parents) {
  ------------------
  |  Branch (616:21): [True: 53.6k, False: 0]
  ------------------
  617|  53.6k|                    VECTOR(*parents)[ nei ] = actvect;
  ------------------
  |  |   60|  53.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  618|  53.6k|                }
  619|  53.6k|                if (order) {
  ------------------
  |  Branch (619:21): [True: 53.6k, False: 0]
  ------------------
  620|  53.6k|                    VECTOR(*order)[act_rank++] = nei;
  ------------------
  |  |   60|  53.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  621|  53.6k|                }
  622|  53.6k|                act_dist++;
  623|  53.6k|                if (dist) {
  ------------------
  |  Branch (623:21): [True: 31.0k, False: 22.6k]
  ------------------
  624|  31.0k|                    VECTOR(*dist)[nei] = act_dist;
  ------------------
  |  |   60|  31.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  625|  31.0k|                }
  626|       |
  627|  53.6k|                if (in_callback) {
  ------------------
  |  Branch (627:21): [True: 0, False: 53.6k]
  ------------------
  628|      0|                    IGRAPH_CHECK_CALLBACK(
  ------------------
  |  |  689|      0|    do { \
  |  |  690|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  691|      0|        *(code) = igraph_i_ret; \
  |  |  692|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS && igraph_i_ret != IGRAPH_STOP)) { \
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 0, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  693|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  694|      0|        } \
  |  |  695|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (695:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  629|      0|                        in_callback(graph, nei, act_dist, extra),
  630|      0|                        &ret
  631|      0|                    );
  632|      0|                    if (ret == IGRAPH_STOP) {
  ------------------
  |  Branch (632:25): [True: 0, False: 0]
  ------------------
  633|      0|                        FREE_ALL();
  ------------------
  |  |  522|      0|# define FREE_ALL() do { \
  |  |  523|      0|        igraph_vector_int_destroy(&nptr); \
  |  |  524|      0|        igraph_lazy_adjlist_destroy(&adjlist); \
  |  |  525|      0|        igraph_stack_int_destroy(&stack); \
  |  |  526|      0|        igraph_bitset_destroy(&added); \
  |  |  527|      0|        IGRAPH_FINALLY_CLEAN(4); } while (0)
  |  |  ------------------
  |  |  |  Branch (527:43): [Folded, False: 0]
  |  |  ------------------
  ------------------
  634|      0|                        return IGRAPH_SUCCESS;
  635|      0|                    }
  636|      0|                }
  637|       |
  638|   357k|            } else {
  639|       |                /* There is no such neighbor, finished with the subtree */
  640|   357k|                igraph_stack_int_pop(&stack);
  641|   357k|                if (order_out) {
  ------------------
  |  Branch (641:21): [True: 332k, False: 24.6k]
  ------------------
  642|   332k|                    VECTOR(*order_out)[rank_out++] = actvect;
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  643|   332k|                }
  644|   357k|                act_dist--;
  645|       |
  646|   357k|                if (out_callback) {
  ------------------
  |  Branch (646:21): [True: 0, False: 357k]
  ------------------
  647|      0|                    IGRAPH_CHECK_CALLBACK(
  ------------------
  |  |  689|      0|    do { \
  |  |  690|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  691|      0|        *(code) = igraph_i_ret; \
  |  |  692|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS && igraph_i_ret != IGRAPH_STOP)) { \
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 0, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  693|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  694|      0|        } \
  |  |  695|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (695:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  648|      0|                        out_callback(graph, actvect, act_dist, extra),
  649|      0|                        &ret
  650|      0|                    );
  651|       |
  652|      0|                    if (ret == IGRAPH_STOP) {
  ------------------
  |  Branch (652:25): [True: 0, False: 0]
  ------------------
  653|      0|                        FREE_ALL();
  ------------------
  |  |  522|      0|# define FREE_ALL() do { \
  |  |  523|      0|        igraph_vector_int_destroy(&nptr); \
  |  |  524|      0|        igraph_lazy_adjlist_destroy(&adjlist); \
  |  |  525|      0|        igraph_stack_int_destroy(&stack); \
  |  |  526|      0|        igraph_bitset_destroy(&added); \
  |  |  527|      0|        IGRAPH_FINALLY_CLEAN(4); } while (0)
  |  |  ------------------
  |  |  |  Branch (527:43): [Folded, False: 0]
  |  |  ------------------
  ------------------
  654|      0|                        return IGRAPH_SUCCESS;
  655|      0|                    }
  656|      0|                }
  657|   357k|            }
  658|   410k|        }
  659|   303k|    }
  660|       |
  661|  4.00k|    FREE_ALL();
  ------------------
  |  |  522|  4.00k|# define FREE_ALL() do { \
  |  |  523|  4.00k|        igraph_vector_int_destroy(&nptr); \
  |  |  524|  4.00k|        igraph_lazy_adjlist_destroy(&adjlist); \
  |  |  525|  4.00k|        igraph_stack_int_destroy(&stack); \
  |  |  526|  4.00k|        igraph_bitset_destroy(&added); \
  |  |  527|  4.00k|        IGRAPH_FINALLY_CLEAN(4); } while (0)
  |  |  ------------------
  |  |  |  Branch (527:43): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
  662|  4.00k|# undef FREE_ALL
  663|       |
  664|  4.00k|    return IGRAPH_SUCCESS;
  665|  4.00k|}

igraph_qsort:
  264|    588|{
  265|       |	local_qsort(a, n, es, cmp, NULL);
  266|    588|}
qsort.c:local_qsort:
  121|  3.36k|{
  122|  3.36k|	char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
  123|  3.36k|	size_t d1, d2;
  124|  3.36k|	int cmp_result;
  125|  3.36k|	int swap_cnt;
  126|       |
  127|       |    /* if there are less than 2 elements, then sorting is not needed */
  128|  3.36k|    if (IGRAPH_UNLIKELY(n < 2))
  ------------------
  |  |  612|  3.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  ------------------
  |  |  |  Branch (612:32): [True: 0, False: 3.36k]
  |  |  ------------------
  ------------------
  129|      0|        return;
  130|  6.75k|loop:
  131|  6.75k|	swap_cnt = 0;
  132|  6.75k|	if (n < 7) {
  ------------------
  |  Branch (132:6): [True: 3.09k, False: 3.65k]
  ------------------
  133|  12.3k|		for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
  ------------------
  |  Branch (133:29): [True: 9.20k, False: 3.09k]
  ------------------
  134|  9.20k|			for (pl = pm;
  135|  19.7k|			     pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
  ------------------
  |  |   95|  16.6k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (135:9): [True: 16.6k, False: 3.13k]
  |  Branch (135:27): [True: 10.5k, False: 6.06k]
  ------------------
  136|  10.5k|			     pl -= es)
  137|  10.5k|				swapfunc(pl, pl - es, es);
  138|  3.09k|		return;
  139|  3.09k|	}
  140|  3.65k|	pm = (char *)a + (n / 2) * es;
  141|  3.65k|	if (n > 7) {
  ------------------
  |  Branch (141:6): [True: 3.22k, False: 434]
  ------------------
  142|  3.22k|		pl = a;
  143|  3.22k|		pn = (char *)a + (n - 1) * es;
  144|  3.22k|		if (n > 40) {
  ------------------
  |  Branch (144:7): [True: 430, False: 2.79k]
  ------------------
  145|    430|			size_t d = (n / 8) * es;
  146|       |
  147|    430|			pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk);
  148|    430|			pm = med3(pm - d, pm, pm + d, cmp, thunk);
  149|    430|			pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk);
  150|    430|		}
  151|  3.22k|		pm = med3(pl, pm, pn, cmp, thunk);
  152|  3.22k|	}
  153|  3.65k|	swapfunc(a, pm, es);
  154|  3.65k|	pa = pb = (char *)a + es;
  155|       |
  156|  3.65k|	pc = pd = (char *)a + (n - 1) * es;
  157|  16.2k|	for (;;) {
  158|  37.3k|		while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) {
  ------------------
  |  |   95|  35.6k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (158:10): [True: 35.6k, False: 1.67k]
  |  Branch (158:22): [True: 21.0k, False: 14.5k]
  ------------------
  159|  21.0k|			if (cmp_result == 0) {
  ------------------
  |  Branch (159:8): [True: 0, False: 21.0k]
  ------------------
  160|      0|				swap_cnt = 1;
  161|      0|				swapfunc(pa, pb, es);
  162|      0|				pa += es;
  163|      0|			}
  164|  21.0k|			pb += es;
  165|  21.0k|		}
  166|  41.2k|		while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) {
  ------------------
  |  |   95|  37.5k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (166:10): [True: 37.5k, False: 3.65k]
  |  Branch (166:22): [True: 24.9k, False: 12.5k]
  ------------------
  167|  24.9k|			if (cmp_result == 0) {
  ------------------
  |  Branch (167:8): [True: 0, False: 24.9k]
  ------------------
  168|      0|				swap_cnt = 1;
  169|      0|				swapfunc(pc, pd, es);
  170|      0|				pd -= es;
  171|      0|			}
  172|  24.9k|			pc -= es;
  173|  24.9k|		}
  174|  16.2k|		if (pb > pc)
  ------------------
  |  Branch (174:7): [True: 3.65k, False: 12.5k]
  ------------------
  175|  3.65k|			break;
  176|  12.5k|		swapfunc(pb, pc, es);
  177|  12.5k|		swap_cnt = 1;
  178|  12.5k|		pb += es;
  179|  12.5k|		pc -= es;
  180|  12.5k|	}
  181|  3.65k|	if (swap_cnt == 0) {  /* Switch to insertion sort */
  ------------------
  |  Branch (181:6): [True: 269, False: 3.38k]
  ------------------
  182|  2.73k|		for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
  ------------------
  |  Branch (182:29): [True: 2.46k, False: 269]
  ------------------
  183|  2.46k|			for (pl = pm;
  184|  8.77k|			     pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
  ------------------
  |  |   95|  8.16k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (184:9): [True: 8.16k, False: 610]
  |  Branch (184:27): [True: 6.30k, False: 1.85k]
  ------------------
  185|  6.30k|			     pl -= es)
  186|  6.30k|				swapfunc(pl, pl - es, es);
  187|    269|		return;
  188|    269|	}
  189|       |
  190|  3.38k|	pn = (char *)a + n * es;
  191|  3.38k|	d1 = MIN(pa - (char *)a, pb - pa);
  ------------------
  |  |   69|  3.38k|#define	MIN(a, b)	((a) < (b) ? a : b)
  |  |  ------------------
  |  |  |  Branch (69:20): [True: 2.93k, False: 450]
  |  |  ------------------
  ------------------
  192|  3.38k|	vecswap(a, pb - d1, d1);
  ------------------
  |  |   88|  3.38k|	if ((n) > 0) swapfunc(a, b, n)
  |  |  ------------------
  |  |  |  Branch (88:6): [True: 3.38k, False: 0]
  |  |  ------------------
  ------------------
  193|       |	/*
  194|       |	 * Cast es to preserve signedness of right-hand side of MIN()
  195|       |	 * expression, to avoid sign ambiguity in the implied comparison.  es
  196|       |	 * is safely within [0, SSIZE_MAX].
  197|       |	 */
  198|  3.38k|	d1 = MIN(pd - pc, pn - pd - (ptrdiff_t)es);
  ------------------
  |  |   69|  3.38k|#define	MIN(a, b)	((a) < (b) ? a : b)
  |  |  ------------------
  |  |  |  Branch (69:20): [True: 0, False: 3.38k]
  |  |  ------------------
  ------------------
  199|  3.38k|	vecswap(pb, pn - d1, d1);
  ------------------
  |  |   88|  3.38k|	if ((n) > 0) swapfunc(a, b, n)
  |  |  ------------------
  |  |  |  Branch (88:6): [True: 0, False: 3.38k]
  |  |  ------------------
  ------------------
  200|       |
  201|  3.38k|	d1 = pb - pa;
  202|  3.38k|	d2 = pd - pc;
  203|  3.38k|	if (d1 <= d2) {
  ------------------
  |  Branch (203:6): [True: 1.93k, False: 1.45k]
  ------------------
  204|       |		/* Recurse on left partition, then iterate on right partition */
  205|  1.93k|		if (d1 > es) {
  ------------------
  |  Branch (205:7): [True: 1.48k, False: 450]
  ------------------
  206|  1.48k|			local_qsort(a, d1 / es, es, cmp, thunk);
  207|  1.48k|		}
  208|  1.93k|		if (d2 > es) {
  ------------------
  |  Branch (208:7): [True: 1.93k, False: 0]
  ------------------
  209|       |			/* Iterate rather than recurse to save stack space */
  210|       |			/* qsort(pn - d2, d2 / es, es, cmp); */
  211|  1.93k|			a = pn - d2;
  212|  1.93k|			n = d2 / es;
  213|  1.93k|			goto loop;
  214|  1.93k|		}
  215|  1.93k|	} else {
  216|       |		/* Recurse on right partition, then iterate on left partition */
  217|  1.45k|		if (d2 > es) {
  ------------------
  |  Branch (217:7): [True: 1.29k, False: 158]
  ------------------
  218|  1.29k|			local_qsort(pn - d2, d2 / es, es, cmp, thunk);
  219|  1.29k|		}
  220|  1.45k|		if (d1 > es) {
  ------------------
  |  Branch (220:7): [True: 1.45k, False: 0]
  ------------------
  221|       |			/* Iterate rather than recurse to save stack space */
  222|       |			/* qsort(a, d1 / es, es, cmp); */
  223|  1.45k|			n = d1 / es;
  224|  1.45k|			goto loop;
  225|  1.45k|		}
  226|  1.45k|	}
  227|  3.38k|}
qsort.c:swapfunc:
   77|  36.5k|{
   78|  36.5k|	char t;
   79|       |
   80|   292k|	do {
   81|   292k|		t = *a;
   82|   292k|		*a++ = *b;
   83|   292k|		*b++ = t;
   84|   292k|	} while (--es > 0);
  ------------------
  |  Branch (84:11): [True: 255k, False: 36.5k]
  ------------------
   85|  36.5k|}
qsort.c:med3:
  104|  4.51k|{
  105|  4.51k|	return CMP(thunk, a, b) < 0 ?
  ------------------
  |  |   95|  4.51k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (105:9): [True: 2.51k, False: 2.00k]
  ------------------
  106|  2.51k|	       (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
  ------------------
  |  |   95|  2.51k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
              	       (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
  ------------------
  |  |   95|  1.66k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (106:10): [True: 844, False: 1.66k]
  |  Branch (106:38): [True: 780, False: 888]
  ------------------
  107|  4.51k|	      :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
  ------------------
  |  |   95|  2.00k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
              	      :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
  ------------------
  |  |   95|  1.35k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (107:10): [True: 647, False: 1.35k]
  |  Branch (107:38): [True: 644, False: 709]
  ------------------
  108|  4.51k|}

igraph_i_safe_vector_int_sum:
   35|  36.0k|igraph_error_t igraph_i_safe_vector_int_sum(const igraph_vector_int_t *vec, igraph_int_t *res) {
   36|  36.0k|    const igraph_int_t n = igraph_vector_int_size(vec);
   37|  36.0k|    igraph_int_t sum = 0;
   38|  6.02M|    for (igraph_int_t i=0; i < n; ++i) {
  ------------------
  |  Branch (38:28): [True: 5.98M, False: 36.0k]
  ------------------
   39|  5.98M|        IGRAPH_SAFE_ADD(sum, VECTOR(*vec)[i], &sum);
  ------------------
  |  |   47|  5.98M|    do { \
  |  |   48|  5.98M|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  5.98M|        igraph_int_t _safe_sum; \
  |  |   50|  5.98M|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 5.98M]
  |  |  ------------------
  |  |   51|      0|            IGRAPH_ERRORF("Overflow when adding %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  464|      0|    do { \
  |  |  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  467|      0|        return igraph_errno; \
  |  |  |  |  468|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|        } \
  |  |   53|  5.98M|        *(res) = _safe_sum; \
  |  |   54|  5.98M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded, False: 5.98M]
  |  |  ------------------
  ------------------
   40|  5.98M|    }
   41|  36.0k|    *res = sum;
   42|  36.0k|    return IGRAPH_SUCCESS;
   43|  36.0k|}

igraph_get_edgelist:
  327|    716|igraph_error_t igraph_get_edgelist(const igraph_t *graph, igraph_vector_int_t *res, igraph_bool_t bycol) {
  328|    716|    return igraph_edges(graph, igraph_ess_all(IGRAPH_EDGEORDER_ID), res, bycol);
  329|    716|}

igraph_realize_degree_sequence:
 1011|  6.00k|{
 1012|  6.00k|    bool directed = indeg != NULL;
 1013|       |
 1014|  6.00k|    if (directed) {
  ------------------
  |  Branch (1014:9): [True: 6.00k, False: 0]
  ------------------
 1015|  6.00k|        return igraph_i_realize_directed_degree_sequence(graph, outdeg, indeg, allowed_edge_types, method);
 1016|  6.00k|    } else {
 1017|      0|        return igraph_i_realize_undirected_degree_sequence(graph, outdeg, allowed_edge_types, method);
 1018|      0|    }
 1019|  6.00k|}
igraph_realize_bipartite_degree_sequence:
 1187|  12.0k|) {
 1188|  12.0k|    IGRAPH_HANDLE_EXCEPTIONS_BEGIN;
  ------------------
  |  |   21|  12.0k|    try {
  ------------------
 1189|       |
 1190|  12.0k|    igraph_int_t ec = 0; // The number of edges added so far
 1191|  12.0k|    igraph_int_t n1 = igraph_vector_int_size(degrees1);
 1192|  12.0k|    igraph_int_t n2 = igraph_vector_int_size(degrees2);
 1193|  12.0k|    igraph_vector_int_t edges;
 1194|  12.0k|    igraph_int_t ds1_sum;
 1195|  12.0k|    igraph_int_t ds2_sum;
 1196|  12.0k|    igraph_bool_t multiedges;
 1197|  12.0k|    igraph_bool_t largest;
 1198|  12.0k|    std::vector<vd_pair> vertices1;
 1199|  12.0k|    std::vector<vd_pair> vertices2;
 1200|       |
 1201|       |    // Bipartite graphs can't have self loops, so we ignore those.
 1202|  12.0k|    if (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) {
  ------------------
  |  |   25|  12.0k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (1202:9): [True: 6.00k, False: 6.00k]
  ------------------
 1203|       |        // Multiedges allowed
 1204|  6.00k|        multiedges = true;
 1205|  6.00k|    } else {
 1206|       |        // No multiedges
 1207|  6.00k|        multiedges = false;
 1208|  6.00k|    }
 1209|       |
 1210|  12.0k|    switch (method) {
 1211|  4.00k|    case IGRAPH_REALIZE_DEGSEQ_SMALLEST:
  ------------------
  |  Branch (1211:5): [True: 4.00k, False: 8.01k]
  ------------------
 1212|  4.00k|        largest = false;
 1213|  4.00k|        break;
 1214|  4.00k|    case IGRAPH_REALIZE_DEGSEQ_LARGEST:
  ------------------
  |  Branch (1214:5): [True: 4.00k, False: 8.01k]
  ------------------
 1215|  4.00k|        largest = true;
 1216|  4.00k|        break;
 1217|  4.00k|    case IGRAPH_REALIZE_DEGSEQ_INDEX:
  ------------------
  |  Branch (1217:5): [True: 4.00k, False: 8.01k]
  ------------------
 1218|  4.00k|        return igraph_i_realize_undirected_bipartite_index(graph, degrees1, degrees2, multiedges);
 1219|      0|    default:
  ------------------
  |  Branch (1219:5): [True: 0, False: 12.0k]
  ------------------
 1220|      0|        IGRAPH_ERROR("Invalid bipartite degree sequence realization method.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1221|  12.0k|    }
 1222|       |
 1223|  8.01k|    IGRAPH_CHECK(igraph_i_safe_vector_int_sum(degrees1, &ds1_sum));
  ------------------
  |  |  656|  8.01k|    do { \
  |  |  657|  8.01k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  8.01k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  8.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  8.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 8.01k]
  |  |  ------------------
  ------------------
 1224|  8.01k|    IGRAPH_CHECK(igraph_i_safe_vector_int_sum(degrees2, &ds2_sum));
  ------------------
  |  |  656|  8.01k|    do { \
  |  |  657|  8.01k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  8.01k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  8.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  8.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 8.01k]
  |  |  ------------------
  ------------------
 1225|       |
 1226|       |    // Degree sequences of the two partitions must sum to the same value
 1227|  8.01k|    if (ds1_sum != ds2_sum) {
  ------------------
  |  Branch (1227:9): [True: 0, False: 8.01k]
  ------------------
 1228|      0|        goto fail;
 1229|      0|    }
 1230|       |
 1231|       |    // If both degree sequences are empty, it's bigraphical
 1232|  8.01k|    if (!(n1 == 0 && n2 == 0)) {
  ------------------
  |  Branch (1232:11): [True: 4, False: 8.00k]
  |  Branch (1232:22): [True: 4, False: 0]
  ------------------
 1233|  8.00k|        if (igraph_vector_int_min(degrees1) < 0 || igraph_vector_int_min(degrees2) < 0) {
  ------------------
  |  Branch (1233:13): [True: 0, False: 8.00k]
  |  Branch (1233:52): [True: 0, False: 8.00k]
  ------------------
 1234|      0|            goto fail;
 1235|      0|        }
 1236|  8.00k|    }
 1237|       |
 1238|  8.01k|    vertices1.reserve(n1);
 1239|  8.01k|    vertices2.reserve(n2);
 1240|       |
 1241|  1.33M|    for (igraph_int_t i = 0; i < n1; i++) {
  ------------------
  |  Branch (1241:30): [True: 1.33M, False: 8.01k]
  ------------------
 1242|  1.33M|        vertices1.push_back(vd_pair(i, VECTOR(*degrees1)[i]));
  ------------------
  |  |   60|  1.33M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1243|  1.33M|    }
 1244|  1.33M|    for (igraph_int_t i = 0; i < n2; i++) {
  ------------------
  |  Branch (1244:30): [True: 1.33M, False: 8.01k]
  ------------------
 1245|  1.33M|        vertices2.push_back(vd_pair(i + n1, VECTOR(*degrees2)[i]));
  ------------------
  |  |   60|  1.33M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1246|  1.33M|    }
 1247|       |
 1248|  8.01k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, ds1_sum + ds2_sum);
  ------------------
  |  |  119|  8.01k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  8.01k|    do { \
  |  |  |  |  657|  8.01k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  8.01k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  8.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.01k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  8.01k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 8.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  8.01k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  8.01k|    do { \
  |  |  |  |  604|  8.01k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  8.01k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  8.01k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  8.01k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 8.01k]
  |  |  |  |  ------------------
  |  |  |  |  608|  8.01k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  8.01k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 8.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 8.01k]
  |  |  ------------------
  ------------------
 1249|       |
 1250|       |
 1251|  8.01k|    std::vector<vd_pair> *src_vs;
 1252|  8.01k|    std::vector<vd_pair> *dest_vs;
 1253|       |
 1254|  1.99M|    while (!vertices1.empty() && !vertices2.empty()) {
  ------------------
  |  Branch (1254:12): [True: 1.98M, False: 7.13k]
  |  Branch (1254:34): [True: 1.98M, False: 1]
  ------------------
 1255|       |        // Sort in non-increasing order.
 1256|       |        // Note: for the smallest method, we can skip sorting the smaller ds, minor optimization.
 1257|       |        // (i.e., we only need to sort the dest partition, since we always just remove the back of the min partition)
 1258|  1.98M|        std::stable_sort(vertices1.begin(), vertices1.end(), degree_greater<vd_pair>);
 1259|  1.98M|        std::stable_sort(vertices2.begin(), vertices2.end(), degree_greater<vd_pair>);
 1260|       |
 1261|  1.98M|        vd_pair vd_src(-1, -1);
 1262|       |
 1263|  1.98M|        if (!largest) {
  ------------------
  |  Branch (1263:13): [True: 1.32M, False: 666k]
  ------------------
 1264|  1.32M|            vd_pair min1 = vertices1.back();
 1265|  1.32M|            vd_pair min2 = vertices2.back();
 1266|  1.32M|            if (min1.degree <= min2.degree) {
  ------------------
  |  Branch (1266:17): [True: 684k, False: 636k]
  ------------------
 1267|   684k|                src_vs = &vertices1;
 1268|   684k|                dest_vs = &vertices2;
 1269|   684k|            } else {
 1270|   636k|                src_vs = &vertices2;
 1271|   636k|                dest_vs = &vertices1;
 1272|   636k|            }
 1273|       |
 1274|  1.32M|            vd_src = src_vs->back();
 1275|       |
 1276|  1.32M|        } else {
 1277|   666k|            vd_pair max1 = vertices1.front();
 1278|   666k|            vd_pair max2 = vertices2.front();
 1279|       |
 1280|   666k|            if (max1.degree >= max2.degree) {
  ------------------
  |  Branch (1280:17): [True: 653k, False: 13.7k]
  ------------------
 1281|   653k|                src_vs = &vertices1;
 1282|   653k|                dest_vs = &vertices2;
 1283|   653k|            } else {
 1284|  13.7k|                src_vs = &vertices2;
 1285|  13.7k|                dest_vs = &vertices1;
 1286|  13.7k|            }
 1287|       |
 1288|   666k|            vd_src = src_vs->front();
 1289|   666k|        }
 1290|       |
 1291|  1.98M|        IGRAPH_ASSERT(vd_src.degree >= 0);
  ------------------
  |  |  924|  1.98M|    do { \
  |  |  925|  1.98M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.98M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.98M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.98M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.98M]
  |  |  ------------------
  ------------------
 1292|       |
 1293|  1.98M|        if (!multiedges) {
  ------------------
  |  Branch (1293:13): [True: 940k, False: 1.04M]
  ------------------
 1294|       |            // Remove the smallest element
 1295|   940k|            if (!largest) {
  ------------------
  |  Branch (1295:17): [True: 649k, False: 291k]
  ------------------
 1296|   649k|                src_vs->pop_back();
 1297|   649k|            } else {
 1298|       |                // Remove the largest element.
 1299|   291k|                src_vs->erase(src_vs->begin());
 1300|   291k|            }
 1301|       |
 1302|   940k|            if (vd_src.degree == 0) {
  ------------------
  |  Branch (1302:17): [True: 858k, False: 82.1k]
  ------------------
 1303|   858k|                continue;
 1304|   858k|            }
 1305|  82.1k|            if (dest_vs->size() < size_t(vd_src.degree)) {
  ------------------
  |  Branch (1305:17): [True: 652, False: 81.4k]
  ------------------
 1306|    652|                goto fail;
 1307|    652|            }
 1308|   189k|            for (igraph_int_t i = 0; i < vd_src.degree; i++) {
  ------------------
  |  Branch (1308:38): [True: 108k, False: 81.2k]
  ------------------
 1309|       |                // Decrement the degree of the delta largest vertices in the opposite partition
 1310|       |
 1311|   108k|                if ((*dest_vs)[i].degree == 0) {
  ------------------
  |  Branch (1311:21): [True: 226, False: 108k]
  ------------------
 1312|       |                    // Not enough non-zero remaining degree vertices in opposite partition.
 1313|       |                    // Not graphical.
 1314|    226|                    goto fail;
 1315|    226|                }
 1316|       |
 1317|   108k|                (*dest_vs)[i].degree--;
 1318|       |
 1319|   108k|                VECTOR(edges)[2 * (ec + i)]     = vd_src.vertex;
  ------------------
  |  |   60|   108k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1320|   108k|                VECTOR(edges)[2 * (ec + i) + 1] = (*dest_vs)[i].vertex;
  ------------------
  |  |   60|   108k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1321|   108k|            }
 1322|  81.2k|            ec += vd_src.degree;
 1323|  81.2k|        }
 1324|       |        // If multiedges are allowed
 1325|  1.04M|        else {
 1326|       |            // The smallest degree is in the back, and we know it is in vertices1
 1327|       |            // If this is the last edge to be created from this vertex, we remove it.
 1328|  1.04M|            if (!largest) {
  ------------------
  |  Branch (1328:17): [True: 671k, False: 375k]
  ------------------
 1329|   671k|                if (src_vs->back().degree <= 1) {
  ------------------
  |  Branch (1329:21): [True: 649k, False: 21.6k]
  ------------------
 1330|   649k|                    src_vs->pop_back();
 1331|   649k|                } else {
 1332|       |                    // Otherwise we decrement its degrees by 1 for the edge we are about to create.
 1333|  21.6k|                    src_vs->back().degree--;
 1334|  21.6k|                }
 1335|   671k|            } else {
 1336|   375k|                if (src_vs->front().degree <= 1) {
  ------------------
  |  Branch (1336:21): [True: 332k, False: 42.7k]
  ------------------
 1337|   332k|                    src_vs->erase(src_vs->begin());
 1338|   332k|                } else {
 1339|  42.7k|                    src_vs->front().degree--;
 1340|  42.7k|                }
 1341|   375k|            }
 1342|       |
 1343|  1.04M|            if (vd_src.degree == 0) {
  ------------------
  |  Branch (1343:17): [True: 897k, False: 149k]
  ------------------
 1344|   897k|                continue;
 1345|   897k|            }
 1346|       |
 1347|   149k|            if (dest_vs->size() < size_t(1)) {
  ------------------
  |  Branch (1347:17): [True: 0, False: 149k]
  ------------------
 1348|      0|                goto fail;
 1349|      0|            }
 1350|       |            // We should never decrement below zero, but check just in case.
 1351|   149k|            IGRAPH_ASSERT((*dest_vs)[0].degree - 1 >= 0);
  ------------------
  |  |  924|   149k|    do { \
  |  |  925|   149k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   149k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 149k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   149k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 149k]
  |  |  ------------------
  ------------------
 1352|       |
 1353|       |            // Connect to the opposite partition
 1354|   149k|            (*dest_vs)[0].degree--;
 1355|       |
 1356|   149k|            VECTOR(edges)[2 * ec] = vd_src.vertex;
  ------------------
  |  |   60|   149k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1357|   149k|            VECTOR(edges)[2 * ec + 1] = (*dest_vs)[0].vertex;
  ------------------
  |  |   60|   149k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1358|   149k|            ec++;
 1359|   149k|        }
 1360|  1.98M|    }
 1361|  7.13k|    IGRAPH_CHECK(igraph_create(graph, &edges, n1 + n2, IGRAPH_UNDIRECTED));
  ------------------
  |  |  656|  7.13k|    do { \
  |  |  657|  7.13k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  7.13k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  7.13k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.13k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  7.13k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 7.13k]
  |  |  ------------------
  ------------------
 1362|       |
 1363|  7.13k|    igraph_vector_int_destroy(&edges);
 1364|  7.13k|    IGRAPH_FINALLY_CLEAN(1);
 1365|       |
 1366|  7.13k|    return IGRAPH_SUCCESS;
 1367|       |
 1368|    878|fail:
 1369|    878|    IGRAPH_ERRORF("The given bidegree sequence cannot be realized as a bipartite %sgraph.",
  ------------------
  |  |  464|    878|    do { \
  |  |  465|    878|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  466|  1.75k|                      igraph_errno, __VA_ARGS__) ; \
  |  |  ------------------
  |  |  |  Branch (466:37): [True: 0, False: 878]
  |  |  ------------------
  |  |  467|    878|        return igraph_errno; \
  |  |  468|    878|    } while (0)
  |  |  ------------------
  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1370|    878|                  IGRAPH_EINVAL, multiedges ? "multi" : "simple ");
 1371|       |
 1372|    878|    IGRAPH_HANDLE_EXCEPTIONS_END;
  ------------------
  |  |   23|    878|    } \
  |  |   24|  12.0k|    catch (const std::bad_alloc &e) { IGRAPH_ERROR(e.what(), IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ } \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   25|  12.0k|    catch (const std::range_error &e) { IGRAPH_ERROR(e.what(), IGRAPH_EOVERFLOW); /* LCOV_EXCL_LINE */ } \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   26|  12.0k|    catch (const std::exception &e) { IGRAPH_ERROR(e.what(), IGRAPH_FAILURE); /* LCOV_EXCL_LINE */ } \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|  12.0k|    catch (...) { IGRAPH_ERROR("Unknown exception caught.", IGRAPH_FAILURE); /* LCOV_EXCL_LINE */ }
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1373|      0|}
degree_sequence.cpp:_ZL41igraph_i_realize_directed_degree_sequenceP8igraph_tPK19igraph_vector_int_tS3_j23igraph_realize_degseq_t:
  820|  6.00k|    igraph_realize_degseq_t method) {
  821|  6.00k|    igraph_int_t node_count = igraph_vector_int_size(outdeg);
  822|  6.00k|    igraph_int_t edge_count, edge_count2, indeg_sum;
  823|       |
  824|  6.00k|    IGRAPH_CHECK(igraph_i_safe_vector_int_sum(outdeg, &edge_count));
  ------------------
  |  |  656|  6.00k|    do { \
  |  |  657|  6.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  6.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  6.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  6.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 6.00k]
  |  |  ------------------
  ------------------
  825|       |
  826|  6.00k|    if (igraph_vector_int_size(indeg) != node_count) {
  ------------------
  |  Branch (826:9): [True: 0, False: 6.00k]
  ------------------
  827|      0|        IGRAPH_ERROR("In- and out-degree sequences must have the same length.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  828|      0|    }
  829|       |
  830|  6.00k|    IGRAPH_CHECK(igraph_i_safe_vector_int_sum(indeg, &indeg_sum));
  ------------------
  |  |  656|  6.00k|    do { \
  |  |  657|  6.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  6.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  6.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  6.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 6.00k]
  |  |  ------------------
  ------------------
  831|  6.00k|    if (indeg_sum != edge_count) {
  ------------------
  |  Branch (831:9): [True: 0, False: 6.00k]
  ------------------
  832|      0|        IGRAPH_ERROR("In- and out-degree sequences do not sum to the same value.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  833|      0|    }
  834|       |
  835|  6.00k|    if (node_count > 0 && (igraph_vector_int_min(outdeg) < 0 || igraph_vector_int_min(indeg) < 0)) {
  ------------------
  |  Branch (835:9): [True: 6.00k, False: 3]
  |  Branch (835:28): [True: 0, False: 6.00k]
  |  Branch (835:65): [True: 0, False: 6.00k]
  ------------------
  836|      0|        IGRAPH_ERROR("Vertex degrees must be non-negative.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  837|      0|    }
  838|       |
  839|       |    /* TODO implement loopless and loopy multigraph case */
  840|  6.00k|    if (allowed_edge_types != IGRAPH_SIMPLE_SW) {
  ------------------
  |  Branch (840:9): [True: 0, False: 6.00k]
  ------------------
  841|      0|        IGRAPH_ERROR("Realizing directed degree sequences as non-simple graphs is not implemented.", IGRAPH_UNIMPLEMENTED);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  842|      0|    }
  843|       |
  844|  6.00k|    igraph_vector_int_t edges;
  845|  6.00k|    IGRAPH_SAFE_MULT(edge_count, 2, &edge_count2);
  ------------------
  |  |   57|  6.00k|    do { \
  |  |   58|  6.00k|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   59|  6.00k|        igraph_int_t _safe_prod; \
  |  |   60|  6.00k|        if (__builtin_mul_overflow(_safe_a, _safe_b, &_safe_prod)) { \
  |  |  ------------------
  |  |  |  Branch (60:13): [True: 0, False: 6.00k]
  |  |  ------------------
  |  |   61|      0|            IGRAPH_ERRORF("Overflow when multiplying %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  464|      0|    do { \
  |  |  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  467|      0|        return igraph_errno; \
  |  |  |  |  468|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|      0|        } \
  |  |   63|  6.00k|        *(res) = _safe_prod; \
  |  |   64|  6.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (64:14): [Folded, False: 6.00k]
  |  |  ------------------
  ------------------
  846|  6.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, edge_count2);
  ------------------
  |  |  119|  6.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  6.00k|    do { \
  |  |  |  |  657|  6.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  6.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  6.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  6.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 6.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  6.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  6.00k|    do { \
  |  |  |  |  604|  6.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  6.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  6.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  6.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 6.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  6.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  6.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 6.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 6.00k]
  |  |  ------------------
  ------------------
  847|       |
  848|  6.00k|    IGRAPH_HANDLE_EXCEPTIONS_BEGIN;
  ------------------
  |  |   21|  6.00k|    try {
  ------------------
  849|  6.00k|    switch (method) {
  850|  2.00k|    case IGRAPH_REALIZE_DEGSEQ_SMALLEST:
  ------------------
  |  Branch (850:5): [True: 2.00k, False: 4.00k]
  ------------------
  851|  2.00k|        IGRAPH_CHECK(igraph_i_kleitman_wang(outdeg, indeg, &edges, true));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 584, False: 1.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|    584|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|    584|    do { \
  |  |  |  |  427|    584|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|    584|        return igraph_errno ; \
  |  |  |  |  429|    584|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|    584|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.41k]
  |  |  ------------------
  ------------------
  852|  1.41k|        break;
  853|  2.00k|    case IGRAPH_REALIZE_DEGSEQ_LARGEST:
  ------------------
  |  Branch (853:5): [True: 2.00k, False: 4.00k]
  ------------------
  854|  2.00k|        IGRAPH_CHECK(igraph_i_kleitman_wang(outdeg, indeg, &edges, false));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 584, False: 1.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|    584|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|    584|    do { \
  |  |  |  |  427|    584|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|    584|        return igraph_errno ; \
  |  |  |  |  429|    584|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|    584|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.41k]
  |  |  ------------------
  ------------------
  855|  1.41k|        break;
  856|  2.00k|    case IGRAPH_REALIZE_DEGSEQ_INDEX:
  ------------------
  |  Branch (856:5): [True: 2.00k, False: 4.00k]
  ------------------
  857|  2.00k|        IGRAPH_CHECK(igraph_i_kleitman_wang_index(outdeg, indeg, &edges));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 584, False: 1.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|    584|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|    584|    do { \
  |  |  |  |  427|    584|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|    584|        return igraph_errno ; \
  |  |  |  |  429|    584|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|    584|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.41k]
  |  |  ------------------
  ------------------
  858|  1.41k|        break;
  859|  1.41k|    default:
  ------------------
  |  Branch (859:5): [True: 0, False: 6.00k]
  ------------------
  860|      0|        IGRAPH_ERROR("Invalid directed degree sequence realization method.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  861|  6.00k|    }
  862|  6.00k|    IGRAPH_HANDLE_EXCEPTIONS_END;
  ------------------
  |  |   23|  6.00k|    } \
  |  |   24|  6.00k|    catch (const std::bad_alloc &e) { IGRAPH_ERROR(e.what(), IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ } \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   25|  6.00k|    catch (const std::range_error &e) { IGRAPH_ERROR(e.what(), IGRAPH_EOVERFLOW); /* LCOV_EXCL_LINE */ } \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   26|  6.00k|    catch (const std::exception &e) { IGRAPH_ERROR(e.what(), IGRAPH_FAILURE); /* LCOV_EXCL_LINE */ } \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|  6.00k|    catch (...) { IGRAPH_ERROR("Unknown exception caught.", IGRAPH_FAILURE); /* LCOV_EXCL_LINE */ }
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  863|       |
  864|  4.25k|    IGRAPH_CHECK(igraph_create(graph, &edges, node_count, true));
  ------------------
  |  |  656|  4.25k|    do { \
  |  |  657|  4.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.25k]
  |  |  ------------------
  ------------------
  865|       |
  866|  4.25k|    igraph_vector_int_destroy(&edges);
  867|  4.25k|    IGRAPH_FINALLY_CLEAN(1);
  868|       |
  869|  4.25k|    return IGRAPH_SUCCESS;
  870|  4.25k|}
degree_sequence.cpp:_ZL22igraph_i_kleitman_wangPK19igraph_vector_int_tS1_PS_b:
  581|  4.00k|static igraph_error_t igraph_i_kleitman_wang(const igraph_vector_int_t *outdeg, const igraph_vector_int_t *indeg, igraph_vector_int_t *edges, bool smallest) {
  582|  4.00k|    igraph_int_t n = igraph_vector_int_size(indeg); // number of vertices
  583|       |
  584|  4.00k|    igraph_int_t ec = 0; // number of edges added so far
  585|       |
  586|  4.00k|    std::vector<vbd_pair> vertices;
  587|  4.00k|    vertices.reserve(n);
  588|   669k|    for (igraph_int_t i = 0; i < n; ++i) {
  ------------------
  |  Branch (588:30): [True: 665k, False: 4.00k]
  ------------------
  589|   665k|        vertices.push_back(vbd_pair(i, bidegree(VECTOR(*indeg)[i], VECTOR(*outdeg)[i])));
  ------------------
  |  |   60|   665k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      vertices.push_back(vbd_pair(i, bidegree(VECTOR(*indeg)[i], VECTOR(*outdeg)[i])));
  ------------------
  |  |   60|   665k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  590|   665k|    }
  591|       |
  592|  76.4k|    while (true) {
  ------------------
  |  Branch (592:12): [True: 76.4k, Folded]
  ------------------
  593|       |        // sort vertices by (in, out) degree pairs in decreasing order
  594|       |        // O(V log V)
  595|  76.4k|        std::stable_sort(vertices.begin(), vertices.end(), degree_greater<vbd_pair>);
  596|       |
  597|       |        // remove (0,0)-degree vertices
  598|   734k|        while (!vertices.empty() && vertices.back().degree == bidegree(0, 0)) {
  ------------------
  |  Branch (598:16): [True: 731k, False: 2.83k]
  |  Branch (598:16): [True: 658k, False: 76.4k]
  |  Branch (598:37): [True: 658k, False: 73.5k]
  ------------------
  599|   658k|            vertices.pop_back();
  600|   658k|        }
  601|       |
  602|       |        // if no vertices remain, stop
  603|  76.4k|        if (vertices.empty()) {
  ------------------
  |  Branch (603:13): [True: 2.83k, False: 73.5k]
  ------------------
  604|  2.83k|            break;
  605|  2.83k|        }
  606|       |
  607|       |        // choose a vertex the out-stubs of which will be connected
  608|       |        // note: a vertex with non-zero out-degree is guaranteed to exist
  609|       |        // because there are _some_ non-zero degrees and the sum of in- and out-degrees
  610|       |        // is the same
  611|  73.5k|        vbd_pair *vdp;
  612|       |        // O(V)
  613|  73.5k|        if (smallest) {
  ------------------
  |  Branch (613:13): [True: 37.5k, False: 36.0k]
  ------------------
  614|  37.5k|            vdp = &*std::find_if(vertices.rbegin(), vertices.rend(), is_nonzero_outdeg);
  615|  37.5k|        } else {
  616|  36.0k|            vdp = &*std::find_if(vertices.begin(), vertices.end(), is_nonzero_outdeg);
  617|  36.0k|        }
  618|       |
  619|       |        // are there a sufficient number of other vertices to connect to?
  620|  73.5k|        if (static_cast<igraph_int_t>(vertices.size()) - 1 < vdp->degree.second) {
  ------------------
  |  Branch (620:13): [True: 1.06k, False: 72.5k]
  ------------------
  621|  1.06k|            goto fail;
  622|  1.06k|        }
  623|       |
  624|       |        // create the connections
  625|  72.5k|        igraph_int_t k = 0;
  626|  72.5k|        for (auto it = vertices.begin();
  627|   187k|             k < vdp->degree.second;
  ------------------
  |  Branch (627:14): [True: 115k, False: 72.4k]
  ------------------
  628|   115k|             ++it) {
  629|   115k|            if (it->vertex == vdp->vertex) {
  ------------------
  |  Branch (629:17): [True: 12.0k, False: 103k]
  ------------------
  630|  12.0k|                continue;    // do not create a self-loop
  631|  12.0k|            }
  632|   103k|            if (--(it->degree.first) < 0) {
  ------------------
  |  Branch (632:17): [True: 108, False: 102k]
  ------------------
  633|    108|                goto fail;
  634|    108|            }
  635|       |
  636|   102k|            VECTOR(*edges)[2 * (ec + k)] = vdp->vertex;
  ------------------
  |  |   60|   102k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  637|   102k|            VECTOR(*edges)[2 * (ec + k) + 1] = it->vertex;
  ------------------
  |  |   60|   102k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  638|       |
  639|   102k|            k++;
  640|   102k|        }
  641|       |
  642|  72.4k|        ec += vdp->degree.second;
  643|  72.4k|        vdp->degree.second = 0;
  644|  72.4k|    }
  645|       |
  646|  2.83k|    return IGRAPH_SUCCESS;
  647|       |
  648|  1.16k|fail:
  649|  1.16k|    IGRAPH_ERROR("The given directed degree sequences cannot be realized as a simple graph.", IGRAPH_EINVAL);
  ------------------
  |  |  426|  1.16k|    do { \
  |  |  427|  1.16k|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|  1.16k|        return igraph_errno ; \
  |  |  429|  1.16k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  650|  1.16k|}
_ZN8vbd_pairC2ElNSt3__14pairIllEE:
   54|   998k|    vbd_pair(igraph_int_t vertex, bidegree degree) : vertex(vertex), degree(degree) {}
_Z14degree_greaterI8vbd_pairEbRKT_S3_:
   59|   278M|template<typename T> inline bool degree_greater(const T &a, const T &b) {
   60|   278M|    return a.degree > b.degree;
   61|   278M|}
_Z17is_nonzero_outdegRK8vbd_pair:
  570|   598k|inline bool is_nonzero_outdeg(const vbd_pair &vd) {
  571|   598k|    return (vd.degree.second != 0);
  572|   598k|}
degree_sequence.cpp:_ZL28igraph_i_kleitman_wang_indexPK19igraph_vector_int_tS1_PS_:
  655|  2.00k|static igraph_error_t igraph_i_kleitman_wang_index(const igraph_vector_int_t *outdeg, const igraph_vector_int_t *indeg, igraph_vector_int_t *edges) {
  656|  2.00k|    igraph_int_t n = igraph_vector_int_size(indeg); // number of vertices
  657|       |
  658|  2.00k|    igraph_int_t ec = 0; // number of edges added so far
  659|       |
  660|  2.00k|    typedef std::list<vbd_pair> vlist;
  661|  2.00k|    vlist vertices;
  662|   334k|    for (igraph_int_t i = 0; i < n; ++i) {
  ------------------
  |  Branch (662:30): [True: 332k, False: 2.00k]
  ------------------
  663|   332k|        vertices.push_back(vbd_pair(i, bidegree(VECTOR(*indeg)[i], VECTOR(*outdeg)[i])));
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      vertices.push_back(vbd_pair(i, bidegree(VECTOR(*indeg)[i], VECTOR(*outdeg)[i])));
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  664|   332k|    }
  665|       |
  666|  2.00k|    std::vector<vlist::iterator> pointers;
  667|  2.00k|    pointers.reserve(n);
  668|   334k|    for (auto it = vertices.begin(); it != vertices.end(); ++it) {
  ------------------
  |  Branch (668:38): [True: 332k, False: 2.00k]
  ------------------
  669|   332k|        pointers.push_back(it);
  670|   332k|    }
  671|       |
  672|   287k|    for (const auto &pt : pointers) {
  ------------------
  |  Branch (672:25): [True: 287k, False: 1.41k]
  ------------------
  673|       |        // sort vertices by (in, out) degree pairs in decreasing order
  674|       |        // note: std::list::sort does a stable sort
  675|   287k|        vertices.sort(degree_greater<vbd_pair>);
  676|       |
  677|       |        // choose a vertex the out-stubs of which will be connected
  678|   287k|        vbd_pair &vd = *pt;
  679|       |
  680|   287k|        if (vd.degree.second == 0) {
  ------------------
  |  Branch (680:13): [True: 251k, False: 36.4k]
  ------------------
  681|   251k|            continue;
  682|   251k|        }
  683|       |
  684|  36.4k|        igraph_int_t k = 0;
  685|  36.4k|        vlist::iterator it;
  686|  36.4k|        for (it = vertices.begin();
  687|  91.2k|             k != vd.degree.second && it != vertices.end();
  ------------------
  |  Branch (687:14): [True: 55.3k, False: 35.8k]
  |  Branch (687:14): [True: 55.2k, False: 36.0k]
  |  Branch (687:39): [True: 55.2k, False: 161]
  ------------------
  688|  55.2k|             ++it) {
  689|  55.2k|            if (it->vertex == vd.vertex) {
  ------------------
  |  Branch (689:17): [True: 1.80k, False: 53.4k]
  ------------------
  690|  1.80k|                continue;
  691|  1.80k|            }
  692|       |
  693|  53.4k|            if (--(it->degree.first) < 0) {
  ------------------
  |  Branch (693:17): [True: 423, False: 53.0k]
  ------------------
  694|    423|                goto fail;
  695|    423|            }
  696|       |
  697|  53.0k|            VECTOR(*edges)[2 * (ec + k)] = vd.vertex;
  ------------------
  |  |   60|  53.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  698|  53.0k|            VECTOR(*edges)[2 * (ec + k) + 1] = it->vertex;
  ------------------
  |  |   60|  53.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  699|       |
  700|  53.0k|            ++k;
  701|  53.0k|        }
  702|  36.0k|        if (it == vertices.end() && k < vd.degree.second) {
  ------------------
  |  Branch (702:13): [True: 187, False: 35.8k]
  |  Branch (702:13): [True: 161, False: 35.8k]
  |  Branch (702:37): [True: 161, False: 26]
  ------------------
  703|    161|            goto fail;
  704|    161|        }
  705|       |
  706|  35.8k|        ec += vd.degree.second;
  707|  35.8k|        vd.degree.second = 0;
  708|  35.8k|    }
  709|       |
  710|  1.41k|    return IGRAPH_SUCCESS;
  711|       |
  712|    584|fail:
  713|    584|    IGRAPH_ERROR("The given directed degree sequences cannot be realized as a simple graph.", IGRAPH_EINVAL);
  ------------------
  |  |  426|    584|    do { \
  |  |  427|    584|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|    584|        return igraph_errno ; \
  |  |  429|    584|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  714|    584|}
degree_sequence.cpp:_ZL43igraph_i_realize_undirected_bipartite_indexP8igraph_tPK19igraph_vector_int_tS3_b:
 1030|  4.00k|) {
 1031|  4.00k|    igraph_int_t ec = 0; // The number of edges added so far
 1032|  4.00k|    igraph_int_t n1 = igraph_vector_int_size(degree1);
 1033|  4.00k|    igraph_int_t n2 = igraph_vector_int_size(degree2);
 1034|  4.00k|    igraph_vector_int_t edges;
 1035|  4.00k|    igraph_int_t ds1_sum;
 1036|  4.00k|    igraph_int_t ds2_sum;
 1037|       |
 1038|  4.00k|    std::vector<vd_pair> vertices1;
 1039|  4.00k|    std::vector<vd_pair> vertices2;
 1040|  4.00k|    std::vector<vd_pair> *src_vs = &vertices1;
 1041|  4.00k|    std::vector<vd_pair> *dest_vs = &vertices2;
 1042|       |
 1043|  4.00k|    IGRAPH_CHECK(igraph_i_safe_vector_int_sum(degree1, &ds1_sum));
  ------------------
  |  |  656|  4.00k|    do { \
  |  |  657|  4.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
 1044|  4.00k|    IGRAPH_CHECK(igraph_i_safe_vector_int_sum(degree2, &ds2_sum));
  ------------------
  |  |  656|  4.00k|    do { \
  |  |  657|  4.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
 1045|       |
 1046|  4.00k|    if (ds1_sum != ds2_sum) {
  ------------------
  |  Branch (1046:9): [True: 0, False: 4.00k]
  ------------------
 1047|      0|        goto fail;
 1048|      0|    }
 1049|       |
 1050|       |    // If both degree sequences are empty, it's bigraphical
 1051|  4.00k|    if (!(n1 == 0 && n2 == 0)) {
  ------------------
  |  Branch (1051:11): [True: 2, False: 4.00k]
  |  Branch (1051:22): [True: 2, False: 0]
  ------------------
 1052|  4.00k|        if (igraph_vector_int_min(degree1) < 0 || igraph_vector_int_min(degree2) < 0) {
  ------------------
  |  Branch (1052:13): [True: 0, False: 4.00k]
  |  Branch (1052:51): [True: 0, False: 4.00k]
  ------------------
 1053|      0|            goto fail;
 1054|      0|        }
 1055|  4.00k|    }
 1056|       |
 1057|  4.00k|    vertices1.reserve(n1);
 1058|  4.00k|    vertices2.reserve(n2);
 1059|       |
 1060|   669k|    for (igraph_int_t i = 0; i < n1; i++) {
  ------------------
  |  Branch (1060:30): [True: 665k, False: 4.00k]
  ------------------
 1061|   665k|        vertices1.push_back(vd_pair(i, VECTOR(*degree1)[i]));
  ------------------
  |  |   60|   665k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1062|   665k|    }
 1063|   669k|    for (igraph_int_t i = 0; i < n2; i++) {
  ------------------
  |  Branch (1063:30): [True: 665k, False: 4.00k]
  ------------------
 1064|   665k|        vertices2.push_back(vd_pair(i + n1, VECTOR(*degree2)[i]));
  ------------------
  |  |   60|   665k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1065|   665k|    }
 1066|       |
 1067|  4.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, ds1_sum + ds2_sum);
  ------------------
  |  |  119|  4.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  4.00k|    do { \
  |  |  |  |  657|  4.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  4.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.00k|    do { \
  |  |  |  |  604|  4.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
 1068|       |
 1069|   675k|    while (!vertices1.empty() && !vertices2.empty()) {
  ------------------
  |  Branch (1069:12): [True: 671k, False: 3.56k]
  |  Branch (1069:34): [True: 671k, False: 0]
  ------------------
 1070|       |        // Go by index, so we start in ds1, so ds2 needs to be sorted.
 1071|   671k|        std::stable_sort(vertices2.begin(), vertices2.end(), degree_greater<vd_pair>);
 1072|       |        // No sorting of ds1 needed for index case
 1073|   671k|        vd_pair vd_src = vertices1.front();
 1074|       |        // No multiedges - Take the first vertex, connect to the largest delta in opposite partition
 1075|   671k|        if (!multiedges) {
  ------------------
  |  Branch (1075:13): [True: 301k, False: 369k]
  ------------------
 1076|       |            // Remove the source degrees
 1077|   301k|            src_vs->erase(src_vs->begin());
 1078|       |
 1079|   301k|            if (vd_src.degree == 0) {
  ------------------
  |  Branch (1079:17): [True: 265k, False: 36.6k]
  ------------------
 1080|   265k|                continue;
 1081|   265k|            }
 1082|       |
 1083|  36.6k|            if (dest_vs->size() < size_t(vd_src.degree)) {
  ------------------
  |  Branch (1083:17): [True: 208, False: 36.4k]
  ------------------
 1084|    208|                goto fail;
 1085|    208|            }
 1086|       |
 1087|  89.7k|            for (igraph_int_t i = 0; i < vd_src.degree; i++) {
  ------------------
  |  Branch (1087:38): [True: 53.6k, False: 36.1k]
  ------------------
 1088|  53.6k|                if ((*dest_vs)[i].degree == 0) {
  ------------------
  |  Branch (1088:21): [True: 231, False: 53.3k]
  ------------------
 1089|       |                    // Not enough non-zero remaining degree vertices in opposite partition.
 1090|       |                    // Not graphical.
 1091|    231|                    goto fail;
 1092|    231|                }
 1093|       |
 1094|  53.3k|                (*dest_vs)[i].degree--;
 1095|       |
 1096|  53.3k|                VECTOR(edges)[2*(ec + i)]     = vd_src.vertex;
  ------------------
  |  |   60|  53.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1097|  53.3k|                VECTOR(edges)[2*(ec + i) + 1] = (*dest_vs)[i].vertex;
  ------------------
  |  |   60|  53.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1098|  53.3k|            }
 1099|  36.1k|            ec += vd_src.degree;
 1100|  36.1k|        }
 1101|       |        // If multiedges are allowed
 1102|   369k|        else {
 1103|       |            // If this is the last edge to be created from this vertex, we remove it.
 1104|   369k|            if (src_vs->front().degree <= 1) {
  ------------------
  |  Branch (1104:17): [True: 332k, False: 37.0k]
  ------------------
 1105|   332k|                src_vs->erase(src_vs->begin());
 1106|   332k|            } else {
 1107|  37.0k|                src_vs->front().degree--;
 1108|  37.0k|            }
 1109|       |
 1110|   369k|            if (vd_src.degree == 0) {
  ------------------
  |  Branch (1110:17): [True: 294k, False: 74.9k]
  ------------------
 1111|   294k|                continue;
 1112|   294k|            }
 1113|       |
 1114|  74.9k|            if (dest_vs->size() < size_t(1)) {
  ------------------
  |  Branch (1114:17): [True: 0, False: 74.9k]
  ------------------
 1115|      0|                goto fail;
 1116|      0|            }
 1117|       |            // We should never decrement below zero, but check just in case.
 1118|  74.9k|            IGRAPH_ASSERT((*dest_vs)[0].degree - 1 >= 0);
  ------------------
  |  |  924|  74.9k|    do { \
  |  |  925|  74.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  74.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 74.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  74.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 74.9k]
  |  |  ------------------
  ------------------
 1119|       |
 1120|       |            // Connect to the opposite partition
 1121|  74.9k|            (*dest_vs)[0].degree--;
 1122|       |
 1123|  74.9k|            VECTOR(edges)[2 * ec] = vd_src.vertex;
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1124|  74.9k|            VECTOR(edges)[2 * ec + 1] = (*dest_vs)[0].vertex;
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1125|  74.9k|            ec++;
 1126|  74.9k|        }
 1127|   671k|    }
 1128|  3.56k|    IGRAPH_CHECK(igraph_create(graph, &edges, n1 + n2, false));
  ------------------
  |  |  656|  3.56k|    do { \
  |  |  657|  3.56k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  3.56k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  3.56k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.56k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  3.56k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 3.56k]
  |  |  ------------------
  ------------------
 1129|       |
 1130|  3.56k|    igraph_vector_int_destroy(&edges);
 1131|  3.56k|    IGRAPH_FINALLY_CLEAN(1);
 1132|       |
 1133|  3.56k|    return IGRAPH_SUCCESS;
 1134|       |
 1135|    439|fail:
 1136|    439|    IGRAPH_ERRORF("The given bidegree sequence cannot be realized as a bipartite %sgraph.",
  ------------------
  |  |  464|    439|    do { \
  |  |  465|    439|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  466|    878|                      igraph_errno, __VA_ARGS__) ; \
  |  |  ------------------
  |  |  |  Branch (466:37): [True: 0, False: 439]
  |  |  ------------------
  |  |  467|    439|        return igraph_errno; \
  |  |  468|    439|    } while (0)
  |  |  ------------------
  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1137|    439|                  IGRAPH_EINVAL, multiedges ? "multi" : "simple ");
 1138|    439|}
_ZN7vd_pairC2Ell:
   43|  5.98M|    vd_pair(igraph_int_t vertex, igraph_int_t degree) : vertex(vertex), degree(degree) {}
_Z14degree_greaterI7vd_pairEbRKT_S3_:
   59|  1.27G|template<typename T> inline bool degree_greater(const T &a, const T &b) {
   60|  1.27G|    return a.degree > b.degree;
   61|  1.27G|}

igraph_is_graphical:
  135|  8.01k|{
  136|       |    /* Undirected case: */
  137|  8.01k|    if (in_degrees == NULL)
  ------------------
  |  Branch (137:9): [True: 0, False: 8.01k]
  ------------------
  138|      0|    {
  139|      0|        if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW )) {
  ------------------
  |  |   26|      0|#define IGRAPH_I_MULTI_LOOPS_SW 0x04 /* 100, more than one self-loop allowed on the same vertex   */
  ------------------
  |  Branch (139:14): [True: 0, False: 0]
  |  Branch (139:56): [True: 0, False: 0]
  ------------------
  140|       |            /* Typically this case is used when multiple edges are allowed both as self-loops and
  141|       |             * between distinct vertices. However, the conditions are the same even if multi-edges
  142|       |             * are not allowed between distinct vertices (only as self-loops). Therefore, we
  143|       |             * do not test IGRAPH_I_MULTI_EDGES_SW in the if (...). */
  144|      0|            return igraph_i_is_graphical_undirected_multi_loops(out_degrees, res);
  145|      0|        }
  146|      0|        else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   25|      0|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (146:19): [True: 0, False: 0]
  |  Branch (146:63): [True: 0, False: 0]
  ------------------
  147|      0|            return igraph_i_is_graphical_undirected_loopless_multi(out_degrees, res);
  148|      0|        }
  149|      0|        else if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   26|      0|#define IGRAPH_I_MULTI_LOOPS_SW 0x04 /* 100, more than one self-loop allowed on the same vertex   */
  ------------------
                      else if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   25|      0|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (149:19): [True: 0, False: 0]
  |  Branch (149:61): [True: 0, False: 0]
  |  Branch (149:113): [True: 0, False: 0]
  ------------------
  150|      0|            return igraph_i_is_graphical_undirected_loopy_simple(out_degrees, res);
  151|      0|        }
  152|      0|        else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   25|      0|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (152:19): [True: 0, False: 0]
  |  Branch (152:63): [True: 0, False: 0]
  ------------------
  153|      0|            return igraph_i_is_graphical_undirected_simple(out_degrees, res);
  154|      0|        } else {
  155|       |            /* Remaining case:
  156|       |             *  - At most one self-loop per vertex but multi-edges between distinct vertices allowed.
  157|       |             * These cases cannot currently be requested through the documented API,
  158|       |             * so no explanatory error message for now. */
  159|      0|            return IGRAPH_UNIMPLEMENTED;
  160|      0|        }
  161|      0|    }
  162|       |    /* Directed case: */
  163|  8.01k|    else
  164|  8.01k|    {
  165|  8.01k|        if (igraph_vector_int_size(in_degrees) != igraph_vector_int_size(out_degrees)) {
  ------------------
  |  Branch (165:13): [True: 0, False: 8.01k]
  ------------------
  166|      0|            IGRAPH_ERROR("The lengths of out- and in-degree sequences must be the same.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  167|      0|        }
  168|       |
  169|  8.01k|        if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) && (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW ) ) {
  ------------------
  |  |   25|  4.00k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
                      if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) && (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW ) ) {
  ------------------
  |  |   26|  2.00k|#define IGRAPH_I_MULTI_LOOPS_SW 0x04 /* 100, more than one self-loop allowed on the same vertex   */
  ------------------
  |  Branch (169:14): [True: 4.00k, False: 4.00k]
  |  Branch (169:56): [True: 2.00k, False: 2.00k]
  |  Branch (169:106): [True: 2.00k, False: 0]
  ------------------
  170|  2.00k|            return igraph_i_is_graphical_directed_loopy_multi(out_degrees, in_degrees, res);
  171|  2.00k|        }
  172|  6.00k|        else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   25|  4.00k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (172:19): [True: 4.00k, False: 2.00k]
  |  Branch (172:63): [True: 2.00k, False: 2.00k]
  ------------------
  173|  2.00k|            return igraph_i_is_graphical_directed_loopless_multi(out_degrees, in_degrees, res);
  174|  2.00k|        }
  175|  4.00k|        else if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   26|  2.00k|#define IGRAPH_I_MULTI_LOOPS_SW 0x04 /* 100, more than one self-loop allowed on the same vertex   */
  ------------------
                      else if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   25|  2.00k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (175:19): [True: 2.00k, False: 2.00k]
  |  Branch (175:61): [True: 2.00k, False: 0]
  |  Branch (175:113): [True: 2.00k, False: 0]
  ------------------
  176|  2.00k|            return igraph_i_is_graphical_directed_loopy_simple(out_degrees, in_degrees, res);
  177|  2.00k|        }
  178|  2.00k|        else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   25|  2.00k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (178:19): [True: 2.00k, False: 0]
  |  Branch (178:63): [True: 2.00k, False: 0]
  ------------------
  179|  2.00k|            return igraph_i_is_graphical_directed_simple(out_degrees, in_degrees, res);
  180|  2.00k|        } else {
  181|       |            /* Remaining cases:
  182|       |             *  - At most one self-loop per vertex but multi-edges between distinct vertices allowed.
  183|       |             *  - At most one edge between distinct vertices but multi-self-loops allowed.
  184|       |             * These cases cannot currently be requested through the documented API,
  185|       |             * so no explanatory error message for now. */
  186|      0|            return IGRAPH_UNIMPLEMENTED;
  187|      0|        }
  188|  8.01k|    }
  189|       |
  190|       |    /* can't reach here */
  191|  8.01k|}
igraph_is_potentially_connected:
  337|  14.0k|        igraph_bool_t *res) {
  338|       |
  339|  14.0k|    const igraph_bool_t directed = in_degrees != NULL;
  340|  14.0k|    const igraph_bool_t multigraph = !!(allowed_edge_types & IGRAPH_MULTI_SW);
  341|  14.0k|    const igraph_bool_t loopy = !!(allowed_edge_types & IGRAPH_LOOPS_SW);
  342|  14.0k|    const igraph_int_t n = igraph_vector_int_size(out_degrees);
  343|  14.0k|    igraph_int_t m;
  344|  14.0k|    igraph_int_t min_d = IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|  14.0k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  345|  14.0k|    igraph_int_t min_outd = IGRAPH_INTEGER_MAX, min_ind = IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|  14.0k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                  igraph_int_t min_outd = IGRAPH_INTEGER_MAX, min_ind = IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|  14.0k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  346|       |
  347|  14.0k|    if (!directed) {
  ------------------
  |  Branch (347:9): [True: 0, False: 14.0k]
  ------------------
  348|      0|        mode = IGRAPH_WEAK;
  349|  14.0k|    } else if (mode != IGRAPH_WEAK && mode != IGRAPH_STRONG) {
  ------------------
  |  Branch (349:16): [True: 6.00k, False: 8.01k]
  |  Branch (349:39): [True: 0, False: 6.00k]
  ------------------
  350|      0|        IGRAPH_ERROR("Invalid connectedness mode.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  351|      0|    }
  352|       |
  353|  14.0k|    if (!multigraph && loopy && mode == IGRAPH_STRONG) {
  ------------------
  |  Branch (353:9): [True: 6.00k, False: 8.01k]
  |  Branch (353:24): [True: 2.00k, False: 4.00k]
  |  Branch (353:33): [True: 0, False: 2.00k]
  ------------------
  354|       |        /* Strongly connected for simple graphs with self-loops unimplemented */
  355|      0|        IGRAPH_ERROR("Potentially strongly connected check is not implemented"
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  356|      0|                     " for simple directed graphs with loops.", IGRAPH_UNIMPLEMENTED);
  357|      0|    }
  358|       |
  359|  14.0k|    if (directed) {
  ------------------
  |  Branch (359:9): [True: 14.0k, False: 0]
  ------------------
  360|  14.0k|        if (igraph_vector_int_size(in_degrees) != n) {
  ------------------
  |  Branch (360:13): [True: 0, False: 14.0k]
  ------------------
  361|      0|            IGRAPH_ERROR("The length of out- and in-degree sequences must be the same.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  362|      0|        }
  363|  14.0k|        igraph_int_t outdegsum = 0, indegsum = 0;
  364|       |
  365|  2.34M|        for (igraph_int_t i=0; i < n; i++) {
  ------------------
  |  Branch (365:32): [True: 2.32M, False: 14.0k]
  ------------------
  366|  2.32M|            const igraph_int_t outd = VECTOR(*out_degrees)[i];
  ------------------
  |  |   60|  2.32M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  367|  2.32M|            const igraph_int_t ind =  VECTOR(*in_degrees)[i];
  ------------------
  |  |   60|  2.32M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  368|  2.32M|            if (outd < 0) {
  ------------------
  |  Branch (368:17): [True: 0, False: 2.32M]
  ------------------
  369|      0|                IGRAPH_ERROR("Out-degrees must not be negative.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  370|      0|            }
  371|  2.32M|            if (ind < 0) {
  ------------------
  |  Branch (371:17): [True: 0, False: 2.32M]
  ------------------
  372|      0|                IGRAPH_ERROR("In-degrees must not be negative.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  373|      0|            }
  374|  2.32M|            outdegsum += outd;
  375|  2.32M|            indegsum += ind;
  376|  2.32M|            if (outd < min_outd) min_outd = outd;
  ------------------
  |  Branch (376:17): [True: 23.2k, False: 2.30M]
  ------------------
  377|  2.32M|            if (ind < min_ind) min_ind = ind;
  ------------------
  |  Branch (377:17): [True: 23.6k, False: 2.30M]
  ------------------
  378|  2.32M|            if (outd + ind < min_d) min_d = outd + ind;
  ------------------
  |  Branch (378:17): [True: 25.8k, False: 2.30M]
  ------------------
  379|  2.32M|        }
  380|  14.0k|        if (outdegsum != indegsum) {
  ------------------
  |  Branch (380:13): [True: 0, False: 14.0k]
  ------------------
  381|       |            /* Not graphical */
  382|      0|            *res = false;
  383|      0|            return IGRAPH_SUCCESS;
  384|      0|        }
  385|  14.0k|        m = outdegsum;
  386|  14.0k|    }
  387|      0|    else /* undirected */ {
  388|      0|        igraph_int_t degsum = 0;
  389|       |
  390|      0|        for (igraph_int_t i=0; i < n; i++) {
  ------------------
  |  Branch (390:32): [True: 0, False: 0]
  ------------------
  391|      0|            const igraph_int_t d = VECTOR(*out_degrees)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  392|      0|            if (d < 0) {
  ------------------
  |  Branch (392:17): [True: 0, False: 0]
  ------------------
  393|      0|                IGRAPH_ERROR("Degrees must not be negative.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  394|      0|            }
  395|      0|            degsum += d;
  396|      0|            if (d < min_d) min_d = d;
  ------------------
  |  Branch (396:17): [True: 0, False: 0]
  ------------------
  397|      0|        }
  398|      0|        if (degsum % 2 == 1) {
  ------------------
  |  Branch (398:13): [True: 0, False: 0]
  ------------------
  399|       |            /* Not graphical */
  400|      0|            *res = false;
  401|      0|            return IGRAPH_SUCCESS;
  402|      0|        }
  403|      0|        m = degsum / 2;
  404|      0|    }
  405|       |
  406|       |    /* The null graph is disconnected. */
  407|  14.0k|    if (n == 0) {
  ------------------
  |  Branch (407:9): [True: 7, False: 14.0k]
  ------------------
  408|      7|        *res = false;
  409|      7|        return IGRAPH_SUCCESS;
  410|      7|    }
  411|       |
  412|       |    /* The singleton graph is connected, regardless of its degree. */
  413|  14.0k|    if (n == 1) {
  ------------------
  |  Branch (413:9): [True: 161, False: 13.8k]
  ------------------
  414|    161|        *res = true;
  415|    161|        return IGRAPH_SUCCESS;
  416|    161|    }
  417|       |
  418|       |    /* From here on, we assume n >= 2 */
  419|       |
  420|  13.8k|    if (mode == IGRAPH_WEAK) {
  ------------------
  |  Branch (420:9): [True: 7.91k, False: 5.93k]
  ------------------
  421|       |        /* Special case: Undirected graph, multi-edges disallowed, self-loops allowed.
  422|       |         * The degree sequence (2, 2) has only a disconnected realization (a self loop
  423|       |         * on each vertex), even though its edge count is larger than that of a tree.
  424|       |         */
  425|  7.91k|        if (n == 2 && !directed && loopy && !multigraph) {
  ------------------
  |  Branch (425:13): [True: 564, False: 7.35k]
  |  Branch (425:23): [True: 0, False: 564]
  |  Branch (425:36): [True: 0, False: 0]
  |  Branch (425:45): [True: 0, False: 0]
  ------------------
  426|      0|            if (VECTOR(*out_degrees)[0] == 2 && VECTOR(*out_degrees)[1] == 2) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (VECTOR(*out_degrees)[0] == 2 && VECTOR(*out_degrees)[1] == 2) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (426:17): [True: 0, False: 0]
  |  Branch (426:49): [True: 0, False: 0]
  ------------------
  427|      0|                *res = false;
  428|      0|                return IGRAPH_SUCCESS;
  429|      0|            }
  430|      0|        }
  431|       |
  432|  7.91k|        *res = min_d > 0 && m >= n-1;
  ------------------
  |  Branch (432:16): [True: 924, False: 6.99k]
  |  Branch (432:29): [True: 908, False: 16]
  ------------------
  433|  7.91k|        return IGRAPH_SUCCESS;
  434|  7.91k|    } else /* mode == IGRAPH_STRONG */ {
  435|  5.93k|        if (min_outd == 0 || min_ind == 0) {
  ------------------
  |  Branch (435:13): [True: 5.49k, False: 444]
  |  Branch (435:30): [True: 54, False: 390]
  ------------------
  436|  5.54k|            *res = false;
  437|  5.54k|            return IGRAPH_SUCCESS;
  438|  5.54k|        }
  439|       |        /* Min outdegree >= 1 and min indegree >= 1 */
  440|    390|        if (multigraph) {
  ------------------
  |  Branch (440:13): [True: 260, False: 130]
  ------------------
  441|       |            // Multigraphs can be connected into one hamiltonian cycle
  442|       |            // Then rest of stubs can be assigned arbitrarily
  443|    260|            *res = true;
  444|    260|            return IGRAPH_SUCCESS;
  445|    260|        }
  446|    130|        if (loopy) {
  ------------------
  |  Branch (446:13): [True: 0, False: 130]
  ------------------
  447|       |            /* TODO: Implement potentially strongly connected for loopy simple directed graph case.
  448|       |             * This is now caught at the beginning of this function and IGRAPH_UNIMPLEMENTED is returned. */
  449|      0|        }
  450|       |
  451|       |        /* Assume simple loopless now */
  452|       |        /* We follow Hong-Liu-Lai (2016) and Beineke-Harary (1965) */
  453|    130|        igraph_vector_int_t out_degree_cumcounts, out_degree_counts;
  454|    130|        igraph_vector_int_t sorted_in_degrees, sorted_out_degrees;
  455|    130|        igraph_vector_int_t over;
  456|    130|        igraph_int_t lhs, rhs_sum;
  457|    130|        IGRAPH_VECTOR_INT_INIT_FINALLY(&sorted_out_degrees, n);
  ------------------
  |  |  119|    130|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    130|    do { \
  |  |  |  |  657|    130|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    130|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    130|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 130]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    130|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 130]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    130|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    130|    do { \
  |  |  |  |  604|    130|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    130|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    130|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    130|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 130]
  |  |  |  |  ------------------
  |  |  |  |  608|    130|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    130|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 130]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 130]
  |  |  ------------------
  ------------------
  458|    130|        IGRAPH_VECTOR_INT_INIT_FINALLY(&sorted_in_degrees, n);
  ------------------
  |  |  119|    130|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    130|    do { \
  |  |  |  |  657|    130|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    130|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    130|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 130]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    130|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 130]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    130|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    130|    do { \
  |  |  |  |  604|    130|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    130|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    130|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    130|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 130]
  |  |  |  |  ------------------
  |  |  |  |  608|    130|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    130|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 130]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 130]
  |  |  ------------------
  ------------------
  459|    130|        IGRAPH_VECTOR_INT_INIT_FINALLY(&out_degree_cumcounts, n+1);
  ------------------
  |  |  119|    130|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    130|    do { \
  |  |  |  |  657|    130|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    130|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    130|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 130]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    130|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 130]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    130|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    130|    do { \
  |  |  |  |  604|    130|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    130|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    130|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    130|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 130]
  |  |  |  |  ------------------
  |  |  |  |  608|    130|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    130|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 130]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 130]
  |  |  ------------------
  ------------------
  460|       |
  461|       |        /* Compute out_degree_cumcounts[d+1] to be the no. of out-degrees == d */
  462|    527|        for (igraph_int_t v = 0; v < n; v++) {
  ------------------
  |  Branch (462:34): [True: 489, False: 38]
  ------------------
  463|    489|            igraph_int_t indeg = VECTOR(*in_degrees)[v];
  ------------------
  |  |   60|    489|#define VECTOR(v) ((v).stor_begin)
  ------------------
  464|    489|            igraph_int_t outdeg = VECTOR(*out_degrees)[v];
  ------------------
  |  |   60|    489|#define VECTOR(v) ((v).stor_begin)
  ------------------
  465|    489|            if (indeg >= n || outdeg >= n) {
  ------------------
  |  Branch (465:17): [True: 59, False: 430]
  |  Branch (465:31): [True: 33, False: 397]
  ------------------
  466|     92|                *res = false;
  467|     92|                igraph_vector_int_destroy(&out_degree_cumcounts);
  468|     92|                igraph_vector_int_destroy(&sorted_in_degrees);
  469|     92|                igraph_vector_int_destroy(&sorted_out_degrees);
  470|     92|                IGRAPH_FINALLY_CLEAN(3);
  471|     92|                return IGRAPH_SUCCESS;
  472|     92|            }
  473|    397|            VECTOR(out_degree_cumcounts)[outdeg + 1]++;
  ------------------
  |  |   60|    397|#define VECTOR(v) ((v).stor_begin)
  ------------------
  474|    397|        }
  475|       |
  476|       |        /* Compute out_degree_cumcounts[d] to be the no. of out-degrees < d */
  477|    404|        for (igraph_int_t outdeg = 0; outdeg < n; outdeg++) {
  ------------------
  |  Branch (477:39): [True: 366, False: 38]
  ------------------
  478|    366|            VECTOR(out_degree_cumcounts)[outdeg+1] += VECTOR(out_degree_cumcounts)[outdeg];
  ------------------
  |  |   60|    366|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(out_degree_cumcounts)[outdeg+1] += VECTOR(out_degree_cumcounts)[outdeg];
  ------------------
  |  |   60|    366|#define VECTOR(v) ((v).stor_begin)
  ------------------
  479|    366|        }
  480|       |
  481|       |        /* In the following loop, out_degree_counts[d] keeps track of the number of vertices
  482|       |         * with out-degree d that were already placed. */
  483|     38|        IGRAPH_VECTOR_INT_INIT_FINALLY(&out_degree_counts, n);
  ------------------
  |  |  119|     38|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|     38|    do { \
  |  |  |  |  657|     38|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|     38|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|     38|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 38]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|     38|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 38]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|     38|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|     38|    do { \
  |  |  |  |  604|     38|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|     38|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|     38|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|     38|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 38]
  |  |  |  |  ------------------
  |  |  |  |  608|     38|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|     38|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 38]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 38]
  |  |  ------------------
  ------------------
  484|       |
  485|    404|        for (igraph_int_t v = 0; v < n; v++) {
  ------------------
  |  Branch (485:34): [True: 366, False: 38]
  ------------------
  486|    366|            igraph_int_t outdeg = VECTOR(*out_degrees)[v];
  ------------------
  |  |   60|    366|#define VECTOR(v) ((v).stor_begin)
  ------------------
  487|    366|            igraph_int_t indeg  = VECTOR(*in_degrees)[v];
  ------------------
  |  |   60|    366|#define VECTOR(v) ((v).stor_begin)
  ------------------
  488|    366|            igraph_int_t idx = VECTOR(out_degree_cumcounts)[outdeg] + VECTOR(out_degree_counts)[outdeg];
  ------------------
  |  |   60|    366|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          igraph_int_t idx = VECTOR(out_degree_cumcounts)[outdeg] + VECTOR(out_degree_counts)[outdeg];
  ------------------
  |  |   60|    366|#define VECTOR(v) ((v).stor_begin)
  ------------------
  489|    366|            VECTOR(sorted_out_degrees)[n - idx - 1] = outdeg;
  ------------------
  |  |   60|    366|#define VECTOR(v) ((v).stor_begin)
  ------------------
  490|    366|            VECTOR(sorted_in_degrees)[n - idx - 1] = indeg;
  ------------------
  |  |   60|    366|#define VECTOR(v) ((v).stor_begin)
  ------------------
  491|    366|            VECTOR(out_degree_counts)[outdeg]++;
  ------------------
  |  |   60|    366|#define VECTOR(v) ((v).stor_begin)
  ------------------
  492|    366|        }
  493|       |
  494|     38|        igraph_vector_int_destroy(&out_degree_counts);
  495|     38|        igraph_vector_int_destroy(&out_degree_cumcounts);
  496|     38|        IGRAPH_FINALLY_CLEAN(2);
  497|       |
  498|     38|        IGRAPH_VECTOR_INT_INIT_FINALLY(&over, n);
  ------------------
  |  |  119|     38|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|     38|    do { \
  |  |  |  |  657|     38|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|     38|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|     38|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 38]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|     38|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 38]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|     38|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|     38|    do { \
  |  |  |  |  604|     38|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|     38|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|     38|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|     38|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 38]
  |  |  |  |  ------------------
  |  |  |  |  608|     38|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|     38|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 38]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 38]
  |  |  ------------------
  ------------------
  499|     38|        lhs = 0;
  500|     38|        rhs_sum = 0;
  501|     38|        igraph_int_t at = 0;
  502|     38|        igraph_int_t count = n;
  503|       |
  504|    404|        for (igraph_int_t v = 0; v < n; v++) {
  ------------------
  |  Branch (504:34): [True: 366, False: 38]
  ------------------
  505|    366|            const igraph_int_t indeg = VECTOR(sorted_in_degrees)[v];
  ------------------
  |  |   60|    366|#define VECTOR(v) ((v).stor_begin)
  ------------------
  506|    366|            VECTOR(over)[indeg]++;
  ------------------
  |  |   60|    366|#define VECTOR(v) ((v).stor_begin)
  ------------------
  507|    366|        }
  508|       |
  509|       |
  510|       |        /* The sequence has a strongly connected realization unless a subset
  511|       |         * of the first k vertices, in non-increasing order of out-degree,
  512|       |         * has fewer incoming edges than outgoing ones, that is unless the
  513|       |         * Beineke-Harary / Hong-Liu-Lai condition fails for some k.
  514|       |         * Be optimistic and set to false if the condition is violated below.
  515|       |         */
  516|     38|        *res = true;
  517|    364|        for (igraph_int_t k = 1; k < n; k++) {
  ------------------
  |  Branch (517:34): [True: 327, False: 37]
  ------------------
  518|    327|            const igraph_int_t indeg = VECTOR(sorted_in_degrees)[k - 1];
  ------------------
  |  |   60|    327|#define VECTOR(v) ((v).stor_begin)
  ------------------
  519|    327|            const igraph_int_t outdeg = VECTOR(sorted_out_degrees)[k - 1];
  ------------------
  |  |   60|    327|#define VECTOR(v) ((v).stor_begin)
  ------------------
  520|    327|            lhs += (indeg - outdeg);
  521|       |
  522|    654|            while (at < k) {
  ------------------
  |  Branch (522:20): [True: 327, False: 327]
  ------------------
  523|    627|                while (VECTOR(over)[at] > 0) {
  ------------------
  |  |   60|    627|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (523:24): [True: 300, False: 327]
  ------------------
  524|    300|                    VECTOR(over)[at]--;
  ------------------
  |  |   60|    300|#define VECTOR(v) ((v).stor_begin)
  ------------------
  525|    300|                    count--;
  526|    300|                    rhs_sum += at;
  527|    300|                }
  528|    327|                at++;
  529|    327|            }
  530|    327|            if (indeg >= k) {
  ------------------
  |  Branch (530:17): [True: 59, False: 268]
  ------------------
  531|     59|                VECTOR(over)[indeg]--;
  ------------------
  |  |   60|     59|#define VECTOR(v) ((v).stor_begin)
  ------------------
  532|     59|                count--;
  533|     59|            }
  534|    268|            else {
  535|    268|                rhs_sum -= indeg;
  536|    268|            }
  537|       |
  538|       |
  539|    327|            const igraph_int_t rhs = rhs_sum + k * count;
  540|    327|            if (lhs + rhs < 1) {
  ------------------
  |  Branch (540:17): [True: 1, False: 326]
  ------------------
  541|      1|                *res = false;
  542|      1|                break;
  543|      1|            }
  544|    327|        }
  545|       |
  546|     38|        igraph_vector_int_destroy(&over);
  547|     38|        igraph_vector_int_destroy(&sorted_in_degrees);
  548|     38|        igraph_vector_int_destroy(&sorted_out_degrees);
  549|     38|        IGRAPH_FINALLY_CLEAN(3);
  550|     38|        return IGRAPH_SUCCESS;
  551|     38|    }
  552|  13.8k|}
graphicality.c:igraph_i_is_graphical_directed_loopy_multi:
  850|  4.00k|static igraph_error_t igraph_i_is_graphical_directed_loopy_multi(const igraph_vector_int_t *out_degrees, const igraph_vector_int_t *in_degrees, igraph_bool_t *res) {
  851|  4.00k|    igraph_int_t sumdiff; /* difference between sum of in- and out-degrees */
  852|  4.00k|    igraph_int_t n = igraph_vector_int_size(out_degrees);
  853|  4.00k|    igraph_int_t i;
  854|       |
  855|  4.00k|    IGRAPH_ASSERT(igraph_vector_int_size(in_degrees) == n);
  ------------------
  |  |  924|  4.00k|    do { \
  |  |  925|  4.00k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
  856|       |
  857|  4.00k|    sumdiff = 0;
  858|   669k|    for (i = 0; i < n; ++i) {
  ------------------
  |  Branch (858:17): [True: 665k, False: 4.00k]
  ------------------
  859|   665k|        igraph_int_t dout = VECTOR(*out_degrees)[i];
  ------------------
  |  |   60|   665k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  860|   665k|        igraph_int_t din  = VECTOR(*in_degrees)[i];
  ------------------
  |  |   60|   665k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  861|       |
  862|   665k|        if (dout < 0 || din < 0) {
  ------------------
  |  Branch (862:13): [True: 0, False: 665k]
  |  Branch (862:25): [True: 0, False: 665k]
  ------------------
  863|      0|            *res = false;
  864|      0|            return IGRAPH_SUCCESS;
  865|      0|        }
  866|       |
  867|   665k|        sumdiff += din - dout;
  868|   665k|    }
  869|       |
  870|  4.00k|    *res = sumdiff == 0;
  871|       |
  872|  4.00k|    return IGRAPH_SUCCESS;
  873|  4.00k|}
graphicality.c:igraph_i_is_graphical_directed_loopless_multi:
  882|  2.00k|static igraph_error_t igraph_i_is_graphical_directed_loopless_multi(const igraph_vector_int_t *out_degrees, const igraph_vector_int_t *in_degrees, igraph_bool_t *res) {
  883|  2.00k|    igraph_int_t i, sumin, sumout, dmax;
  884|  2.00k|    igraph_int_t n = igraph_vector_int_size(out_degrees);
  885|       |
  886|  2.00k|    IGRAPH_ASSERT(igraph_vector_int_size(in_degrees) == n);
  ------------------
  |  |  924|  2.00k|    do { \
  |  |  925|  2.00k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  887|       |
  888|  2.00k|    sumin = 0; sumout = 0;
  889|  2.00k|    dmax = 0;
  890|   334k|    for (i = 0; i < n; ++i) {
  ------------------
  |  Branch (890:17): [True: 332k, False: 2.00k]
  ------------------
  891|   332k|        igraph_int_t dout = VECTOR(*out_degrees)[i];
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  892|   332k|        igraph_int_t din  = VECTOR(*in_degrees)[i];
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  893|   332k|        igraph_int_t d = dout + din;
  894|       |
  895|   332k|        if (dout < 0 || din < 0) {
  ------------------
  |  Branch (895:13): [True: 0, False: 332k]
  |  Branch (895:25): [True: 0, False: 332k]
  ------------------
  896|      0|            *res = false;
  897|      0|            return IGRAPH_SUCCESS;
  898|      0|        }
  899|       |
  900|   332k|        sumin += din; sumout += dout;
  901|       |
  902|   332k|        if (d > dmax) {
  ------------------
  |  Branch (902:13): [True: 3.02k, False: 329k]
  ------------------
  903|  3.02k|            dmax = d;
  904|  3.02k|        }
  905|   332k|    }
  906|       |
  907|  2.00k|    *res = (sumin == sumout) && (sumout >= dmax);
  ------------------
  |  Branch (907:12): [True: 2.00k, False: 0]
  |  Branch (907:33): [True: 1.68k, False: 321]
  ------------------
  908|       |
  909|  2.00k|    return IGRAPH_SUCCESS;
  910|  2.00k|}
graphicality.c:igraph_i_is_graphical_directed_loopy_simple:
  917|  2.00k|static igraph_error_t igraph_i_is_graphical_directed_loopy_simple(const igraph_vector_int_t *out_degrees, const igraph_vector_int_t *in_degrees, igraph_bool_t *res) {
  918|  2.00k|    return igraph_i_is_bigraphical_simple(out_degrees, in_degrees, res);
  919|  2.00k|}
graphicality.c:igraph_i_is_graphical_directed_simple:
  927|  2.00k|static igraph_error_t igraph_i_is_graphical_directed_simple(const igraph_vector_int_t *out_degrees, const igraph_vector_int_t *in_degrees, igraph_bool_t *res) {
  928|  2.00k|    igraph_vector_int_t in_degree_cumcounts, in_degree_counts;
  929|  2.00k|    igraph_vector_int_t sorted_in_degrees, sorted_out_degrees;
  930|  2.00k|    igraph_vector_int_t left_pq, right_pq;
  931|  2.00k|    igraph_int_t lhs, rhs, left_pq_size, right_pq_size, left_i, right_i, left_sum, right_sum;
  932|       |
  933|       |    /* The conditions from the loopy multigraph case are necessary here as well. */
  934|  2.00k|    IGRAPH_CHECK(igraph_i_is_graphical_directed_loopy_multi(out_degrees, in_degrees, res));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  935|  2.00k|    if (! *res) {
  ------------------
  |  Branch (935:9): [True: 0, False: 2.00k]
  ------------------
  936|      0|        return IGRAPH_SUCCESS;
  937|      0|    }
  938|       |
  939|  2.00k|    const igraph_int_t vcount = igraph_vector_int_size(out_degrees);
  940|  2.00k|    if (vcount == 0) {
  ------------------
  |  Branch (940:9): [True: 1, False: 2.00k]
  ------------------
  941|      1|        *res = true;
  942|      1|        return IGRAPH_SUCCESS;
  943|      1|    }
  944|       |
  945|       |
  946|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&in_degree_cumcounts, vcount+1);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  947|       |
  948|       |    /* Compute in_degree_cumcounts[d+1] to be the no. of in-degrees == d */
  949|   331k|    for (igraph_int_t v = 0; v < vcount; v++) {
  ------------------
  |  Branch (949:30): [True: 330k, False: 1.76k]
  ------------------
  950|   330k|        igraph_int_t indeg = VECTOR(*in_degrees)[v];
  ------------------
  |  |   60|   330k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  951|   330k|        igraph_int_t outdeg = VECTOR(*out_degrees)[v];
  ------------------
  |  |   60|   330k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  952|   330k|        if (indeg >= vcount || outdeg >= vcount) {
  ------------------
  |  Branch (952:13): [True: 166, False: 329k]
  |  Branch (952:32): [True: 74, False: 329k]
  ------------------
  953|    240|            *res = false;
  954|    240|            igraph_vector_int_destroy(&in_degree_cumcounts);
  955|    240|            IGRAPH_FINALLY_CLEAN(1);
  956|    240|            return IGRAPH_SUCCESS;
  957|    240|        }
  958|   329k|        VECTOR(in_degree_cumcounts)[indeg + 1]++;
  ------------------
  |  |   60|   329k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  959|   329k|    }
  960|       |
  961|       |    /* Compute in_degree_cumcounts[d] to be the no. of in-degrees < d */
  962|   331k|    for (igraph_int_t indeg = 0; indeg < vcount; indeg++) {
  ------------------
  |  Branch (962:34): [True: 329k, False: 1.76k]
  ------------------
  963|   329k|        VECTOR(in_degree_cumcounts)[indeg+1] += VECTOR(in_degree_cumcounts)[indeg];
  ------------------
  |  |   60|   329k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(in_degree_cumcounts)[indeg+1] += VECTOR(in_degree_cumcounts)[indeg];
  ------------------
  |  |   60|   329k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  964|   329k|    }
  965|       |
  966|  1.76k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&sorted_out_degrees, vcount);
  ------------------
  |  |  119|  1.76k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.76k|    do { \
  |  |  |  |  657|  1.76k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.76k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.76k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.76k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.76k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.76k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.76k|    do { \
  |  |  |  |  604|  1.76k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.76k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.76k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.76k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.76k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.76k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.76k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.76k]
  |  |  ------------------
  ------------------
  967|  1.76k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&sorted_in_degrees, vcount);
  ------------------
  |  |  119|  1.76k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.76k|    do { \
  |  |  |  |  657|  1.76k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.76k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.76k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.76k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.76k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.76k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.76k|    do { \
  |  |  |  |  604|  1.76k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.76k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.76k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.76k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.76k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.76k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.76k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.76k]
  |  |  ------------------
  ------------------
  968|       |
  969|       |    /* In the following loop, in_degree_counts[d] keeps track of the number of vertices
  970|       |     * with in-degree d that were already placed. */
  971|  1.76k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&in_degree_counts, vcount);
  ------------------
  |  |  119|  1.76k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.76k|    do { \
  |  |  |  |  657|  1.76k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.76k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.76k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.76k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.76k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.76k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.76k|    do { \
  |  |  |  |  604|  1.76k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.76k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.76k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.76k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.76k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.76k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.76k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.76k]
  |  |  ------------------
  ------------------
  972|       |
  973|   331k|    for (igraph_int_t v = 0; v < vcount; v++) {
  ------------------
  |  Branch (973:30): [True: 329k, False: 1.76k]
  ------------------
  974|   329k|        igraph_int_t outdeg = VECTOR(*out_degrees)[v];
  ------------------
  |  |   60|   329k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  975|   329k|        igraph_int_t indeg  = VECTOR(*in_degrees)[v];
  ------------------
  |  |   60|   329k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  976|   329k|        igraph_int_t idx = VECTOR(in_degree_cumcounts)[indeg] + VECTOR(in_degree_counts)[indeg];
  ------------------
  |  |   60|   329k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      igraph_int_t idx = VECTOR(in_degree_cumcounts)[indeg] + VECTOR(in_degree_counts)[indeg];
  ------------------
  |  |   60|   329k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  977|   329k|        VECTOR(sorted_out_degrees)[vcount - idx - 1] = outdeg;
  ------------------
  |  |   60|   329k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  978|   329k|        VECTOR(sorted_in_degrees)[vcount - idx - 1] = indeg;
  ------------------
  |  |   60|   329k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  979|   329k|        VECTOR(in_degree_counts)[indeg]++;
  ------------------
  |  |   60|   329k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  980|   329k|    }
  981|       |
  982|  1.76k|    igraph_vector_int_destroy(&in_degree_counts);
  983|  1.76k|    igraph_vector_int_destroy(&in_degree_cumcounts);
  984|  1.76k|    IGRAPH_FINALLY_CLEAN(2);
  985|       |
  986|       |    /* Be optimistic, then check whether the Fulkerson–Chen–Anstee condition
  987|       |     * holds for every k. In particular, for every k in [0; n), it must be true
  988|       |     * that:
  989|       |     *
  990|       |     * \sum_{i=0}^k indegree[i] <=
  991|       |     *     \sum_{i=0}^k min(outdegree[i], k) +
  992|       |     *     \sum_{i=k+1}^{n-1} min(outdegree[i], k + 1)
  993|       |     */
  994|       |
  995|  1.76k|#define INDEGREE(x) (VECTOR(sorted_in_degrees)[x])
  996|  1.76k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  997|       |
  998|  1.76k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&left_pq, vcount);
  ------------------
  |  |  119|  1.76k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.76k|    do { \
  |  |  |  |  657|  1.76k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.76k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.76k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.76k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.76k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.76k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.76k|    do { \
  |  |  |  |  604|  1.76k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.76k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.76k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.76k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.76k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.76k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.76k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.76k]
  |  |  ------------------
  ------------------
  999|  1.76k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&right_pq, vcount);
  ------------------
  |  |  119|  1.76k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.76k|    do { \
  |  |  |  |  657|  1.76k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.76k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.76k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.76k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.76k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.76k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.76k|    do { \
  |  |  |  |  604|  1.76k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.76k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.76k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.76k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.76k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.76k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.76k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.76k]
  |  |  ------------------
  ------------------
 1000|       |
 1001|  1.76k|    left_pq_size = 0;
 1002|  1.76k|    right_pq_size = vcount;
 1003|  1.76k|    left_i = 0;
 1004|  1.76k|    right_i = 0;
 1005|  1.76k|    left_sum = 0;
 1006|  1.76k|    right_sum = 0;
 1007|   331k|    for (igraph_int_t i = 0; i < vcount; i++) {
  ------------------
  |  Branch (1007:30): [True: 329k, False: 1.76k]
  ------------------
 1008|   329k|        VECTOR(right_pq)[OUTDEGREE(i)]++;
  ------------------
  |  |   60|   329k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(right_pq)[OUTDEGREE(i)]++;
  ------------------
  |  |  996|   329k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|   329k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1009|   329k|    }
 1010|       |
 1011|  1.76k|    *res = true;
 1012|  1.76k|    lhs = 0;
 1013|  1.76k|    rhs = 0;
 1014|   273k|    for (igraph_int_t i = 0; i < vcount; i++) {
  ------------------
  |  Branch (1014:30): [True: 272k, False: 1.41k]
  ------------------
 1015|   272k|        lhs += INDEGREE(i);
  ------------------
  |  |  995|   272k|#define INDEGREE(x) (VECTOR(sorted_in_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|   272k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1016|       |
 1017|       |        /* It is enough to check for indexes where the in-degree is about to
 1018|       |         * decrease in the next step; see "Stronger condition" in the Wikipedia
 1019|       |         * entry for the Fulkerson-Chen-Anstee condition. However, this does not
 1020|       |         * provide any noticeable benefits for the current implementation. */
 1021|       |
 1022|   272k|        if (OUTDEGREE(i) < i) {
  ------------------
  |  |  996|   272k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|   272k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1022:13): [True: 268k, False: 3.12k]
  ------------------
 1023|   268k|            left_sum += OUTDEGREE(i);
  ------------------
  |  |  996|   268k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|   268k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1024|   268k|        }
 1025|  3.12k|        else {
 1026|  3.12k|            VECTOR(left_pq)[OUTDEGREE(i)]++;
  ------------------
  |  |   60|  3.12k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(left_pq)[OUTDEGREE(i)]++;
  ------------------
  |  |  996|  3.12k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|  3.12k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1027|  3.12k|            left_pq_size++;
 1028|  3.12k|        }
 1029|   542k|        while (left_i < i) {
  ------------------
  |  Branch (1029:16): [True: 270k, False: 272k]
  ------------------
 1030|   273k|            while (VECTOR(left_pq)[left_i] > 0) {
  ------------------
  |  |   60|   273k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1030:20): [True: 2.75k, False: 270k]
  ------------------
 1031|  2.75k|                VECTOR(left_pq)[left_i]--;
  ------------------
  |  |   60|  2.75k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1032|  2.75k|                left_pq_size--;
 1033|  2.75k|                left_sum += left_i;
 1034|  2.75k|            }
 1035|   270k|            left_i++;
 1036|   270k|        }
 1037|       |
 1038|   544k|        while (right_i < i + 1) {
  ------------------
  |  Branch (1038:16): [True: 272k, False: 272k]
  ------------------
 1039|   598k|            while (VECTOR(right_pq)[right_i] > 0) {
  ------------------
  |  |   60|   598k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1039:20): [True: 326k, False: 272k]
  ------------------
 1040|   326k|                VECTOR(right_pq)[right_i]--;
  ------------------
  |  |   60|   326k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1041|   326k|                right_pq_size--;
 1042|   326k|                right_sum += right_i;
 1043|   326k|            }
 1044|   272k|            right_i++;
 1045|   272k|        }
 1046|   272k|        if (OUTDEGREE(i) < i + 1) {
  ------------------
  |  |  996|   272k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|   272k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1046:13): [True: 270k, False: 1.56k]
  ------------------
 1047|   270k|            right_sum -= OUTDEGREE(i);
  ------------------
  |  |  996|   270k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|   270k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1048|   270k|        }
 1049|  1.56k|        else {
 1050|  1.56k|            VECTOR(right_pq)[OUTDEGREE(i)]--;
  ------------------
  |  |   60|  1.56k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(right_pq)[OUTDEGREE(i)]--;
  ------------------
  |  |  996|  1.56k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|  1.56k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1051|  1.56k|            right_pq_size--;
 1052|  1.56k|        }
 1053|       |
 1054|   272k|        rhs = left_sum + i * left_pq_size + right_sum + (i + 1) * right_pq_size;
 1055|   272k|        if (lhs > rhs) {
  ------------------
  |  Branch (1055:13): [True: 344, False: 271k]
  ------------------
 1056|    344|            *res = false;
 1057|    344|            break;
 1058|    344|        }
 1059|   272k|    }
 1060|       |
 1061|  1.76k|#undef INDEGREE
 1062|  1.76k|#undef OUTDEGREE
 1063|       |
 1064|  1.76k|    igraph_vector_int_destroy(&sorted_in_degrees);
 1065|  1.76k|    igraph_vector_int_destroy(&sorted_out_degrees);
 1066|  1.76k|    igraph_vector_int_destroy(&left_pq);
 1067|  1.76k|    igraph_vector_int_destroy(&right_pq);
 1068|  1.76k|    IGRAPH_FINALLY_CLEAN(4);
 1069|       |
 1070|  1.76k|    return IGRAPH_SUCCESS;
 1071|  1.76k|}
graphicality.c:igraph_i_is_bigraphical_multi:
 1081|  2.00k|static igraph_error_t igraph_i_is_bigraphical_multi(const igraph_vector_int_t *degrees1, const igraph_vector_int_t *degrees2, igraph_bool_t *res) {
 1082|  2.00k|    igraph_int_t i;
 1083|  2.00k|    igraph_int_t sum1, sum2;
 1084|  2.00k|    igraph_int_t n1 = igraph_vector_int_size(degrees1), n2 = igraph_vector_int_size(degrees2);
 1085|       |
 1086|  2.00k|    sum1 = 0;
 1087|   334k|    for (i = 0; i < n1; ++i) {
  ------------------
  |  Branch (1087:17): [True: 332k, False: 2.00k]
  ------------------
 1088|   332k|        igraph_int_t d = VECTOR(*degrees1)[i];
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1089|       |
 1090|   332k|        if (d < 0) {
  ------------------
  |  Branch (1090:13): [True: 0, False: 332k]
  ------------------
 1091|      0|            *res = false;
 1092|      0|            return IGRAPH_SUCCESS;
 1093|      0|        }
 1094|       |
 1095|   332k|        sum1 += d;
 1096|   332k|    }
 1097|       |
 1098|  2.00k|    sum2 = 0;
 1099|   334k|    for (i = 0; i < n2; ++i) {
  ------------------
  |  Branch (1099:17): [True: 332k, False: 2.00k]
  ------------------
 1100|   332k|        igraph_int_t d = VECTOR(*degrees2)[i];
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1101|       |
 1102|   332k|        if (d < 0) {
  ------------------
  |  Branch (1102:13): [True: 0, False: 332k]
  ------------------
 1103|      0|            *res = false;
 1104|      0|            return IGRAPH_SUCCESS;
 1105|      0|        }
 1106|       |
 1107|   332k|        sum2 += d;
 1108|   332k|    }
 1109|       |
 1110|  2.00k|    *res = (sum1 == sum2);
 1111|       |
 1112|  2.00k|    return IGRAPH_SUCCESS;
 1113|  2.00k|}
graphicality.c:igraph_i_is_bigraphical_simple:
 1121|  2.00k|static igraph_error_t igraph_i_is_bigraphical_simple(const igraph_vector_int_t *degrees1, const igraph_vector_int_t *degrees2, igraph_bool_t *res) {
 1122|  2.00k|    igraph_int_t n1 = igraph_vector_int_size(degrees1), n2 = igraph_vector_int_size(degrees2);
 1123|  2.00k|    igraph_vector_int_t deg_freq1, deg_freq2;
 1124|  2.00k|    igraph_int_t lhs_sum, partial_rhs_sum, partial_rhs_count;
 1125|  2.00k|    igraph_int_t a, b, k;
 1126|       |
 1127|  2.00k|    if (n1 == 0 && n2 == 0) {
  ------------------
  |  Branch (1127:9): [True: 1, False: 2.00k]
  |  Branch (1127:20): [True: 1, False: 0]
  ------------------
 1128|      1|        *res = true;
 1129|      1|        return IGRAPH_SUCCESS;
 1130|      1|    }
 1131|       |
 1132|       |    /* The conditions from the multigraph case are necessary here as well. */
 1133|  2.00k|    IGRAPH_CHECK(igraph_i_is_bigraphical_multi(degrees1, degrees2, res));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
 1134|  2.00k|    if (! *res) {
  ------------------
  |  Branch (1134:9): [True: 0, False: 2.00k]
  ------------------
 1135|      0|        return IGRAPH_SUCCESS;
 1136|      0|    }
 1137|       |
 1138|       |    /* Ensure that degrees1 is the shorter vector as a minor optimization: */
 1139|  2.00k|    if (n2 < n1) {
  ------------------
  |  Branch (1139:9): [True: 0, False: 2.00k]
  ------------------
 1140|      0|        const igraph_vector_int_t *tmp;
 1141|      0|        igraph_int_t n;
 1142|       |
 1143|      0|        tmp = degrees1;
 1144|      0|        degrees1 = degrees2;
 1145|      0|        degrees2 = tmp;
 1146|       |
 1147|      0|        n = n1;
 1148|      0|        n1 = n2;
 1149|      0|        n2 = n;
 1150|      0|    }
 1151|       |
 1152|       |    /* Counting sort the degrees. */
 1153|       |    /* Since the graph is simple, a vertex's degree can be at most the size of the other partition. */
 1154|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&deg_freq1, n2+1);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
 1155|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&deg_freq2, n1+1);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
 1156|       |
 1157|   332k|    for (igraph_int_t i = 0; i < n1; ++i) {
  ------------------
  |  Branch (1157:30): [True: 331k, False: 1.79k]
  ------------------
 1158|   331k|        igraph_int_t degree = VECTOR(*degrees1)[i];
  ------------------
  |  |   60|   331k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1159|   331k|        if (degree > n2) {
  ------------------
  |  Branch (1159:13): [True: 208, False: 330k]
  ------------------
 1160|    208|            *res = false;
 1161|    208|            goto bigraphical_simple_done;
 1162|    208|        }
 1163|   330k|        ++VECTOR(deg_freq1)[degree];
  ------------------
  |  |   60|   330k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1164|   330k|    }
 1165|   331k|    for (igraph_int_t i = 0; i < n2; ++i) {
  ------------------
  |  Branch (1165:30): [True: 330k, False: 1.78k]
  ------------------
 1166|   330k|        igraph_int_t degree = VECTOR(*degrees2)[i];
  ------------------
  |  |   60|   330k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1167|   330k|        if (degree > n1) {
  ------------------
  |  Branch (1167:13): [True: 5, False: 330k]
  ------------------
 1168|      5|            *res = false;
 1169|      5|            goto bigraphical_simple_done;
 1170|      5|        }
 1171|   330k|        ++VECTOR(deg_freq2)[degree];
  ------------------
  |  |   60|   330k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1172|   330k|    }
 1173|       |
 1174|       |    /*
 1175|       |     * We follow the description of the Gale-Ryser theorem in:
 1176|       |     *
 1177|       |     * A. Berger, A note on the characterization of digraphic sequences, Discrete Math. 314, 38 (2014).
 1178|       |     * https://doi.org/10.1016/j.disc.2013.09.010
 1179|       |     *
 1180|       |     * Gale-Ryser condition with 0-based indexing:
 1181|       |     *
 1182|       |     * a_i and b_i denote the degree sequences of the two partitions.
 1183|       |     *
 1184|       |     * Assuming that a_0 >= a_1 >= ... >= a_{n_1 - 1},
 1185|       |     *
 1186|       |     * \sum_{i=0}^k a_i <= \sum_{j=0}^{n_2} min(b_i, k+1)
 1187|       |     *
 1188|       |     * for all 0 <= k < n_1.
 1189|       |     *
 1190|       |     * Additionally, based on Theorem 3 in [Berger 2014], it is sufficient to do the check
 1191|       |     * for k such that a_k > a_{k+1} and for k=(n_1-1).
 1192|       |     */
 1193|       |
 1194|       |    /* While this formulation does not require sorting degree2,
 1195|       |     * doing so allows for a linear-time incremental computation
 1196|       |     * of the inequality's right-hand-side.
 1197|       |     */
 1198|       |
 1199|  1.78k|    *res = true; /* be optimistic */
 1200|  1.78k|    lhs_sum = 0;
 1201|  1.78k|    partial_rhs_sum = 0; /* the sum of those elements in the rhs which are <= (k+1) */
 1202|  1.78k|    partial_rhs_count = 0; /* number of elements in the rhs which are <= (k+1) */
 1203|  1.78k|    b = 0; /* index in deg_freq2 */
 1204|  1.78k|    k = -1;
 1205|   325k|    for (a = n2; a >= 0; --a) {
  ------------------
  |  Branch (1205:18): [True: 323k, False: 1.56k]
  ------------------
 1206|   323k|        igraph_int_t acount = VECTOR(deg_freq1)[a];
  ------------------
  |  |   60|   323k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1207|   323k|        lhs_sum += a * acount;
 1208|   323k|        k += acount;
 1209|       |
 1210|   615k|        while (b <= k + 1) {
  ------------------
  |  Branch (1210:16): [True: 292k, False: 323k]
  ------------------
 1211|   292k|            igraph_int_t bcount = VECTOR(deg_freq2)[b];
  ------------------
  |  |   60|   292k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1212|   292k|            partial_rhs_sum += b * bcount;
 1213|   292k|            partial_rhs_count += bcount;
 1214|       |
 1215|   292k|            ++b;
 1216|   292k|        }
 1217|       |
 1218|       |        /* rhs_sum for a given k is partial_rhs_sum + (n2 - partial_rhs_count) * (k+1) */
 1219|   323k|        if (lhs_sum > partial_rhs_sum + (n2 - partial_rhs_count) * (k+1) ) {
  ------------------
  |  Branch (1219:13): [True: 226, False: 323k]
  ------------------
 1220|    226|            *res = false;
 1221|    226|            break;
 1222|    226|        }
 1223|   323k|    }
 1224|       |
 1225|  2.00k|bigraphical_simple_done:
 1226|  2.00k|    igraph_vector_int_destroy(&deg_freq1);
 1227|  2.00k|    igraph_vector_int_destroy(&deg_freq2);
 1228|  2.00k|    IGRAPH_FINALLY_CLEAN(2);
 1229|       |
 1230|  2.00k|    return IGRAPH_SUCCESS;
 1231|  1.78k|}

igraph_assortativity:
  277|  2.00k|        igraph_bool_t directed, igraph_bool_t normalized) {
  278|       |
  279|  2.00k|    const igraph_int_t no_of_nodes = igraph_vcount(graph);
  280|  2.00k|    const igraph_int_t no_of_edges = igraph_ecount(graph);
  281|  2.00k|    igraph_real_t total_weight;
  282|       |
  283|  2.00k|    directed = directed && igraph_is_directed(graph);
  ------------------
  |  Branch (283:16): [True: 2.00k, False: 0]
  |  Branch (283:28): [True: 2.00k, False: 0]
  ------------------
  284|       |
  285|  2.00k|    if (weights && igraph_vector_size(weights) != no_of_edges) {
  ------------------
  |  Branch (285:9): [True: 0, False: 2.00k]
  |  Branch (285:20): [True: 0, False: 0]
  ------------------
  286|      0|        IGRAPH_ERRORF("Weight vector length (%" IGRAPH_PRId ") does not match number of edges (%" IGRAPH_PRId ").",
  ------------------
  |  |  464|      0|    do { \
  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  467|      0|        return igraph_errno; \
  |  |  468|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  287|      0|                      IGRAPH_EINVAL,
  288|      0|                      igraph_vector_size(weights), no_of_edges);
  289|      0|    }
  290|       |
  291|  2.00k|    if (!directed && values_in) {
  ------------------
  |  Branch (291:9): [True: 0, False: 2.00k]
  |  Branch (291:22): [True: 0, False: 0]
  ------------------
  292|      0|        IGRAPH_WARNING(
  ------------------
  |  |  797|      0|    do { \
  |  |  798|      0|        igraph_warning(reason, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  799|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (799:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  293|      0|            "Incoming vertex values are ignored when calculating undirected assortativity.");
  294|      0|    }
  295|       |
  296|  2.00k|    if (igraph_vector_size(values) != no_of_nodes) {
  ------------------
  |  Branch (296:9): [True: 0, False: 2.00k]
  ------------------
  297|      0|        IGRAPH_ERROR("Invalid vertex values vector length.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  298|      0|    }
  299|       |
  300|  2.00k|    if (values_in && igraph_vector_size(values_in) != no_of_nodes) {
  ------------------
  |  Branch (300:9): [True: 2.00k, False: 0]
  |  Branch (300:22): [True: 0, False: 2.00k]
  ------------------
  301|      0|        IGRAPH_ERROR("Invalid incoming vertex values vector length.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  302|      0|    }
  303|       |
  304|  2.00k|    total_weight = weights ? igraph_vector_sum(weights) : no_of_edges;
  ------------------
  |  Branch (304:20): [True: 0, False: 2.00k]
  ------------------
  305|       |
  306|  2.00k|    if (!directed) {
  ------------------
  |  Branch (306:9): [True: 0, False: 2.00k]
  ------------------
  307|      0|        igraph_real_t num1 = 0.0, num2 = 0.0, den1 = 0.0;
  308|       |
  309|      0|        if (weights) {
  ------------------
  |  Branch (309:13): [True: 0, False: 0]
  ------------------
  310|      0|            for (igraph_int_t e = 0; e < no_of_edges; e++) {
  ------------------
  |  Branch (310:38): [True: 0, False: 0]
  ------------------
  311|      0|                igraph_int_t from = IGRAPH_FROM(graph, e);
  ------------------
  |  |  115|      0|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  312|      0|                igraph_int_t to = IGRAPH_TO(graph, e);
  ------------------
  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  313|      0|                igraph_real_t from_value = VECTOR(*values)[from];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  314|      0|                igraph_real_t to_value = VECTOR(*values)[to];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  315|      0|                igraph_real_t w = VECTOR(*weights)[e];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  316|       |
  317|      0|                num1 += w * from_value * to_value;
  318|      0|                num2 += w * (from_value + to_value);
  319|      0|                if (normalized) {
  ------------------
  |  Branch (319:21): [True: 0, False: 0]
  ------------------
  320|      0|                    den1 += w * (from_value * from_value + to_value * to_value);
  321|      0|                }
  322|      0|            }
  323|      0|        } else {
  324|      0|            for (igraph_int_t e = 0; e < no_of_edges; e++) {
  ------------------
  |  Branch (324:38): [True: 0, False: 0]
  ------------------
  325|      0|                igraph_int_t from = IGRAPH_FROM(graph, e);
  ------------------
  |  |  115|      0|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  326|      0|                igraph_int_t to = IGRAPH_TO(graph, e);
  ------------------
  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  327|      0|                igraph_real_t from_value = VECTOR(*values)[from];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  328|      0|                igraph_real_t to_value = VECTOR(*values)[to];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  329|       |
  330|      0|                num1 += from_value * to_value;
  331|      0|                num2 += from_value + to_value;
  332|      0|                if (normalized) {
  ------------------
  |  Branch (332:21): [True: 0, False: 0]
  ------------------
  333|      0|                    den1 += from_value * from_value + to_value * to_value;
  334|      0|                }
  335|      0|            }
  336|      0|        }
  337|       |
  338|      0|        num1 /= total_weight;
  339|      0|        if (normalized) {
  ------------------
  |  Branch (339:13): [True: 0, False: 0]
  ------------------
  340|      0|            den1 /= total_weight * 2.0;
  341|      0|        }
  342|      0|        num2 /= total_weight * 2.0;
  343|      0|        num2 = num2 * num2;
  344|       |
  345|      0|        if (normalized) {
  ------------------
  |  Branch (345:13): [True: 0, False: 0]
  ------------------
  346|      0|            *res = (num1 - num2) / (den1 - num2);
  347|      0|        } else {
  348|      0|            *res = (num1 - num2);
  349|      0|        }
  350|       |
  351|  2.00k|    } else {
  352|  2.00k|        igraph_real_t num1 = 0.0, num2 = 0.0, num3 = 0.0,
  353|  2.00k|                      den1 = 0.0, den2 = 0.0;
  354|  2.00k|        igraph_real_t num, den;
  355|       |
  356|  2.00k|        if (!values_in) {
  ------------------
  |  Branch (356:13): [True: 0, False: 2.00k]
  ------------------
  357|      0|            values_in = values;
  358|      0|        }
  359|       |
  360|  2.00k|        if (weights) {
  ------------------
  |  Branch (360:13): [True: 0, False: 2.00k]
  ------------------
  361|      0|            for (igraph_int_t e = 0; e < no_of_edges; e++) {
  ------------------
  |  Branch (361:38): [True: 0, False: 0]
  ------------------
  362|      0|                igraph_int_t from = IGRAPH_FROM(graph, e);
  ------------------
  |  |  115|      0|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  363|      0|                igraph_int_t to = IGRAPH_TO(graph, e);
  ------------------
  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  364|      0|                igraph_real_t from_value = VECTOR(*values)[from];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  365|      0|                igraph_real_t to_value = VECTOR(*values_in)[to];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  366|      0|                igraph_real_t w = VECTOR(*weights)[e];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  367|       |
  368|      0|                num1 += w * from_value * to_value;
  369|      0|                num2 += w * from_value;
  370|      0|                num3 += w * to_value;
  371|      0|                if (normalized) {
  ------------------
  |  Branch (371:21): [True: 0, False: 0]
  ------------------
  372|      0|                    den1 += w * (from_value * from_value);
  373|      0|                    den2 += w * (to_value * to_value);
  374|      0|                }
  375|      0|            }
  376|  2.00k|        } else {
  377|  76.9k|            for (igraph_int_t e = 0; e < no_of_edges; e++) {
  ------------------
  |  Branch (377:38): [True: 74.9k, False: 2.00k]
  ------------------
  378|  74.9k|                igraph_int_t from = IGRAPH_FROM(graph, e);
  ------------------
  |  |  115|  74.9k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  379|  74.9k|                igraph_int_t to = IGRAPH_TO(graph, e);
  ------------------
  |  |  128|  74.9k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  380|  74.9k|                igraph_real_t from_value = VECTOR(*values)[from];
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  381|  74.9k|                igraph_real_t to_value = VECTOR(*values_in)[to];
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  382|       |
  383|  74.9k|                num1 += from_value * to_value;
  384|  74.9k|                num2 += from_value;
  385|  74.9k|                num3 += to_value;
  386|  74.9k|                if (normalized) {
  ------------------
  |  Branch (386:21): [True: 74.9k, False: 0]
  ------------------
  387|  74.9k|                    den1 += from_value * from_value;
  388|  74.9k|                    den2 += to_value * to_value;
  389|  74.9k|                }
  390|  74.9k|            }
  391|  2.00k|        }
  392|       |
  393|  2.00k|        num = num1 - num2 * num3 / total_weight;
  394|  2.00k|        if (normalized) {
  ------------------
  |  Branch (394:13): [True: 2.00k, False: 0]
  ------------------
  395|  2.00k|            den = sqrt(den1 - num2 * num2 / total_weight) *
  396|  2.00k|                    sqrt(den2 - num3 * num3 / total_weight);
  397|       |
  398|  2.00k|            *res = num / den;
  399|  2.00k|        } else {
  400|      0|            *res = num / total_weight;
  401|      0|        }
  402|  2.00k|    }
  403|       |
  404|  2.00k|    return IGRAPH_SUCCESS;
  405|  2.00k|}
igraph_assortativity_degree:
  445|  2.00k|                                igraph_bool_t directed) {
  446|       |
  447|  2.00k|    directed = directed && igraph_is_directed(graph);
  ------------------
  |  Branch (447:16): [True: 2.00k, False: 0]
  |  Branch (447:28): [True: 2.00k, False: 0]
  ------------------
  448|  2.00k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  449|       |
  450|       |    /* This function uses igraph_strength() instead of igraph_degree() in order to obtain
  451|       |     * a vector of reals instead of a vector of integers. */
  452|  2.00k|    if (directed) {
  ------------------
  |  Branch (452:9): [True: 2.00k, False: 0]
  ------------------
  453|  2.00k|        igraph_vector_t indegree, outdegree;
  454|  2.00k|        IGRAPH_VECTOR_INIT_FINALLY(&indegree, no_of_nodes);
  ------------------
  |  |  104|  2.00k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  2.00k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  455|  2.00k|        IGRAPH_VECTOR_INIT_FINALLY(&outdegree, no_of_nodes);
  ------------------
  |  |  104|  2.00k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  2.00k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  456|  2.00k|        IGRAPH_CHECK(igraph_strength(graph, &indegree, igraph_vss_all(), IGRAPH_IN, IGRAPH_LOOPS, NULL));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  457|  2.00k|        IGRAPH_CHECK(igraph_strength(graph, &outdegree, igraph_vss_all(), IGRAPH_OUT, IGRAPH_LOOPS, NULL));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  458|  2.00k|        IGRAPH_CHECK(igraph_assortativity(graph, NULL, &outdegree, &indegree, res, /* directed */ true, /* normalized */ true));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  459|  2.00k|        igraph_vector_destroy(&indegree);
  460|  2.00k|        igraph_vector_destroy(&outdegree);
  461|  2.00k|        IGRAPH_FINALLY_CLEAN(2);
  462|  2.00k|    } else {
  463|      0|        igraph_vector_t degree;
  464|      0|        IGRAPH_VECTOR_INIT_FINALLY(&degree, no_of_nodes);
  ------------------
  |  |  104|      0|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|      0|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 0]
  |  |  ------------------
  ------------------
  465|      0|        IGRAPH_CHECK(igraph_strength(graph, &degree, igraph_vss_all(), IGRAPH_ALL, IGRAPH_LOOPS, NULL));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  466|      0|        IGRAPH_CHECK(igraph_assortativity(graph, NULL, &degree, 0, res, /* directed */ false, /* normalized */ true));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  467|      0|        igraph_vector_destroy(&degree);
  468|      0|        IGRAPH_FINALLY_CLEAN(1);
  469|      0|    }
  470|       |
  471|  2.00k|    return IGRAPH_SUCCESS;
  472|  2.00k|}

igraph_add_edge:
   49|  2.00k|igraph_error_t igraph_add_edge(igraph_t *graph, igraph_int_t from, igraph_int_t to) {
   50|  2.00k|    igraph_vector_int_t edges;
   51|       |
   52|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, 2);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   53|       |
   54|  2.00k|    VECTOR(edges)[0] = from;
  ------------------
  |  |   60|  2.00k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   55|  2.00k|    VECTOR(edges)[1] = to;
  ------------------
  |  |   60|  2.00k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   56|  2.00k|    IGRAPH_CHECK(igraph_add_edges(graph, &edges, NULL));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   57|       |
   58|  2.00k|    igraph_vector_int_destroy(&edges);
   59|  2.00k|    IGRAPH_FINALLY_CLEAN(1);
   60|  2.00k|    return IGRAPH_SUCCESS;
   61|  2.00k|}

igraph_reverse_edges:
   54|  2.00k|igraph_error_t igraph_reverse_edges(igraph_t *graph, const igraph_es_t eids) {
   55|  2.00k|    igraph_int_t no_of_edges = igraph_ecount(graph);
   56|  2.00k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
   57|  2.00k|    igraph_vector_int_t edges;
   58|  2.00k|    igraph_eit_t eit;
   59|  2.00k|    igraph_t new_graph;
   60|       |
   61|       |    /* Nothing to do on undirected graph. */
   62|  2.00k|    if (! igraph_is_directed(graph)) {
  ------------------
  |  Branch (62:9): [True: 0, False: 2.00k]
  ------------------
   63|      0|        return IGRAPH_SUCCESS;
   64|      0|    }
   65|       |
   66|       |    /* Use fast method when all edges are to be reversed. */
   67|  2.00k|    if (igraph_es_is_all(&eids)) {
  ------------------
  |  Branch (67:9): [True: 2.00k, False: 0]
  ------------------
   68|  2.00k|        return igraph_i_reverse(graph);
   69|  2.00k|    }
   70|       |
   71|       |    /* Convert graph to edge list. */
   72|      0|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, 2*no_of_edges);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
   73|      0|    IGRAPH_CHECK(igraph_get_edgelist(graph, &edges, /* bycol= */ false));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   74|       |
   75|       |    /* Reverse the edges. */
   76|       |
   77|      0|    IGRAPH_CHECK(igraph_eit_create(graph, eids, &eit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   78|      0|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   79|       |
   80|      0|    for (; !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  371|      0|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                  for (; !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  359|      0|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (80:12): [True: 0, False: 0]
  ------------------
   81|      0|        igraph_int_t eid = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|      0|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  406|      0|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
   82|      0|        igraph_int_t tmp = VECTOR(edges)[2*eid];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
   83|      0|        VECTOR(edges)[2*eid] = VECTOR(edges)[2*eid + 1];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(edges)[2*eid] = VECTOR(edges)[2*eid + 1];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
   84|      0|        VECTOR(edges)[2*eid + 1] = tmp;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
   85|      0|    }
   86|       |
   87|       |    /* Re-create graph from edge list and transfer attributes. */
   88|      0|    IGRAPH_CHECK(igraph_create(&new_graph, &edges, no_of_nodes, IGRAPH_DIRECTED));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   89|      0|    IGRAPH_FINALLY(igraph_destroy, &new_graph);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   90|       |
   91|      0|    IGRAPH_CHECK(igraph_i_attribute_copy(&new_graph, graph, true, true, true));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   92|       |
   93|      0|    igraph_eit_destroy(&eit);
   94|      0|    igraph_vector_int_destroy(&edges);
   95|      0|    igraph_destroy(graph);
   96|      0|    IGRAPH_FINALLY_CLEAN(3);
   97|       |
   98|      0|    *graph = new_graph;
   99|       |
  100|      0|    return IGRAPH_SUCCESS;
  101|      0|}

igraph_i_rewire:
   43|  1.97k|igraph_error_t igraph_i_rewire(igraph_t *graph, igraph_int_t n, igraph_bool_t loops, igraph_bool_t use_adjlist, igraph_rewiring_stats_t *stats) {
   44|  1.97k|    const igraph_int_t no_of_edges = igraph_ecount(graph);
   45|  1.97k|    char message[256];
   46|  1.97k|    igraph_int_t a, b, c, d, dummy, num_swaps, num_successful_swaps;
   47|  1.97k|    igraph_vector_int_t eids;
   48|  1.97k|    igraph_vector_int_t edgevec, alledges;
   49|  1.97k|    const igraph_bool_t directed = igraph_is_directed(graph);
   50|  1.97k|    igraph_bool_t ok;
   51|  1.97k|    igraph_es_t es;
   52|  1.97k|    igraph_adjlist_t al;
   53|       |
   54|  1.97k|    if (no_of_edges < 2) {
  ------------------
  |  Branch (54:9): [True: 795, False: 1.18k]
  ------------------
   55|       |        /* There are no possible rewirings, return with the same graph. */
   56|    795|        return IGRAPH_SUCCESS;
   57|    795|    }
   58|       |
   59|  1.18k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&eids, 2);
  ------------------
  |  |  119|  1.18k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.18k|    do { \
  |  |  |  |  657|  1.18k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.18k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.18k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.18k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.18k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.18k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.18k|    do { \
  |  |  |  |  604|  1.18k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.18k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.18k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.18k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.18k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.18k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.18k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.18k]
  |  |  ------------------
  ------------------
   60|       |
   61|  1.18k|    if (use_adjlist) {
  ------------------
  |  Branch (61:9): [True: 716, False: 468]
  ------------------
   62|       |        /* As well as the sorted adjacency list, we maintain an unordered
   63|       |         * list of edges for picking a random edge in constant time.
   64|       |         */
   65|    716|        IGRAPH_CHECK(igraph_adjlist_init(graph, &al, IGRAPH_OUT, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|    716|    do { \
  |  |  657|    716|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    716|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    716|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 716]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    716|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 716]
  |  |  ------------------
  ------------------
   66|    716|        IGRAPH_FINALLY(igraph_adjlist_destroy, &al);
  ------------------
  |  |  603|    716|    do { \
  |  |  604|    716|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    716|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    716|         * incorrect destructor function with the pointer */ \
  |  |  607|    716|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 716]
  |  |  ------------------
  |  |  608|    716|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    716|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 716]
  |  |  ------------------
  ------------------
   67|    716|        IGRAPH_VECTOR_INT_INIT_FINALLY(&alledges, no_of_edges * 2);
  ------------------
  |  |  119|    716|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    716|    do { \
  |  |  |  |  657|    716|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    716|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    716|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 716]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    716|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 716]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    716|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    716|    do { \
  |  |  |  |  604|    716|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    716|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    716|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    716|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 716]
  |  |  |  |  ------------------
  |  |  |  |  608|    716|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    716|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 716]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 716]
  |  |  ------------------
  ------------------
   68|    716|        IGRAPH_CHECK(igraph_get_edgelist(graph, &alledges, /*bycol=*/ false));
  ------------------
  |  |  656|    716|    do { \
  |  |  657|    716|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    716|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    716|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 716]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    716|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 716]
  |  |  ------------------
  ------------------
   69|    716|    } else {
   70|    468|        IGRAPH_VECTOR_INT_INIT_FINALLY(&edgevec, 4);
  ------------------
  |  |  119|    468|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    468|    do { \
  |  |  |  |  657|    468|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    468|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    468|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 468]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    468|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 468]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    468|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    468|    do { \
  |  |  |  |  604|    468|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    468|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    468|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    468|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 468]
  |  |  |  |  ------------------
  |  |  |  |  608|    468|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    468|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 468]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 468]
  |  |  ------------------
  ------------------
   71|    468|        es = igraph_ess_vector(&eids);
   72|    468|    }
   73|       |
   74|       |    /* We count both successful and unsuccessful rewiring trials.
   75|       |     * This is necessary for uniform sampling. */
   76|       |
   77|  1.18k|    num_swaps = num_successful_swaps = 0;
   78|  47.6k|    while (num_swaps < n) {
  ------------------
  |  Branch (78:12): [True: 46.4k, False: 1.18k]
  ------------------
   79|       |
   80|  46.4k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  46.4k|    do { \
  |  |   47|  46.4k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 46.4k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  46.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 46.4k]
  |  |  ------------------
  ------------------
   81|       |
   82|  46.4k|        if (num_swaps % 1000 == 0) {
  ------------------
  |  Branch (82:13): [True: 1.18k, False: 45.2k]
  ------------------
   83|  1.18k|            snprintf(message, sizeof(message),
   84|  1.18k|                     "Random rewiring (%.2f%% of the trials were successful)",
   85|  1.18k|                     num_swaps > 0 ? ((100.0 * num_successful_swaps) / num_swaps) : 0.0);
  ------------------
  |  Branch (85:22): [True: 0, False: 1.18k]
  ------------------
   86|  1.18k|            IGRAPH_PROGRESS(message, (100.0 * num_swaps) / n, 0);
  ------------------
  |  |  169|  1.18k|    do { \
  |  |  170|  1.18k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  1.18k|    do { \
  |  |  |  |  657|  1.18k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.18k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.18k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.18k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.18k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  1.18k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 1.18k]
  |  |  ------------------
  ------------------
   87|  1.18k|        }
   88|       |
   89|  46.4k|        ok = true;
   90|       |
   91|       |        /* Choose two edges randomly */
   92|  46.4k|        VECTOR(eids)[0] = RNG_INTEGER(0, no_of_edges - 1);
  ------------------
  |  |   60|  46.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(eids)[0] = RNG_INTEGER(0, no_of_edges - 1);
  ------------------
  |  |  152|  46.4k|#define RNG_INTEGER(l,h) (igraph_rng_get_integer(igraph_rng_default(),(l),(h)))
  ------------------
   93|  48.9k|        do {
   94|  48.9k|            VECTOR(eids)[1] = RNG_INTEGER(0, no_of_edges - 1);
  ------------------
  |  |   60|  48.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(eids)[1] = RNG_INTEGER(0, no_of_edges - 1);
  ------------------
  |  |  152|  48.9k|#define RNG_INTEGER(l,h) (igraph_rng_get_integer(igraph_rng_default(),(l),(h)))
  ------------------
   95|  48.9k|        } while (VECTOR(eids)[0] == VECTOR(eids)[1]);
  ------------------
  |  |   60|  48.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      } while (VECTOR(eids)[0] == VECTOR(eids)[1]);
  ------------------
  |  |   60|  48.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (95:18): [True: 2.55k, False: 46.4k]
  ------------------
   96|       |
   97|       |        /* Get the endpoints */
   98|  46.4k|        if (use_adjlist) {
  ------------------
  |  Branch (98:13): [True: 43.9k, False: 2.49k]
  ------------------
   99|  43.9k|            a = VECTOR(alledges)[VECTOR(eids)[0] * 2];
  ------------------
  |  |   60|  43.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          a = VECTOR(alledges)[VECTOR(eids)[0] * 2];
  ------------------
  |  |   60|  43.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  100|  43.9k|            b = VECTOR(alledges)[VECTOR(eids)[0] * 2 + 1];
  ------------------
  |  |   60|  43.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          b = VECTOR(alledges)[VECTOR(eids)[0] * 2 + 1];
  ------------------
  |  |   60|  43.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  101|  43.9k|            c = VECTOR(alledges)[VECTOR(eids)[1] * 2];
  ------------------
  |  |   60|  43.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          c = VECTOR(alledges)[VECTOR(eids)[1] * 2];
  ------------------
  |  |   60|  43.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  102|  43.9k|            d = VECTOR(alledges)[VECTOR(eids)[1] * 2 + 1];
  ------------------
  |  |   60|  43.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          d = VECTOR(alledges)[VECTOR(eids)[1] * 2 + 1];
  ------------------
  |  |   60|  43.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  103|  43.9k|        } else {
  104|  2.49k|            IGRAPH_CHECK(igraph_edge(graph, VECTOR(eids)[0], &a, &b));
  ------------------
  |  |  656|  2.49k|    do { \
  |  |  657|  2.49k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.49k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.49k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  105|  2.49k|            IGRAPH_CHECK(igraph_edge(graph, VECTOR(eids)[1], &c, &d));
  ------------------
  |  |  656|  2.49k|    do { \
  |  |  657|  2.49k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.49k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.49k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  106|  2.49k|        }
  107|       |
  108|       |        /* For an undirected graph, we have two "variants" of each edge, i.e.
  109|       |         * a -- b and b -- a. Since some rewirings can be performed only when we
  110|       |         * "swap" the endpoints, we do it now with probability 0.5 */
  111|  46.4k|        if (!directed && RNG_BOOL()) {
  ------------------
  |  |  151|      0|#define RNG_BOOL()       (igraph_rng_get_bool(igraph_rng_default()))
  |  |  ------------------
  |  |  |  Branch (151:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (111:13): [True: 0, False: 46.4k]
  ------------------
  112|      0|            dummy = c; c = d; d = dummy;
  113|      0|            if (use_adjlist) {
  ------------------
  |  Branch (113:17): [True: 0, False: 0]
  ------------------
  114|       |                /* Flip the edge in the unordered edge-list, so the update later on
  115|       |                 * hits the correct end. */
  116|      0|                VECTOR(alledges)[VECTOR(eids)[1] * 2] = c;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(alledges)[VECTOR(eids)[1] * 2] = c;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  117|      0|                VECTOR(alledges)[VECTOR(eids)[1] * 2 + 1] = d;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(alledges)[VECTOR(eids)[1] * 2 + 1] = d;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  118|      0|            }
  119|      0|        }
  120|       |
  121|       |        /* If we do not touch loops, check whether a == b or c == d and disallow
  122|       |         * the swap if needed */
  123|  46.4k|        if (!loops && (a == b || c == d)) {
  ------------------
  |  Branch (123:13): [True: 46.4k, False: 0]
  |  Branch (123:24): [True: 0, False: 46.4k]
  |  Branch (123:34): [True: 0, False: 46.4k]
  ------------------
  124|      0|            ok = false;
  125|  46.4k|        } else {
  126|       |            /* Check whether they are suitable for rewiring */
  127|  46.4k|            if (a == c || b == d) {
  ------------------
  |  Branch (127:17): [True: 5.31k, False: 41.1k]
  |  Branch (127:27): [True: 4.92k, False: 36.1k]
  ------------------
  128|       |                /* Swapping would have no effect */
  129|  10.2k|                ok = false;
  130|  36.1k|            } else {
  131|       |                /* a != c && b != d */
  132|       |                /* If a == d or b == c, the swap would generate at least one loop, so
  133|       |                 * we disallow them unless we want to have loops */
  134|  36.1k|                ok = loops || (a != d && b != c);
  ------------------
  |  Branch (134:22): [True: 0, False: 36.1k]
  |  Branch (134:32): [True: 34.4k, False: 1.77k]
  |  Branch (134:42): [True: 32.6k, False: 1.77k]
  ------------------
  135|       |                /* Also, if a == b and c == d and we allow loops, doing the swap
  136|       |                 * would result in a multiple edge if the graph is undirected */
  137|  36.1k|                ok = ok && (directed || a != b || c != d);
  ------------------
  |  Branch (137:22): [True: 32.6k, False: 3.54k]
  |  Branch (137:29): [True: 32.6k, False: 0]
  |  Branch (137:41): [True: 0, False: 0]
  |  Branch (137:51): [True: 0, False: 0]
  ------------------
  138|  36.1k|            }
  139|  46.4k|        }
  140|       |
  141|       |        /* All good so far. Now check for the existence of a --> d and c --> b to
  142|       |         * disallow the creation of multiple edges */
  143|  46.4k|        if (ok) {
  ------------------
  |  Branch (143:13): [True: 32.6k, False: 13.7k]
  ------------------
  144|  32.6k|            if (use_adjlist) {
  ------------------
  |  Branch (144:17): [True: 31.0k, False: 1.59k]
  ------------------
  145|  31.0k|                if (igraph_adjlist_has_edge(&al, a, d, directed)) {
  ------------------
  |  Branch (145:21): [True: 661, False: 30.3k]
  ------------------
  146|    661|                    ok = false;
  147|    661|                }
  148|  31.0k|            } else {
  149|  1.59k|                IGRAPH_CHECK(igraph_are_adjacent(graph, a, d, &ok));
  ------------------
  |  |  656|  1.59k|    do { \
  |  |  657|  1.59k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.59k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.59k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.59k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.59k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.59k]
  |  |  ------------------
  ------------------
  150|  1.59k|                ok = !ok;
  151|  1.59k|            }
  152|  32.6k|        }
  153|  46.4k|        if (ok) {
  ------------------
  |  Branch (153:13): [True: 31.8k, False: 14.5k]
  ------------------
  154|  31.8k|            if (use_adjlist) {
  ------------------
  |  Branch (154:17): [True: 30.3k, False: 1.48k]
  ------------------
  155|  30.3k|                if (igraph_adjlist_has_edge(&al, c, b, directed)) {
  ------------------
  |  Branch (155:21): [True: 593, False: 29.7k]
  ------------------
  156|    593|                    ok = false;
  157|    593|                }
  158|  30.3k|            } else {
  159|  1.48k|                IGRAPH_CHECK(igraph_are_adjacent(graph, c, b, &ok));
  ------------------
  |  |  656|  1.48k|    do { \
  |  |  657|  1.48k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.48k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.48k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.48k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.48k]
  |  |  ------------------
  ------------------
  160|  1.48k|                ok = !ok;
  161|  1.48k|            }
  162|  31.8k|        }
  163|       |
  164|       |        /* If we are still okay, we can perform the rewiring */
  165|  46.4k|        if (ok) {
  ------------------
  |  Branch (165:13): [True: 31.2k, False: 15.1k]
  ------------------
  166|       |            /* printf("Deleting: %" IGRAPH_PRId " -> %" IGRAPH_PRId ", %" IGRAPH_PRId " -> %" IGRAPH_PRId "\n",
  167|       |                          a, b, c, d); */
  168|  31.2k|            if (use_adjlist) {
  ------------------
  |  Branch (168:17): [True: 29.7k, False: 1.45k]
  ------------------
  169|       |                /* Replace entry in sorted adjlist: */
  170|  29.7k|                IGRAPH_CHECK(igraph_adjlist_replace_edge(&al, a, b, d, directed));
  ------------------
  |  |  656|  29.7k|    do { \
  |  |  657|  29.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  29.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  29.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 29.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  29.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 29.7k]
  |  |  ------------------
  ------------------
  171|  29.7k|                IGRAPH_CHECK(igraph_adjlist_replace_edge(&al, c, d, b, directed));
  ------------------
  |  |  656|  29.7k|    do { \
  |  |  657|  29.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  29.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  29.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 29.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  29.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 29.7k]
  |  |  ------------------
  ------------------
  172|       |                /* Also replace in unsorted edgelist: */
  173|  29.7k|                VECTOR(alledges)[VECTOR(eids)[0] * 2 + 1] = d;
  ------------------
  |  |   60|  29.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(alledges)[VECTOR(eids)[0] * 2 + 1] = d;
  ------------------
  |  |   60|  29.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  174|  29.7k|                VECTOR(alledges)[VECTOR(eids)[1] * 2 + 1] = b;
  ------------------
  |  |   60|  29.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(alledges)[VECTOR(eids)[1] * 2 + 1] = b;
  ------------------
  |  |   60|  29.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  175|  29.7k|            } else {
  176|  1.45k|                IGRAPH_CHECK(igraph_delete_edges(graph, es));
  ------------------
  |  |  656|  1.45k|    do { \
  |  |  657|  1.45k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.45k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.45k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.45k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.45k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.45k]
  |  |  ------------------
  ------------------
  177|  1.45k|                VECTOR(edgevec)[0] = a; VECTOR(edgevec)[1] = d;
  ------------------
  |  |   60|  1.45k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(edgevec)[0] = a; VECTOR(edgevec)[1] = d;
  ------------------
  |  |   60|  1.45k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  178|  1.45k|                VECTOR(edgevec)[2] = c; VECTOR(edgevec)[3] = b;
  ------------------
  |  |   60|  1.45k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(edgevec)[2] = c; VECTOR(edgevec)[3] = b;
  ------------------
  |  |   60|  1.45k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  179|       |                /* printf("Adding: %" IGRAPH_PRId " -> %" IGRAPH_PRId ", %" IGRAPH_PRId " -> %" IGRAPH_PRId "\n",
  180|       |                            a, d, c, b); */
  181|  1.45k|                IGRAPH_CHECK(igraph_add_edges(graph, &edgevec, 0));
  ------------------
  |  |  656|  1.45k|    do { \
  |  |  657|  1.45k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.45k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.45k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.45k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.45k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.45k]
  |  |  ------------------
  ------------------
  182|  1.45k|            }
  183|  31.2k|            num_successful_swaps++;
  184|  31.2k|        }
  185|       |
  186|  46.4k|        num_swaps++;
  187|  46.4k|    }
  188|       |
  189|  1.18k|    if (use_adjlist) {
  ------------------
  |  Branch (189:9): [True: 716, False: 468]
  ------------------
  190|       |        /* Replace graph edges with the adjlist current state */
  191|    716|        IGRAPH_CHECK(igraph_delete_edges(graph, igraph_ess_all(IGRAPH_EDGEORDER_ID)));
  ------------------
  |  |  656|    716|    do { \
  |  |  657|    716|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    716|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    716|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 716]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    716|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 716]
  |  |  ------------------
  ------------------
  192|    716|        IGRAPH_CHECK(igraph_add_edges(graph, &alledges, 0));
  ------------------
  |  |  656|    716|    do { \
  |  |  657|    716|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    716|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    716|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 716]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    716|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 716]
  |  |  ------------------
  ------------------
  193|    716|    }
  194|       |
  195|  1.18k|    IGRAPH_PROGRESS("Random rewiring: ", 100.0, 0);
  ------------------
  |  |  169|  1.18k|    do { \
  |  |  170|  1.18k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  1.18k|    do { \
  |  |  |  |  657|  1.18k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.18k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.18k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.18k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.18k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  1.18k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 1.18k]
  |  |  ------------------
  ------------------
  196|       |
  197|  1.18k|    if (use_adjlist) {
  ------------------
  |  Branch (197:9): [True: 716, False: 468]
  ------------------
  198|    716|        igraph_vector_int_destroy(&alledges);
  199|    716|        igraph_adjlist_destroy(&al);
  200|    716|    } else {
  201|    468|        igraph_vector_int_destroy(&edgevec);
  202|    468|    }
  203|       |
  204|  1.18k|    igraph_vector_int_destroy(&eids);
  205|  1.18k|    IGRAPH_FINALLY_CLEAN(use_adjlist ? 3 : 2);
  ------------------
  |  Branch (205:26): [True: 716, False: 468]
  ------------------
  206|       |
  207|  1.18k|    if (stats) {
  ------------------
  |  Branch (207:9): [True: 0, False: 1.18k]
  ------------------
  208|      0|        memset(stats, 0, sizeof(igraph_rewiring_stats_t));
  209|      0|        stats->successful_swaps = num_successful_swaps;
  210|      0|    }
  211|       |
  212|  1.18k|    return IGRAPH_SUCCESS;
  213|  1.18k|}
igraph_rewire:
  258|  1.97k|igraph_error_t igraph_rewire(igraph_t *graph, igraph_int_t n, igraph_edge_type_sw_t allowed_edge_types, igraph_rewiring_stats_t *stats) {
  259|  1.97k|    igraph_bool_t use_adjlist = n >= REWIRE_ADJLIST_THRESHOLD;
  ------------------
  |  |   40|  1.97k|#define REWIRE_ADJLIST_THRESHOLD 10
  ------------------
  260|       |
  261|  1.97k|    if ((allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ||
  ------------------
  |  |   25|  1.97k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (261:9): [True: 0, False: 1.97k]
  ------------------
  262|  1.97k|        (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW)) {
  ------------------
  |  |   26|  1.97k|#define IGRAPH_I_MULTI_LOOPS_SW 0x04 /* 100, more than one self-loop allowed on the same vertex   */
  ------------------
  |  Branch (262:9): [True: 0, False: 1.97k]
  ------------------
  263|      0|        IGRAPH_ERROR("Rewiring multigraphs is not yet implemented.", IGRAPH_UNIMPLEMENTED);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  264|      0|    }
  265|       |
  266|  1.97k|    return igraph_i_rewire(graph, n, allowed_edge_types & IGRAPH_LOOPS_SW, use_adjlist, stats);
  267|  1.97k|}

igraph_simplify:
   57|  2.00k|                               const igraph_attribute_combination_t *edge_comb) {
   58|       |
   59|  2.00k|    igraph_vector_int_t edges;
   60|  2.00k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
   61|  2.00k|    igraph_int_t no_of_edges = igraph_ecount(graph);
   62|  2.00k|    igraph_int_t edge;
   63|  2.00k|    igraph_bool_t attr = edge_comb && igraph_has_attribute_table();
  ------------------
  |  Branch (63:26): [True: 0, False: 2.00k]
  |  Branch (63:39): [True: 0, False: 0]
  ------------------
   64|  2.00k|    igraph_int_t from, to, pfrom = -1, pto = -2;
   65|  2.00k|    igraph_t res;
   66|  2.00k|    igraph_es_t es;
   67|  2.00k|    igraph_eit_t eit;
   68|  2.00k|    igraph_vector_int_t mergeinto;
   69|  2.00k|    igraph_int_t actedge;
   70|       |
   71|       |    /* if we already know there are no multi-edges, they don't need to be removed */
   72|  2.00k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MULTI) &&
  ------------------
  |  Branch (72:9): [True: 2.00k, False: 0]
  ------------------
   73|  2.00k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_MULTI)) {
  ------------------
  |  Branch (73:9): [True: 1.35k, False: 651]
  ------------------
   74|  1.35k|        remove_multiple = false;
   75|  1.35k|    }
   76|       |
   77|       |    /* if we already know there are no loops, they don't need to be removed */
   78|  2.00k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (78:9): [True: 2.00k, False: 0]
  ------------------
   79|  2.00k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (79:9): [True: 1.32k, False: 675]
  ------------------
   80|  1.32k|        remove_loops = false;
   81|  1.32k|    }
   82|       |
   83|  2.00k|    if (!remove_multiple && !remove_loops)
  ------------------
  |  Branch (83:9): [True: 1.35k, False: 651]
  |  Branch (83:29): [True: 1.08k, False: 265]
  ------------------
   84|       |        /* nothing to do */
   85|  1.08k|    {
   86|  1.08k|        return IGRAPH_SUCCESS;
   87|  1.08k|    }
   88|       |
   89|    916|    if (!remove_multiple) {
  ------------------
  |  Branch (89:9): [True: 265, False: 651]
  ------------------
   90|    265|        igraph_vector_int_t edges_to_delete;
   91|       |
   92|       |        /* removing loop edges only, this is simple. No need to combine anything
   93|       |         * and the whole process can be done in-place */
   94|    265|        IGRAPH_VECTOR_INT_INIT_FINALLY(&edges_to_delete, 0);
  ------------------
  |  |  119|    265|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    265|    do { \
  |  |  |  |  657|    265|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    265|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    265|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 265]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    265|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 265]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    265|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    265|    do { \
  |  |  |  |  604|    265|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    265|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    265|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    265|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 265]
  |  |  |  |  ------------------
  |  |  |  |  608|    265|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    265|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 265]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 265]
  |  |  ------------------
  ------------------
   95|    265|        IGRAPH_CHECK(igraph_es_all(&es, IGRAPH_EDGEORDER_ID));
  ------------------
  |  |  656|    265|    do { \
  |  |  657|    265|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    265|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    265|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 265]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    265|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 265]
  |  |  ------------------
  ------------------
   96|    265|        IGRAPH_FINALLY(igraph_es_destroy, &es);
  ------------------
  |  |  603|    265|    do { \
  |  |  604|    265|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    265|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    265|         * incorrect destructor function with the pointer */ \
  |  |  607|    265|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 265]
  |  |  ------------------
  |  |  608|    265|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    265|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 265]
  |  |  ------------------
  ------------------
   97|    265|        IGRAPH_CHECK(igraph_eit_create(graph, es, &eit));
  ------------------
  |  |  656|    265|    do { \
  |  |  657|    265|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    265|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    265|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 265]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    265|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 265]
  |  |  ------------------
  ------------------
   98|    265|        IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  603|    265|    do { \
  |  |  604|    265|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    265|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    265|         * incorrect destructor function with the pointer */ \
  |  |  607|    265|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 265]
  |  |  ------------------
  |  |  608|    265|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    265|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 265]
  |  |  ------------------
  ------------------
   99|       |
  100|  7.84k|        while (!IGRAPH_EIT_END(eit)) {
  ------------------
  |  |  371|  7.84k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
  |  Branch (100:16): [True: 7.57k, False: 265]
  ------------------
  101|  7.57k|            edge = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|  7.57k|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 7.57k, False: 0]
  |  |  ------------------
  |  |  406|  7.57k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  102|  7.57k|            from = IGRAPH_FROM(graph, edge);
  ------------------
  |  |  115|  7.57k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  7.57k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  103|  7.57k|            to = IGRAPH_TO(graph, edge);
  ------------------
  |  |  128|  7.57k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  7.57k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  104|  7.57k|            if (from == to) {
  ------------------
  |  Branch (104:17): [True: 887, False: 6.68k]
  ------------------
  105|    887|                IGRAPH_CHECK(igraph_vector_int_push_back(&edges_to_delete, edge));
  ------------------
  |  |  656|    887|    do { \
  |  |  657|    887|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    887|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    887|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 887]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    887|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 887]
  |  |  ------------------
  ------------------
  106|    887|            }
  107|  7.57k|            IGRAPH_EIT_NEXT(eit);
  ------------------
  |  |  359|  7.57k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  108|  7.57k|        }
  109|       |
  110|    265|        igraph_eit_destroy(&eit);
  111|    265|        igraph_es_destroy(&es);
  112|    265|        IGRAPH_FINALLY_CLEAN(2);
  113|       |
  114|    265|        if (igraph_vector_int_size(&edges_to_delete) > 0) {
  ------------------
  |  Branch (114:13): [True: 265, False: 0]
  ------------------
  115|    265|            IGRAPH_CHECK(igraph_delete_edges(graph, igraph_ess_vector(&edges_to_delete)));
  ------------------
  |  |  656|    265|    do { \
  |  |  657|    265|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    265|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    265|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 265]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    265|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 265]
  |  |  ------------------
  ------------------
  116|    265|        }
  117|       |
  118|    265|        igraph_vector_int_destroy(&edges_to_delete);
  119|    265|        IGRAPH_FINALLY_CLEAN(1);
  120|       |
  121|    265|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, false);
  122|       |
  123|    265|        return IGRAPH_SUCCESS;
  124|    265|    }
  125|       |
  126|    651|    if (attr) {
  ------------------
  |  Branch (126:9): [True: 0, False: 651]
  ------------------
  127|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&mergeinto, no_of_edges);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  128|      0|    }
  129|    651|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, 0);
  ------------------
  |  |  119|    651|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    651|    do { \
  |  |  |  |  657|    651|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    651|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    651|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 651]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    651|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 651]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    651|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    651|    do { \
  |  |  |  |  604|    651|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    651|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    651|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    651|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 651]
  |  |  |  |  ------------------
  |  |  |  |  608|    651|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    651|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 651]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 651]
  |  |  ------------------
  ------------------
  130|    651|    IGRAPH_CHECK(igraph_vector_int_reserve(&edges, no_of_edges * 2));
  ------------------
  |  |  656|    651|    do { \
  |  |  657|    651|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    651|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    651|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 651]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    651|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 651]
  |  |  ------------------
  ------------------
  131|       |
  132|    651|    IGRAPH_CHECK(igraph_es_all(&es, IGRAPH_EDGEORDER_FROM));
  ------------------
  |  |  656|    651|    do { \
  |  |  657|    651|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    651|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    651|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 651]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    651|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 651]
  |  |  ------------------
  ------------------
  133|    651|    IGRAPH_FINALLY(igraph_es_destroy, &es);
  ------------------
  |  |  603|    651|    do { \
  |  |  604|    651|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    651|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    651|         * incorrect destructor function with the pointer */ \
  |  |  607|    651|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 651]
  |  |  ------------------
  |  |  608|    651|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    651|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 651]
  |  |  ------------------
  ------------------
  134|    651|    IGRAPH_CHECK(igraph_eit_create(graph, es, &eit));
  ------------------
  |  |  656|    651|    do { \
  |  |  657|    651|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    651|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    651|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 651]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    651|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 651]
  |  |  ------------------
  ------------------
  135|    651|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  603|    651|    do { \
  |  |  604|    651|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    651|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    651|         * incorrect destructor function with the pointer */ \
  |  |  607|    651|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 651]
  |  |  ------------------
  |  |  608|    651|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    651|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 651]
  |  |  ------------------
  ------------------
  136|       |
  137|  40.5k|    for (actedge = -1; !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  371|  40.5k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                  for (actedge = -1; !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  359|  39.9k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (137:24): [True: 39.9k, False: 651]
  ------------------
  138|  39.9k|        edge = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|  39.9k|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 0, False: 39.9k]
  |  |  ------------------
  |  |  406|  39.9k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|  39.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  139|  39.9k|        from = IGRAPH_FROM(graph, edge);
  ------------------
  |  |  115|  39.9k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  39.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  140|  39.9k|        to = IGRAPH_TO(graph, edge);
  ------------------
  |  |  128|  39.9k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  39.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  141|       |
  142|  39.9k|        if (remove_loops && from == to) {
  ------------------
  |  Branch (142:13): [True: 28.2k, False: 11.6k]
  |  Branch (142:29): [True: 11.8k, False: 16.4k]
  ------------------
  143|       |            /* Loop edge to be removed */
  144|  11.8k|            if (attr) {
  ------------------
  |  Branch (144:17): [True: 0, False: 11.8k]
  ------------------
  145|      0|                VECTOR(mergeinto)[edge] = -1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  146|      0|            }
  147|  28.0k|        } else if (remove_multiple && from == pfrom && to == pto) {
  ------------------
  |  Branch (147:20): [True: 28.0k, False: 0]
  |  Branch (147:39): [True: 17.0k, False: 11.0k]
  |  Branch (147:56): [True: 11.2k, False: 5.74k]
  ------------------
  148|       |            /* Multiple edge to be contracted */
  149|  11.2k|            if (attr) {
  ------------------
  |  Branch (149:17): [True: 0, False: 11.2k]
  ------------------
  150|      0|                VECTOR(mergeinto)[edge] = actedge;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  151|      0|            }
  152|  16.7k|        } else {
  153|       |            /* Edge to be kept */
  154|  16.7k|            igraph_vector_int_push_back(&edges, from);  /* reserved */
  155|  16.7k|            igraph_vector_int_push_back(&edges, to);  /* reserved */
  156|  16.7k|            if (attr) {
  ------------------
  |  Branch (156:17): [True: 0, False: 16.7k]
  ------------------
  157|      0|                actedge++;
  158|      0|                VECTOR(mergeinto)[edge] = actedge;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  159|      0|            }
  160|  16.7k|        }
  161|  39.9k|        pfrom = from; pto = to;
  162|  39.9k|    }
  163|       |
  164|    651|    igraph_eit_destroy(&eit);
  165|    651|    igraph_es_destroy(&es);
  166|    651|    IGRAPH_FINALLY_CLEAN(2);
  167|       |
  168|    651|    IGRAPH_CHECK(igraph_create(&res, &edges, no_of_nodes, igraph_is_directed(graph)));
  ------------------
  |  |  656|    651|    do { \
  |  |  657|    651|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    651|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    651|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 651]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    651|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 651]
  |  |  ------------------
  ------------------
  169|       |
  170|    651|    igraph_vector_int_destroy(&edges);
  171|    651|    IGRAPH_FINALLY_CLEAN(1);
  172|       |
  173|    651|    IGRAPH_FINALLY(igraph_destroy, &res);
  ------------------
  |  |  603|    651|    do { \
  |  |  604|    651|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    651|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    651|         * incorrect destructor function with the pointer */ \
  |  |  607|    651|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 651]
  |  |  ------------------
  |  |  608|    651|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    651|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 651]
  |  |  ------------------
  ------------------
  174|       |
  175|    651|    IGRAPH_CHECK(igraph_i_attribute_copy(&res, graph, true, true, /* edges= */ false));
  ------------------
  |  |  656|    651|    do { \
  |  |  657|    651|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    651|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    651|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 651]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    651|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 651]
  |  |  ------------------
  ------------------
  176|       |
  177|    651|    if (attr) {
  ------------------
  |  Branch (177:9): [True: 0, False: 651]
  ------------------
  178|      0|        igraph_fixed_vectorlist_t vl;
  179|      0|        IGRAPH_CHECK(igraph_fixed_vectorlist_convert(&vl, &mergeinto, actedge + 1));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  180|      0|        IGRAPH_FINALLY(igraph_fixed_vectorlist_destroy, &vl);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  181|       |
  182|      0|        IGRAPH_CHECK(igraph_i_attribute_combine_edges(graph, &res, &vl.vecs, edge_comb));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  183|       |
  184|      0|        igraph_fixed_vectorlist_destroy(&vl);
  185|      0|        igraph_vector_int_destroy(&mergeinto);
  186|      0|        IGRAPH_FINALLY_CLEAN(2);
  187|      0|    }
  188|       |
  189|    651|    IGRAPH_FINALLY_CLEAN(1);
  190|    651|    igraph_destroy(graph);
  191|    651|    *graph = res;
  192|       |
  193|       |    /* The cache must be set as the very last step, only after all functions that can
  194|       |     * potentially return with an error have finished. */
  195|       |
  196|    651|    if (remove_loops) {
  ------------------
  |  Branch (196:9): [True: 410, False: 241]
  ------------------
  197|       |        /* Loop edges were removed so we know for sure that there aren't any
  198|       |         * loop edges now */
  199|    410|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, false);
  200|    410|    }
  201|       |
  202|    651|    if (remove_multiple) {
  ------------------
  |  Branch (202:9): [True: 651, False: 0]
  ------------------
  203|       |        /* Multi-edges were removed so we know for sure that there aren't any
  204|       |         * multi-edges now */
  205|    651|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_MULTI, false);
  206|    651|    }
  207|       |
  208|    651|    return IGRAPH_SUCCESS;
  209|    651|}

igraph_i_induced_subgraph_map:
  355|    658|                                  igraph_bool_t map_is_prepared) {
  356|       |
  357|    658|    if (impl == IGRAPH_SUBGRAPH_AUTO) {
  ------------------
  |  Branch (357:9): [True: 658, False: 0]
  ------------------
  358|    658|        IGRAPH_CHECK(igraph_i_induced_subgraph_suggest_implementation(graph, vids, &impl));
  ------------------
  |  |  656|    658|    do { \
  |  |  657|    658|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    658|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    658|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 658]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    658|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 658]
  |  |  ------------------
  ------------------
  359|    658|    }
  360|       |
  361|    658|    switch (impl) {
  362|     70|    case IGRAPH_SUBGRAPH_COPY_AND_DELETE:
  ------------------
  |  Branch (362:5): [True: 70, False: 588]
  ------------------
  363|     70|        return igraph_i_induced_subgraph_copy_and_delete(graph, res, vids, map, invmap);
  364|       |
  365|    588|    case IGRAPH_SUBGRAPH_CREATE_FROM_SCRATCH:
  ------------------
  |  Branch (365:5): [True: 588, False: 70]
  ------------------
  366|    588|        return igraph_i_induced_subgraph_create_from_scratch(graph, res, vids, map,
  367|    588|                invmap, /* map_is_prepared = */ map_is_prepared);
  368|       |
  369|      0|    default:
  ------------------
  |  Branch (369:5): [True: 0, False: 658]
  ------------------
  370|      0|        IGRAPH_ERROR("Unknown subgraph implementation type.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  371|    658|    }
  372|    658|}
subgraph.c:igraph_i_induced_subgraph_suggest_implementation:
  327|    658|        igraph_subgraph_implementation_t *result) {
  328|    658|    double ratio;
  329|    658|    igraph_int_t num_vs;
  330|       |
  331|    658|    if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (331:9): [True: 0, False: 658]
  ------------------
  332|      0|        ratio = 1.0;
  333|    658|    } else {
  334|    658|        IGRAPH_CHECK(igraph_vs_size(graph, &vids, &num_vs));
  ------------------
  |  |  656|    658|    do { \
  |  |  657|    658|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    658|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    658|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 658]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    658|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 658]
  |  |  ------------------
  ------------------
  335|    658|        ratio = (igraph_real_t) num_vs / igraph_vcount(graph);
  336|    658|    }
  337|       |
  338|       |    /* The threshold of 0.5 is justified by the benchmarking done in
  339|       |     * https://github.com/igraph/igraph/pull/2708
  340|       |     * Small improvements may be possible by using better heuristics. */
  341|    658|    if (ratio > 0.5) {
  ------------------
  |  Branch (341:9): [True: 70, False: 588]
  ------------------
  342|     70|        *result = IGRAPH_SUBGRAPH_COPY_AND_DELETE;
  343|    588|    } else {
  344|    588|        *result = IGRAPH_SUBGRAPH_CREATE_FROM_SCRATCH;
  345|    588|    }
  346|       |
  347|    658|    return IGRAPH_SUCCESS;
  348|    658|}
subgraph.c:igraph_i_induced_subgraph_copy_and_delete:
   36|     70|        igraph_vector_int_t *map, igraph_vector_int_t *invmap) {
   37|       |
   38|     70|    const igraph_int_t no_of_nodes = igraph_vcount(graph);
   39|     70|    igraph_int_t no_of_new_nodes_estimate;
   40|     70|    igraph_vector_int_t delete;
   41|     70|    igraph_bitset_t remain;
   42|     70|    igraph_vit_t vit;
   43|       |
   44|     70|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|     70|    do { \
  |  |  657|     70|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     70|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     70|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 70]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
   45|     70|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|     70|    do { \
  |  |  604|     70|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     70|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     70|         * incorrect destructor function with the pointer */ \
  |  |  607|     70|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 70]
  |  |  ------------------
  |  |  608|     70|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
   46|       |
   47|     70|    IGRAPH_VECTOR_INT_INIT_FINALLY(&delete, 0);
  ------------------
  |  |  119|     70|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|     70|    do { \
  |  |  |  |  657|     70|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|     70|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|     70|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 70]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|     70|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 70]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|     70|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|     70|    do { \
  |  |  |  |  604|     70|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|     70|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|     70|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|     70|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 70]
  |  |  |  |  ------------------
  |  |  |  |  608|     70|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|     70|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 70]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 70]
  |  |  ------------------
  ------------------
   48|     70|    IGRAPH_BITSET_INIT_FINALLY(&remain, no_of_nodes);
  ------------------
  |  |  265|     70|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  266|     70|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|     70|    do { \
  |  |  |  |  657|     70|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|     70|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|     70|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 70]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|     70|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 70]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  267|     70|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|     70|    do { \
  |  |  |  |  604|     70|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|     70|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|     70|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|     70|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 70]
  |  |  |  |  ------------------
  |  |  |  |  608|     70|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|     70|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 70]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (267:62): [Folded, False: 70]
  |  |  ------------------
  ------------------
   49|       |
   50|       |    /* Calculate how many nodes there will be in the new graph. The result is
   51|       |     * a lower bound only as 'vit' may contain the same vertex more than once. */
   52|     70|    no_of_new_nodes_estimate = no_of_nodes - IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|     70|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
   53|     70|    if (no_of_new_nodes_estimate < 0) {
  ------------------
  |  Branch (53:9): [True: 0, False: 70]
  ------------------
   54|      0|        no_of_new_nodes_estimate = 0;
   55|      0|    }
   56|       |
   57|     70|    IGRAPH_CHECK(igraph_vector_int_reserve(&delete, no_of_new_nodes_estimate));
  ------------------
  |  |  656|     70|    do { \
  |  |  657|     70|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     70|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     70|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 70]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
   58|       |
   59|  2.54k|    for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  201|     70|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  179|  2.54k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  167|  2.47k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (59:33): [True: 2.47k, False: 70]
  ------------------
   60|  2.47k|        IGRAPH_BIT_SET(remain, IGRAPH_VIT_GET(vit));
  ------------------
  |  |  103|  2.47k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  2.47k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  4.95k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  2.47k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:30): [True: 0, False: 2.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  4.95k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  2.47k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (66:53): [True: 0, False: 2.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   61|  2.47k|    }
   62|       |
   63|  4.32k|    for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (63:30): [True: 4.25k, False: 70]
  ------------------
   64|  4.25k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  4.25k|    do { \
  |  |   47|  4.25k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 4.25k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  4.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 4.25k]
  |  |  ------------------
  ------------------
   65|       |
   66|  4.25k|        if (! IGRAPH_BIT_TEST(remain, i)) {
  ------------------
  |  |  142|  4.25k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  4.25k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  4.25k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  4.25k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  4.25k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  4.25k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (66:13): [True: 1.77k, False: 2.47k]
  ------------------
   67|  1.77k|            IGRAPH_CHECK(igraph_vector_int_push_back(&delete, i));
  ------------------
  |  |  656|  1.77k|    do { \
  |  |  657|  1.77k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.77k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.77k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.77k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.77k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.77k]
  |  |  ------------------
  ------------------
   68|  1.77k|        }
   69|  4.25k|    }
   70|       |
   71|     70|    igraph_bitset_destroy(&remain);
   72|     70|    IGRAPH_FINALLY_CLEAN(1);
   73|       |
   74|     70|    IGRAPH_CHECK(igraph_copy(res, graph));
  ------------------
  |  |  656|     70|    do { \
  |  |  657|     70|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     70|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     70|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 70]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
   75|     70|    IGRAPH_FINALLY(igraph_destroy, res);
  ------------------
  |  |  603|     70|    do { \
  |  |  604|     70|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     70|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     70|         * incorrect destructor function with the pointer */ \
  |  |  607|     70|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 70]
  |  |  ------------------
  |  |  608|     70|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
   76|     70|    IGRAPH_CHECK(igraph_delete_vertices_map(res, igraph_vss_vector(&delete),
  ------------------
  |  |  656|     70|    do { \
  |  |  657|     70|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     70|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     70|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 70]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|     70|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 70]
  |  |  ------------------
  ------------------
   77|     70|                                            map, invmap));
   78|       |
   79|     70|    igraph_vector_int_destroy(&delete);
   80|     70|    igraph_vit_destroy(&vit);
   81|     70|    IGRAPH_FINALLY_CLEAN(3);
   82|       |
   83|     70|    return IGRAPH_SUCCESS;
   84|     70|}
subgraph.c:igraph_i_induced_subgraph_create_from_scratch:
   99|    588|        igraph_bool_t map_is_prepared) {
  100|       |
  101|    588|    const igraph_bool_t directed = igraph_is_directed(graph);
  102|    588|    const igraph_int_t no_of_nodes = igraph_vcount(graph);
  103|    588|    igraph_int_t no_of_new_nodes = 0;
  104|    588|    igraph_int_t n;
  105|    588|    igraph_int_t to;
  106|    588|    igraph_int_t eid;
  107|    588|    igraph_vector_int_t vids_old2new, vids_new2old;
  108|    588|    igraph_vector_int_t eids_new2old;
  109|    588|    igraph_vector_int_t vids_vec;
  110|    588|    igraph_vector_int_t nei_edges;
  111|    588|    igraph_vector_int_t new_edges;
  112|    588|    igraph_vit_t vit;
  113|    588|    igraph_vector_int_t *my_vids_old2new = &vids_old2new,
  114|    588|                        *my_vids_new2old = &vids_new2old;
  115|       |
  116|       |    /* The order of initialization is important here, they will be destroyed in the
  117|       |     * opposite order */
  118|    588|    IGRAPH_VECTOR_INT_INIT_FINALLY(&eids_new2old, 0);
  ------------------
  |  |  119|    588|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    588|    do { \
  |  |  |  |  657|    588|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    588|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    588|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 588]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    588|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 588]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    588|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    588|    do { \
  |  |  |  |  604|    588|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    588|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    588|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    588|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 588]
  |  |  |  |  ------------------
  |  |  |  |  608|    588|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    588|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 588]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 588]
  |  |  ------------------
  ------------------
  119|    588|    if (invmap) {
  ------------------
  |  Branch (119:9): [True: 0, False: 588]
  ------------------
  120|      0|        my_vids_new2old = invmap;
  121|      0|        igraph_vector_int_clear(my_vids_new2old);
  122|    588|    } else {
  123|    588|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vids_new2old, 0);
  ------------------
  |  |  119|    588|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    588|    do { \
  |  |  |  |  657|    588|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    588|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    588|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 588]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    588|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 588]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    588|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    588|    do { \
  |  |  |  |  604|    588|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    588|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    588|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    588|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 588]
  |  |  |  |  ------------------
  |  |  |  |  608|    588|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    588|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 588]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 588]
  |  |  ------------------
  ------------------
  124|    588|    }
  125|    588|    IGRAPH_VECTOR_INT_INIT_FINALLY(&new_edges, 0);
  ------------------
  |  |  119|    588|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    588|    do { \
  |  |  |  |  657|    588|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    588|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    588|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 588]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    588|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 588]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    588|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    588|    do { \
  |  |  |  |  604|    588|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    588|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    588|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    588|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 588]
  |  |  |  |  ------------------
  |  |  |  |  608|    588|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    588|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 588]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 588]
  |  |  ------------------
  ------------------
  126|    588|    IGRAPH_VECTOR_INT_INIT_FINALLY(&nei_edges, 0);
  ------------------
  |  |  119|    588|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    588|    do { \
  |  |  |  |  657|    588|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    588|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    588|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 588]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    588|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 588]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    588|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    588|    do { \
  |  |  |  |  604|    588|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    588|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    588|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    588|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 588]
  |  |  |  |  ------------------
  |  |  |  |  608|    588|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    588|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 588]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 588]
  |  |  ------------------
  ------------------
  127|    588|    if (map) {
  ------------------
  |  Branch (127:9): [True: 588, False: 0]
  ------------------
  128|    588|        my_vids_old2new = map;
  129|    588|        if (!map_is_prepared) {
  ------------------
  |  Branch (129:13): [True: 0, False: 588]
  ------------------
  130|      0|            IGRAPH_CHECK(igraph_vector_int_resize(map, no_of_nodes));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  131|      0|            igraph_vector_int_fill(map, -1);
  132|      0|        }
  133|    588|    } else {
  134|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vids_old2new, no_of_nodes);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  135|      0|        igraph_vector_int_fill(&vids_old2new, -1);
  136|      0|    }
  137|    588|    IGRAPH_VECTOR_INT_INIT_FINALLY(&vids_vec, 0);
  ------------------
  |  |  119|    588|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    588|    do { \
  |  |  |  |  657|    588|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    588|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    588|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 588]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    588|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 588]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    588|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    588|    do { \
  |  |  |  |  604|    588|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    588|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    588|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    588|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 588]
  |  |  |  |  ------------------
  |  |  |  |  608|    588|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    588|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 588]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 588]
  |  |  ------------------
  ------------------
  138|       |
  139|    588|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|    588|    do { \
  |  |  657|    588|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    588|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    588|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 588]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    588|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 588]
  |  |  ------------------
  ------------------
  140|    588|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|    588|    do { \
  |  |  604|    588|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    588|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    588|         * incorrect destructor function with the pointer */ \
  |  |  607|    588|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 588]
  |  |  ------------------
  |  |  608|    588|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    588|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 588]
  |  |  ------------------
  ------------------
  141|       |
  142|       |    /* Calculate the mapping from the old node IDs to the new ones. The other
  143|       |     * igraph_simplify implementation in igraph_i_simplify_copy_and_delete
  144|       |     * ensures that the order of vertex IDs is kept during remapping (i.e.
  145|       |     * if the old ID of vertex A is less than the old ID of vertex B, then
  146|       |     * the same will also be true for the new IDs). To ensure compatibility
  147|       |     * with the other implementation, we have to fetch the vertex IDs into
  148|       |     * a vector first and then sort it.
  149|       |     */
  150|    588|    IGRAPH_CHECK(igraph_vit_as_vector(&vit, &vids_vec));
  ------------------
  |  |  656|    588|    do { \
  |  |  657|    588|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    588|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    588|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 588]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    588|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 588]
  |  |  ------------------
  ------------------
  151|    588|    igraph_vit_destroy(&vit);
  152|    588|    IGRAPH_FINALLY_CLEAN(1);
  153|       |
  154|    588|    igraph_vector_int_sort(&vids_vec);
  155|    588|    n = igraph_vector_int_size(&vids_vec);
  156|  19.6k|    for (igraph_int_t i = 0; i < n; i++) {
  ------------------
  |  Branch (156:30): [True: 19.0k, False: 588]
  ------------------
  157|  19.0k|        igraph_int_t vid = VECTOR(vids_vec)[i];
  ------------------
  |  |   60|  19.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  158|       |
  159|       |        /* Cater for duplicate vertex IDs in the input vertex selector; we use
  160|       |         * the first occurrence of each vertex ID and ignore the rest */
  161|  19.0k|        if (VECTOR(*my_vids_old2new)[vid] < 0) {
  ------------------
  |  |   60|  19.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (161:13): [True: 19.0k, False: 0]
  ------------------
  162|  19.0k|            IGRAPH_CHECK(igraph_vector_int_push_back(my_vids_new2old, vid));
  ------------------
  |  |  656|  19.0k|    do { \
  |  |  657|  19.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  19.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  19.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 19.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  19.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 19.0k]
  |  |  ------------------
  ------------------
  163|  19.0k|            VECTOR(*my_vids_old2new)[vid] = no_of_new_nodes;
  ------------------
  |  |   60|  19.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  164|  19.0k|            no_of_new_nodes++;
  165|  19.0k|        }
  166|  19.0k|    }
  167|    588|    igraph_vector_int_destroy(&vids_vec);
  168|    588|    IGRAPH_FINALLY_CLEAN(1);
  169|       |
  170|       |    /* Create the new edge list */
  171|  19.6k|    for (igraph_int_t i = 0; i < no_of_new_nodes; i++) {
  ------------------
  |  Branch (171:30): [True: 19.0k, False: 588]
  ------------------
  172|  19.0k|        igraph_int_t old_vid = VECTOR(*my_vids_new2old)[i];
  ------------------
  |  |   60|  19.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  173|  19.0k|        igraph_int_t new_vid = i;
  174|  19.0k|        igraph_bool_t skip_loop_edge;
  175|       |
  176|  19.0k|        IGRAPH_CHECK(igraph_incident(graph, &nei_edges, old_vid, IGRAPH_OUT, IGRAPH_LOOPS));
  ------------------
  |  |  656|  19.0k|    do { \
  |  |  657|  19.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  19.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  19.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 19.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  19.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 19.0k]
  |  |  ------------------
  ------------------
  177|  19.0k|        n = igraph_vector_int_size(&nei_edges);
  178|       |
  179|  19.0k|        if (directed) {
  ------------------
  |  Branch (179:13): [True: 19.0k, False: 0]
  ------------------
  180|       |            /* directed graph; this is easier */
  181|  46.4k|            for (igraph_int_t j = 0; j < n; j++) {
  ------------------
  |  Branch (181:38): [True: 27.4k, False: 19.0k]
  ------------------
  182|  27.4k|                eid = VECTOR(nei_edges)[j];
  ------------------
  |  |   60|  27.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  183|       |
  184|  27.4k|                to = VECTOR(*my_vids_old2new)[ IGRAPH_TO(graph, eid) ];
  ------------------
  |  |   60|  27.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              to = VECTOR(*my_vids_old2new)[ IGRAPH_TO(graph, eid) ];
  ------------------
  |  |  128|  27.4k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  27.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  185|  27.4k|                if (to < 0) {
  ------------------
  |  Branch (185:21): [True: 1.22k, False: 26.2k]
  ------------------
  186|  1.22k|                    continue;
  187|  1.22k|                }
  188|       |
  189|  26.2k|                IGRAPH_CHECK(igraph_vector_int_push_back(&new_edges, new_vid));
  ------------------
  |  |  656|  26.2k|    do { \
  |  |  657|  26.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  26.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  26.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 26.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  26.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 26.2k]
  |  |  ------------------
  ------------------
  190|  26.2k|                IGRAPH_CHECK(igraph_vector_int_push_back(&new_edges, to));
  ------------------
  |  |  656|  26.2k|    do { \
  |  |  657|  26.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  26.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  26.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 26.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  26.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 26.2k]
  |  |  ------------------
  ------------------
  191|  26.2k|                IGRAPH_CHECK(igraph_vector_int_push_back(&eids_new2old, eid));
  ------------------
  |  |  656|  26.2k|    do { \
  |  |  657|  26.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  26.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  26.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 26.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  26.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 26.2k]
  |  |  ------------------
  ------------------
  192|  26.2k|            }
  193|  19.0k|        } else {
  194|       |            /* undirected graph. We need to be careful with loop edges as each
  195|       |             * loop edge will appear twice. We use a boolean flag to skip every
  196|       |             * second loop edge */
  197|      0|            skip_loop_edge = false;
  198|      0|            for (igraph_int_t j = 0; j < n; j++) {
  ------------------
  |  Branch (198:38): [True: 0, False: 0]
  ------------------
  199|      0|                eid = VECTOR(nei_edges)[j];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  200|       |
  201|      0|                if (IGRAPH_FROM(graph, eid) != old_vid) {
  ------------------
  |  |  115|      0|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (201:21): [True: 0, False: 0]
  ------------------
  202|       |                    /* avoid processing edges twice */
  203|      0|                    continue;
  204|      0|                }
  205|       |
  206|      0|                to = VECTOR(*my_vids_old2new)[ IGRAPH_TO(graph, eid) ];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              to = VECTOR(*my_vids_old2new)[ IGRAPH_TO(graph, eid) ];
  ------------------
  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  207|      0|                if (to < 0) {
  ------------------
  |  Branch (207:21): [True: 0, False: 0]
  ------------------
  208|      0|                    continue;
  209|      0|                }
  210|       |
  211|      0|                if (new_vid == to) {
  ------------------
  |  Branch (211:21): [True: 0, False: 0]
  ------------------
  212|       |                    /* this is a loop edge; check whether we need to skip it */
  213|      0|                    skip_loop_edge = !skip_loop_edge;
  214|      0|                    if (skip_loop_edge) {
  ------------------
  |  Branch (214:25): [True: 0, False: 0]
  ------------------
  215|      0|                        continue;
  216|      0|                    }
  217|      0|                }
  218|       |
  219|      0|                IGRAPH_CHECK(igraph_vector_int_push_back(&new_edges, new_vid));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  220|      0|                IGRAPH_CHECK(igraph_vector_int_push_back(&new_edges, to));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  221|      0|                IGRAPH_CHECK(igraph_vector_int_push_back(&eids_new2old, eid));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  222|      0|            }
  223|      0|        }
  224|  19.0k|    }
  225|       |
  226|       |    /* Get rid of some vectors that are not needed anymore */
  227|    588|    if (!map) {
  ------------------
  |  Branch (227:9): [True: 0, False: 588]
  ------------------
  228|      0|        igraph_vector_int_destroy(&vids_old2new);
  229|      0|        IGRAPH_FINALLY_CLEAN(1);
  230|      0|    }
  231|    588|    igraph_vector_int_destroy(&nei_edges);
  232|    588|    IGRAPH_FINALLY_CLEAN(1);
  233|       |
  234|       |    /* Create the new graph */
  235|    588|    IGRAPH_CHECK(igraph_create(res, &new_edges, no_of_new_nodes, directed));
  ------------------
  |  |  656|    588|    do { \
  |  |  657|    588|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    588|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    588|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 588]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    588|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 588]
  |  |  ------------------
  ------------------
  236|       |
  237|       |    /* Now we can also get rid of the new_edges vector */
  238|    588|    igraph_vector_int_destroy(&new_edges);
  239|    588|    IGRAPH_FINALLY_CLEAN(1);
  240|       |
  241|       |    /* Make sure that the newly created graph is destroyed if something happens from
  242|       |     * now on */
  243|    588|    IGRAPH_FINALLY(igraph_destroy, res);
  ------------------
  |  |  603|    588|    do { \
  |  |  604|    588|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    588|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    588|         * incorrect destructor function with the pointer */ \
  |  |  607|    588|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 588]
  |  |  ------------------
  |  |  608|    588|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    588|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 588]
  |  |  ------------------
  ------------------
  244|       |
  245|       |    /* Copy the graph attributes */
  246|    588|    IGRAPH_CHECK(igraph_i_attribute_copy(res, graph, true, /* vertex= */ false, /* edge= */ false));
  ------------------
  |  |  656|    588|    do { \
  |  |  657|    588|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    588|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    588|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 588]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    588|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 588]
  |  |  ------------------
  ------------------
  247|       |
  248|       |    /* Copy the vertex attributes */
  249|    588|    IGRAPH_CHECK(igraph_i_attribute_permute_vertices(graph, res, my_vids_new2old));
  ------------------
  |  |  656|    588|    do { \
  |  |  657|    588|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    588|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    588|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 588]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    588|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 588]
  |  |  ------------------
  ------------------
  250|       |
  251|       |    /* Copy the edge attributes */
  252|    588|    IGRAPH_CHECK(igraph_i_attribute_permute_edges(graph, res, &eids_new2old));
  ------------------
  |  |  656|    588|    do { \
  |  |  657|    588|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    588|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    588|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 588]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    588|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 588]
  |  |  ------------------
  ------------------
  253|       |
  254|       |    /* Get rid of the remaining stuff */
  255|    588|    if (!invmap) {
  ------------------
  |  Branch (255:9): [True: 588, False: 0]
  ------------------
  256|    588|        igraph_vector_int_destroy(my_vids_new2old);
  257|    588|        IGRAPH_FINALLY_CLEAN(1);
  258|    588|    }
  259|    588|    igraph_vector_int_destroy(&eids_new2old);
  260|    588|    IGRAPH_FINALLY_CLEAN(2);   /* 1 + 1 since we don't need to destroy res */
  261|       |
  262|    588|    return IGRAPH_SUCCESS;
  263|    588|}

igraph_get_all_shortest_paths:
  105|  2.00k|        igraph_neimode_t mode) {
  106|       |
  107|  2.00k|    if (weights == NULL) {
  ------------------
  |  Branch (107:9): [True: 2.00k, False: 0]
  ------------------
  108|       |        /* Unweighted version */
  109|  2.00k|        return igraph_i_get_all_shortest_paths_unweighted(
  110|  2.00k|            graph, vertices, edges, nrgeo, from, to, mode
  111|  2.00k|        );
  112|  2.00k|    } else {
  113|       |        /* Weighted version */
  114|      0|        return igraph_get_all_shortest_paths_dijkstra(
  115|      0|            graph, vertices, edges, nrgeo, from, to, weights, mode
  116|      0|        );
  117|      0|    }
  118|  2.00k|}
igraph_i_get_all_shortest_paths_unweighted:
  126|  2.00k|        igraph_neimode_t mode) {
  127|       |
  128|  2.00k|    const igraph_int_t no_of_nodes = igraph_vcount(graph);
  129|  2.00k|    igraph_int_t *geodist;
  130|  2.00k|    igraph_vector_int_list_t paths;
  131|  2.00k|    igraph_vector_int_list_t path_edge;
  132|  2.00k|    igraph_dqueue_int_t q;
  133|  2.00k|    igraph_vector_int_t *vptr;
  134|  2.00k|    igraph_vector_int_t *vptr_e;
  135|  2.00k|    igraph_vector_int_t neis;
  136|  2.00k|    igraph_vector_int_t ptrlist;
  137|  2.00k|    igraph_vector_int_t ptrhead;
  138|  2.00k|    igraph_int_t n;
  139|  2.00k|    igraph_int_t to_reach, reached = 0, maxdist = 0;
  140|       |
  141|  2.00k|    igraph_vit_t vit;
  142|       |
  143|  2.00k|    if (from < 0 || from >= no_of_nodes) {
  ------------------
  |  Branch (143:9): [True: 0, False: 2.00k]
  |  Branch (143:21): [True: 0, False: 2.00k]
  ------------------
  144|      0|        IGRAPH_ERROR("Index of source vertex is out of range.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  145|      0|    }
  146|  2.00k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (146:9): [True: 2.00k, False: 0]
  |  Branch (146:31): [True: 2.00k, False: 0]
  ------------------
  147|  2.00k|        mode != IGRAPH_ALL) {
  ------------------
  |  Branch (147:9): [True: 0, False: 2.00k]
  ------------------
  148|      0|        IGRAPH_ERROR("Invalid mode argument.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  149|      0|    }
  150|       |
  151|  2.00k|    IGRAPH_CHECK(igraph_vit_create(graph, to, &vit));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  152|  2.00k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  153|       |
  154|       |    /* paths will store the shortest paths during the search */
  155|  2.00k|    IGRAPH_VECTOR_INT_LIST_INIT_FINALLY(&paths, 0);
  ------------------
  |  |   58|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_list_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   59|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_list_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (59:69): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  156|       |    /* path_edge will store the shortest paths during the search */
  157|  2.00k|    IGRAPH_VECTOR_INT_LIST_INIT_FINALLY(&path_edge, 0);
  ------------------
  |  |   58|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_list_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   59|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_list_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (59:69): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  158|       |    /* neis is a temporary vector holding the neighbors of the
  159|       |     * node being examined */
  160|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  161|       |    /* ptrlist stores indices into the paths vector, in the order
  162|       |     * of how they were found. ptrhead is a second-level index that
  163|       |     * will be used to find paths that terminate in a given vertex */
  164|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&ptrlist, 0);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  165|       |    /* ptrhead contains indices into ptrlist.
  166|       |     * ptrhead[i] = j means that element #j-1 in ptrlist contains
  167|       |     * the shortest path from the root to node i. ptrhead[i] = 0
  168|       |     * means that node i was not reached so far */
  169|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&ptrhead, no_of_nodes);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  170|       |    /* geodist[i] == 0 if i was not reached yet and it is not in the
  171|       |     * target vertex sequence, or -1 if i was not reached yet and it
  172|       |     * is in the target vertex sequence. Otherwise it is
  173|       |     * one larger than the length of the shortest path from the
  174|       |     * source */
  175|  2.00k|    geodist = IGRAPH_CALLOC(no_of_nodes, igraph_int_t);
  ------------------
  |  |   33|  2.00k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.00k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.00k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.00k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.00k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  176|  2.00k|    IGRAPH_CHECK_OOM(geodist, "Insufficient memory for calculating shortest paths.");
  ------------------
  |  |  709|  2.00k|    do { \
  |  |  710|  2.00k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  177|  2.00k|    IGRAPH_FINALLY(igraph_free, geodist);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  178|       |    /* dequeue to store the BFS queue -- odd elements are the vertex indices,
  179|       |     * even elements are the distances from the root */
  180|  2.00k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  2.00k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.00k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  181|       |
  182|  2.00k|    if (nrgeo) {
  ------------------
  |  Branch (182:9): [True: 2.00k, False: 0]
  ------------------
  183|  2.00k|        IGRAPH_CHECK(igraph_vector_int_resize(nrgeo, no_of_nodes));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  184|  2.00k|        igraph_vector_int_null(nrgeo);
  185|  2.00k|    }
  186|       |
  187|       |    /* use geodist to count how many vertices we have to reach */
  188|  2.00k|    to_reach = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|  2.00k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  189|   334k|    for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  201|  2.00k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  179|   334k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  167|   332k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (189:33): [True: 332k, False: 2.00k]
  ------------------
  190|   332k|        if (geodist[ IGRAPH_VIT_GET(vit) ] == 0) {
  ------------------
  |  |  214|   332k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 332k, False: 0]
  |  |  ------------------
  |  |  215|   332k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (190:13): [True: 332k, False: 0]
  ------------------
  191|   332k|            geodist[ IGRAPH_VIT_GET(vit) ] = -1;
  ------------------
  |  |  214|   332k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 332k, False: 0]
  |  |  ------------------
  |  |  215|   332k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  192|   332k|        } else {
  193|      0|            to_reach--;       /* this node was given multiple times */
  194|      0|        }
  195|   332k|    }
  196|       |
  197|  2.00k|    if (geodist[ from ] < 0) {
  ------------------
  |  Branch (197:9): [True: 2.00k, False: 0]
  ------------------
  198|  2.00k|        reached++;
  199|  2.00k|    }
  200|       |
  201|       |    /* from -> from */
  202|  2.00k|    IGRAPH_CHECK(igraph_vector_int_list_push_back_new(&paths, &vptr));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  203|  2.00k|    IGRAPH_CHECK(igraph_vector_int_push_back(vptr, from));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  204|  2.00k|    IGRAPH_CHECK(igraph_vector_int_list_push_back_new(&path_edge, &vptr_e));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  205|       |
  206|  2.00k|    geodist[from] = 1;
  207|  2.00k|    VECTOR(ptrhead)[from] = 1;
  ------------------
  |  |   60|  2.00k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  208|  2.00k|    IGRAPH_CHECK(igraph_vector_int_push_back(&ptrlist, 0));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  209|  2.00k|    if (nrgeo) {
  ------------------
  |  Branch (209:9): [True: 2.00k, False: 0]
  ------------------
  210|  2.00k|        VECTOR(*nrgeo)[from] = 1;
  ------------------
  |  |   60|  2.00k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  211|  2.00k|    }
  212|       |
  213|       |    /* Init queue */
  214|  2.00k|    IGRAPH_CHECK(igraph_dqueue_int_push(&q, from));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  215|  2.00k|    IGRAPH_CHECK(igraph_dqueue_int_push(&q, 0));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  216|  36.0k|    while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (216:12): [True: 34.3k, False: 1.78k]
  ------------------
  217|  34.3k|        igraph_int_t actnode = igraph_dqueue_int_pop(&q);
  218|  34.3k|        igraph_int_t actdist = igraph_dqueue_int_pop(&q);
  219|       |
  220|  34.3k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  34.3k|    do { \
  |  |   47|  34.3k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 34.3k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  34.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 34.3k]
  |  |  ------------------
  ------------------
  221|       |
  222|  34.3k|        if (reached >= to_reach) {
  ------------------
  |  Branch (222:13): [True: 384, False: 33.9k]
  ------------------
  223|       |            /* all nodes were reached. Since we need all the shortest paths
  224|       |             * to all these nodes, we can stop the search only if the distance
  225|       |             * of the current node to the root is larger than the distance of
  226|       |             * any of the nodes we wanted to reach */
  227|    384|            if (actdist > maxdist) {
  ------------------
  |  Branch (227:17): [True: 217, False: 167]
  ------------------
  228|       |                /* safety check, maxdist should have been set when we reached the last node */
  229|    217|                IGRAPH_ASSERT(maxdist >= 0);
  ------------------
  |  |  924|    217|    do { \
  |  |  925|    217|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    217|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 217]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    217|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 217]
  |  |  ------------------
  ------------------
  230|    217|                break;
  231|    217|            }
  232|    384|        }
  233|       |
  234|       |        /* If we need the edge-paths, we need to use igraph_incident() followed by an
  235|       |         * IGRAPH_OTHER() macro in the main loop. This is going to be slower than
  236|       |         * using igraph_neighbors() due to branch mispredictions in IGRAPH_OTHER(), so we
  237|       |         * use igraph_incident() only if the user needs the edge-paths */
  238|  34.0k|        if (edges) {
  ------------------
  |  Branch (238:13): [True: 34.0k, False: 0]
  ------------------
  239|  34.0k|            IGRAPH_CHECK(igraph_incident(graph, &neis, actnode, mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  34.0k|    do { \
  |  |  657|  34.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  34.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  34.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 34.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  34.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 34.0k]
  |  |  ------------------
  ------------------
  240|  34.0k|        } else {
  241|      0|            IGRAPH_CHECK(igraph_neighbors(graph, &neis, actnode, mode, IGRAPH_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  242|      0|        }
  243|       |
  244|  34.0k|        n = igraph_vector_int_size(&neis);
  245|   109k|        for (igraph_int_t j = 0; j < n; j++) {
  ------------------
  |  Branch (245:34): [True: 75.8k, False: 34.0k]
  ------------------
  246|  75.8k|            igraph_int_t neighbor;
  247|  75.8k|            igraph_int_t parentptr;
  248|       |
  249|  75.8k|            if (edges) {
  ------------------
  |  Branch (249:17): [True: 75.8k, False: 0]
  ------------------
  250|       |                /* user needs the edge-paths, so 'neis' contains edge IDs, we need to resolve
  251|       |                 * the next edge ID into a vertex ID */
  252|  75.8k|                neighbor = IGRAPH_OTHER(graph, VECTOR(neis)[j], actnode);
  ------------------
  |  |  146|  75.8k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  75.8k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  75.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  37.9k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  37.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  37.9k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  37.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 37.9k, False: 37.9k]
  |  |  ------------------
  ------------------
  253|  75.8k|            } else {
  254|       |                /* user does not need the edge-paths, so 'neis' contains vertex IDs */
  255|      0|                neighbor = VECTOR(neis)[j];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  256|      0|            }
  257|       |
  258|  75.8k|            if (geodist[neighbor] > 0 &&
  ------------------
  |  Branch (258:17): [True: 43.4k, False: 32.4k]
  ------------------
  259|  43.4k|                geodist[neighbor] - 1 < actdist + 1) {
  ------------------
  |  Branch (259:17): [True: 39.6k, False: 3.77k]
  ------------------
  260|       |                /* this node was reached via a shorter path before */
  261|  39.6k|                continue;
  262|  39.6k|            }
  263|       |
  264|       |            /* yay, found another shortest path to neighbor */
  265|       |
  266|  36.2k|            if (nrgeo) {
  ------------------
  |  Branch (266:17): [True: 36.2k, False: 0]
  ------------------
  267|       |                /* the number of geodesics leading to neighbor must be
  268|       |                 * increased by the number of geodesics leading to actnode */
  269|  36.2k|                VECTOR(*nrgeo)[neighbor] += VECTOR(*nrgeo)[actnode];
  ------------------
  |  |   60|  36.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*nrgeo)[neighbor] += VECTOR(*nrgeo)[actnode];
  ------------------
  |  |   60|  36.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  270|  36.2k|            }
  271|  36.2k|            if (geodist[neighbor] <= 0) {
  ------------------
  |  Branch (271:17): [True: 32.4k, False: 3.77k]
  ------------------
  272|       |                /* this node was not reached yet, push it into the queue */
  273|  32.4k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  32.4k|    do { \
  |  |  657|  32.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  32.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  32.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 32.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  32.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 32.4k]
  |  |  ------------------
  ------------------
  274|  32.4k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, actdist + 1));
  ------------------
  |  |  656|  32.4k|    do { \
  |  |  657|  32.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  32.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  32.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 32.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  32.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 32.4k]
  |  |  ------------------
  ------------------
  275|  32.4k|                if (geodist[neighbor] < 0) {
  ------------------
  |  Branch (275:21): [True: 32.4k, False: 0]
  ------------------
  276|  32.4k|                    reached++;
  277|  32.4k|                }
  278|  32.4k|                if (reached == to_reach) {
  ------------------
  |  Branch (278:21): [True: 217, False: 32.2k]
  ------------------
  279|    217|                    maxdist = actdist;
  280|    217|                }
  281|  32.4k|            }
  282|  36.2k|            geodist[neighbor] = actdist + 2;
  283|       |
  284|       |            /* copy all existing paths to the parent */
  285|  36.2k|            parentptr = VECTOR(ptrhead)[actnode];
  ------------------
  |  |   60|  36.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  286|  2.18M|            while (parentptr != 0) {
  ------------------
  |  Branch (286:20): [True: 2.14M, False: 36.2k]
  ------------------
  287|       |                /* allocate a new igraph_vector_int_t at the end of paths */
  288|  2.14M|                IGRAPH_CHECK(igraph_vector_int_list_push_back_new(&paths, &vptr));
  ------------------
  |  |  656|  2.14M|    do { \
  |  |  657|  2.14M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.14M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.14M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.14M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.14M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.14M]
  |  |  ------------------
  ------------------
  289|  2.14M|                IGRAPH_CHECK(igraph_vector_int_update(vptr, igraph_vector_int_list_get_ptr(&paths, parentptr - 1)));
  ------------------
  |  |  656|  2.14M|    do { \
  |  |  657|  2.14M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.14M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.14M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.14M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.14M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.14M]
  |  |  ------------------
  ------------------
  290|  2.14M|                IGRAPH_CHECK(igraph_vector_int_push_back(vptr, neighbor));
  ------------------
  |  |  656|  2.14M|    do { \
  |  |  657|  2.14M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.14M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.14M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.14M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.14M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.14M]
  |  |  ------------------
  ------------------
  291|       |
  292|  2.14M|                IGRAPH_CHECK(igraph_vector_int_list_push_back_new(&path_edge, &vptr_e));
  ------------------
  |  |  656|  2.14M|    do { \
  |  |  657|  2.14M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.14M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.14M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.14M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.14M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.14M]
  |  |  ------------------
  ------------------
  293|  2.14M|                if (actnode != from) {
  ------------------
  |  Branch (293:21): [True: 2.13M, False: 5.52k]
  ------------------
  294|       |                    /* If the previous vertex was the source then there is no edge to add*/
  295|  2.13M|                    IGRAPH_CHECK(igraph_vector_int_update(vptr_e, igraph_vector_int_list_get_ptr(&path_edge, parentptr - 1)));
  ------------------
  |  |  656|  2.13M|    do { \
  |  |  657|  2.13M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.13M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.13M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.13M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.13M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.13M]
  |  |  ------------------
  ------------------
  296|  2.13M|                }
  297|  2.14M|                IGRAPH_CHECK(igraph_vector_int_push_back(vptr_e, VECTOR(neis)[j]));
  ------------------
  |  |  656|  2.14M|    do { \
  |  |  657|  2.14M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.14M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.14M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.14M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.14M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.14M]
  |  |  ------------------
  ------------------
  298|       |
  299|  2.14M|                IGRAPH_CHECK(igraph_vector_int_push_back(&ptrlist, VECTOR(ptrhead)[neighbor]));
  ------------------
  |  |  656|  2.14M|    do { \
  |  |  657|  2.14M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.14M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.14M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.14M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.14M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.14M]
  |  |  ------------------
  ------------------
  300|  2.14M|                VECTOR(ptrhead)[neighbor] = igraph_vector_int_size(&ptrlist);
  ------------------
  |  |   60|  2.14M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  301|       |
  302|  2.14M|                parentptr = VECTOR(ptrlist)[parentptr - 1];
  ------------------
  |  |   60|  2.14M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  303|  2.14M|            }
  304|  36.2k|        }
  305|  34.0k|    }
  306|       |
  307|  2.00k|    igraph_dqueue_int_destroy(&q);
  308|  2.00k|    IGRAPH_FINALLY_CLEAN(1);
  309|       |
  310|       |    /* mark the nodes for which we need the result */
  311|  2.00k|    memset(geodist, 0, sizeof(geodist[0]) * (size_t) no_of_nodes);
  312|   334k|    for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  201|  2.00k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  179|   334k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  167|   332k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (312:33): [True: 332k, False: 2.00k]
  ------------------
  313|   332k|        geodist[ IGRAPH_VIT_GET(vit) ] = 1;
  ------------------
  |  |  214|   332k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 332k, False: 0]
  |  |  ------------------
  |  |  215|   332k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  314|   332k|    }
  315|       |
  316|  2.00k|    if (vertices) {
  ------------------
  |  Branch (316:9): [True: 2.00k, False: 0]
  ------------------
  317|  2.00k|        igraph_vector_int_list_clear(vertices);
  318|  2.00k|    }
  319|  2.00k|    if (edges) {
  ------------------
  |  Branch (319:9): [True: 2.00k, False: 0]
  ------------------
  320|  2.00k|        igraph_vector_int_list_clear(edges);
  321|  2.00k|    }
  322|       |
  323|   334k|    for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (323:30): [True: 332k, False: 2.00k]
  ------------------
  324|   332k|        igraph_int_t parentptr = VECTOR(ptrhead)[i];
  ------------------
  |  |   60|   332k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  325|       |
  326|   332k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   332k|    do { \
  |  |   47|   332k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 332k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   332k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 332k]
  |  |  ------------------
  ------------------
  327|       |
  328|       |        /* do we need the paths leading to vertex i? */
  329|   332k|        if (geodist[i] > 0) {
  ------------------
  |  Branch (329:13): [True: 332k, False: 0]
  ------------------
  330|       |            /* yes, transfer them to the result vector */
  331|  2.47M|            while (parentptr != 0) {
  ------------------
  |  Branch (331:20): [True: 2.14M, False: 332k]
  ------------------
  332|       |                /* Given two vector lists, list1 and list2, an efficient way to transfer
  333|       |                 * a vector from list1 to the end of list2 is to extend list2 with an
  334|       |                 * empty vector, then swap that empty vector with the given element of
  335|       |                 * list1. This approach avoids creating a full copy of the vector. */
  336|  2.14M|                if (vertices) {
  ------------------
  |  Branch (336:21): [True: 2.14M, False: 0]
  ------------------
  337|  2.14M|                    igraph_vector_int_t *p;
  338|  2.14M|                    IGRAPH_CHECK(igraph_vector_int_list_push_back_new(vertices, &p));
  ------------------
  |  |  656|  2.14M|    do { \
  |  |  657|  2.14M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.14M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.14M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.14M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.14M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.14M]
  |  |  ------------------
  ------------------
  339|  2.14M|                    igraph_vector_int_swap(p, igraph_vector_int_list_get_ptr(&paths, parentptr - 1));
  340|  2.14M|                }
  341|  2.14M|                if (edges) {
  ------------------
  |  Branch (341:21): [True: 2.14M, False: 0]
  ------------------
  342|  2.14M|                    igraph_vector_int_t *p;
  343|  2.14M|                    IGRAPH_CHECK(igraph_vector_int_list_push_back_new(edges, &p));
  ------------------
  |  |  656|  2.14M|    do { \
  |  |  657|  2.14M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.14M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.14M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.14M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.14M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.14M]
  |  |  ------------------
  ------------------
  344|  2.14M|                    igraph_vector_int_swap(p, igraph_vector_int_list_get_ptr(&path_edge, parentptr - 1));
  345|  2.14M|                }
  346|  2.14M|                parentptr = VECTOR(ptrlist)[parentptr - 1];
  ------------------
  |  |   60|  2.14M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  347|  2.14M|            }
  348|   332k|        }
  349|   332k|    }
  350|       |
  351|  2.00k|    IGRAPH_FREE(geodist);
  ------------------
  |  |   36|  2.00k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  352|  2.00k|    igraph_vector_int_destroy(&ptrlist);
  353|  2.00k|    igraph_vector_int_destroy(&ptrhead);
  354|  2.00k|    igraph_vector_int_destroy(&neis);
  355|  2.00k|    igraph_vector_int_list_destroy(&paths);
  356|  2.00k|    igraph_vector_int_list_destroy(&path_edge);
  357|  2.00k|    igraph_vit_destroy(&vit);
  358|  2.00k|    IGRAPH_FINALLY_CLEAN(7);
  359|       |
  360|  2.00k|    return IGRAPH_SUCCESS;
  361|  2.00k|}

igraph_i_validate_distance_weights:
   37|  4.00k|        igraph_bool_t *negative_weights) {
   38|       |
   39|  4.00k|    const igraph_int_t ecount = igraph_ecount(graph);
   40|       |
   41|  4.00k|    *negative_weights = false;
   42|       |
   43|  4.00k|    if (weights) {
  ------------------
  |  Branch (43:9): [True: 0, False: 4.00k]
  ------------------
   44|      0|        if (igraph_vector_size(weights) != ecount) {
  ------------------
  |  Branch (44:13): [True: 0, False: 0]
  ------------------
   45|      0|            IGRAPH_ERRORF("Edge weight vector length (%" IGRAPH_PRId ") does not match number of edges (%" IGRAPH_PRId ").",
  ------------------
  |  |  464|      0|    do { \
  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  467|      0|        return igraph_errno; \
  |  |  468|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   46|      0|                          IGRAPH_EINVAL,
   47|      0|                          igraph_vector_size(weights), ecount);
   48|      0|        }
   49|       |
   50|      0|        if (ecount > 0) {
  ------------------
  |  Branch (50:13): [True: 0, False: 0]
  ------------------
   51|      0|            igraph_real_t min = igraph_vector_min(weights);
   52|      0|            if (min < 0) {
  ------------------
  |  Branch (52:17): [True: 0, False: 0]
  ------------------
   53|      0|                *negative_weights = true;
   54|      0|            }
   55|      0|            if (isnan(min)) {
  ------------------
  |  Branch (55:17): [True: 0, False: 0]
  ------------------
   56|      0|                IGRAPH_ERROR("Edge weights must not contain NaN values.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   57|      0|            }
   58|      0|        }
   59|      0|    }
   60|       |
   61|  4.00k|    return IGRAPH_SUCCESS;
   62|  4.00k|}

igraph_pseudo_diameter:
  790|  2.00k|) {
  791|  2.00k|    if (weights) {
  ------------------
  |  Branch (791:9): [True: 0, False: 2.00k]
  ------------------
  792|      0|        return igraph_i_pseudo_diameter_dijkstra(
  793|      0|            graph, weights, diameter, vid_start, from, to, directed, unconn
  794|      0|        );
  795|  2.00k|    } else {
  796|  2.00k|        return igraph_i_pseudo_diameter_unweighted(
  797|  2.00k|            graph, diameter, vid_start, from, to, directed, unconn
  798|  2.00k|        );
  799|  2.00k|    }
  800|  2.00k|}
distances.c:igraph_i_eccentricity_unweighted:
   41|  9.24k|) {
   42|       |
   43|  9.24k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
   44|  9.24k|    igraph_dqueue_int_t q;
   45|  9.24k|    igraph_vit_t vit;
   46|  9.24k|    igraph_vector_int_t counted;
   47|  9.24k|    igraph_int_t i, mark = 1;
   48|  9.24k|    igraph_int_t min_degree = 0;
   49|       |
   50|  9.24k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  9.24k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  9.24k|    do { \
  |  |  |  |  657|  9.24k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  9.24k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  9.24k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.24k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  9.24k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 9.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  9.24k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  9.24k|    do { \
  |  |  |  |  604|  9.24k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  9.24k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  9.24k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  9.24k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 9.24k]
  |  |  |  |  ------------------
  |  |  |  |  608|  9.24k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  9.24k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 9.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 9.24k]
  |  |  ------------------
  ------------------
   51|       |
   52|  9.24k|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|  9.24k|    do { \
  |  |  657|  9.24k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  9.24k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  9.24k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  9.24k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 9.24k]
  |  |  ------------------
  ------------------
   53|  9.24k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  9.24k|    do { \
  |  |  604|  9.24k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  9.24k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  9.24k|         * incorrect destructor function with the pointer */ \
  |  |  607|  9.24k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 9.24k]
  |  |  ------------------
  |  |  608|  9.24k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  9.24k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 9.24k]
  |  |  ------------------
  ------------------
   54|       |
   55|  9.24k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&counted, no_of_nodes);
  ------------------
  |  |  119|  9.24k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  9.24k|    do { \
  |  |  |  |  657|  9.24k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  9.24k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  9.24k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.24k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  9.24k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 9.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  9.24k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  9.24k|    do { \
  |  |  |  |  604|  9.24k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  9.24k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  9.24k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  9.24k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 9.24k]
  |  |  |  |  ------------------
  |  |  |  |  608|  9.24k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  9.24k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 9.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 9.24k]
  |  |  ------------------
  ------------------
   56|       |
   57|  9.24k|    IGRAPH_CHECK(igraph_vector_resize(res, IGRAPH_VIT_SIZE(vit)));
  ------------------
  |  |  656|  9.24k|    do { \
  |  |  657|  9.24k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  9.24k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  9.24k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  9.24k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 9.24k]
  |  |  ------------------
  ------------------
   58|  9.24k|    igraph_vector_fill(res, -1);
   59|       |
   60|  9.24k|    for (i = 0, IGRAPH_VIT_RESET(vit);
  ------------------
  |  |  201|  9.24k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
   61|  18.4k|         !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|  18.4k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (61:10): [True: 9.24k, False: 9.24k]
  ------------------
   62|  9.24k|         IGRAPH_VIT_NEXT(vit), mark++, i++) {
  ------------------
  |  |  167|  9.24k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
   63|       |
   64|  9.24k|        igraph_int_t source;
   65|  9.24k|        igraph_int_t nodes_reached = 1;
   66|  9.24k|        source = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  9.24k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 9.24k, False: 0]
  |  |  ------------------
  |  |  215|  9.24k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
   67|  9.24k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, source));
  ------------------
  |  |  656|  9.24k|    do { \
  |  |  657|  9.24k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  9.24k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  9.24k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  9.24k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 9.24k]
  |  |  ------------------
  ------------------
   68|  9.24k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, 0));
  ------------------
  |  |  656|  9.24k|    do { \
  |  |  657|  9.24k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  9.24k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  9.24k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  9.24k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 9.24k]
  |  |  ------------------
  ------------------
   69|  9.24k|        VECTOR(counted)[source] = mark;
  ------------------
  |  |   60|  9.24k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   70|       |
   71|  9.24k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  9.24k|    do { \
  |  |   47|  9.24k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 9.24k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  9.24k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 9.24k]
  |  |  ------------------
  ------------------
   72|       |
   73|   140k|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (73:16): [True: 131k, False: 9.24k]
  ------------------
   74|   131k|            igraph_int_t act = igraph_dqueue_int_pop(&q);
   75|   131k|            igraph_int_t dist = igraph_dqueue_int_pop(&q);
   76|   131k|            igraph_vector_int_t *neis = igraph_lazy_adjlist_get(adjlist, act);
  ------------------
  |  |  158|   131k|    (igraph_lazy_adjlist_has(al,no) ? ((al)->adjs[(igraph_int_t)(no)]) \
  |  |  ------------------
  |  |  |  |  133|   131k|#define igraph_lazy_adjlist_has(al,no) ((al)->adjs[(igraph_int_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (133:40): [True: 74.7k, False: 56.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  159|   131k|                                    : (igraph_i_lazy_adjlist_get_real(al, no)))
  ------------------
   77|   131k|            igraph_int_t j, n;
   78|       |
   79|   131k|            IGRAPH_CHECK_OOM(neis, "Failed to query neighbors.");
  ------------------
  |  |  709|   131k|    do { \
  |  |  710|   131k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|   131k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 131k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|   131k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 131k]
  |  |  ------------------
  ------------------
   80|       |
   81|   131k|            n = igraph_vector_int_size(neis);
   82|   281k|            for (j = 0; j < n; j++) {
  ------------------
  |  Branch (82:25): [True: 150k, False: 131k]
  ------------------
   83|   150k|                igraph_int_t nei = VECTOR(*neis)[j];
  ------------------
  |  |   60|   150k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   84|   150k|                if (VECTOR(counted)[nei] != mark) {
  ------------------
  |  |   60|   150k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (84:21): [True: 122k, False: 28.2k]
  ------------------
   85|   122k|                    VECTOR(counted)[nei] = mark;
  ------------------
  |  |   60|   122k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   86|   122k|                    nodes_reached++;
   87|   122k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&q, nei));
  ------------------
  |  |  656|   122k|    do { \
  |  |  657|   122k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   122k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   122k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 122k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   122k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 122k]
  |  |  ------------------
  ------------------
   88|   122k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&q, dist + 1));
  ------------------
  |  |  656|   122k|    do { \
  |  |  657|   122k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   122k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   122k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 122k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   122k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 122k]
  |  |  ------------------
  ------------------
   89|   122k|                }
   90|   150k|            }
   91|   131k|            if (vid_ecc) {
  ------------------
  |  Branch (91:17): [True: 131k, False: 0]
  ------------------
   92|       |                /* Return the vertex ID of the vertex which has the lowest
   93|       |                 * degree of the vertices most distant from the starting
   94|       |                 * vertex. Assumes there is only 1 vid in vids. Used for
   95|       |                 * pseudo_diameter calculations. */
   96|   131k|                if (dist > VECTOR(*res)[i] || (dist == VECTOR(*res)[i] && n < min_degree)) {
  ------------------
  |  |   60|   131k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (dist > VECTOR(*res)[i] || (dist == VECTOR(*res)[i] && n < min_degree)) {
  ------------------
  |  |   60|  60.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (96:21): [True: 70.6k, False: 60.6k]
  |  Branch (96:48): [True: 60.6k, False: 0]
  |  Branch (96:75): [True: 3.92k, False: 56.6k]
  ------------------
   97|  74.5k|                    VECTOR(*res)[i] = dist;
  ------------------
  |  |   60|  74.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   98|  74.5k|                    *vid_ecc = act;
   99|  74.5k|                    min_degree = n;
  100|  74.5k|                }
  101|   131k|            } else if (dist > VECTOR(*res)[i]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (101:24): [True: 0, False: 0]
  ------------------
  102|      0|                VECTOR(*res)[i] = dist;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  103|      0|            }
  104|   131k|        } /* while !igraph_dqueue_int_empty(dqueue) */
  105|       |
  106|  9.24k|        if (nodes_reached != no_of_nodes && !unconn && vid_ecc) {
  ------------------
  |  Branch (106:13): [True: 8.51k, False: 722]
  |  Branch (106:45): [True: 0, False: 8.51k]
  |  Branch (106:56): [True: 0, False: 0]
  ------------------
  107|      0|            *vid_ecc = -1;
  108|      0|            break;
  109|      0|        }
  110|  9.24k|    } /* for IGRAPH_VIT_NEXT(vit) */
  111|       |
  112|  9.24k|    igraph_vector_int_destroy(&counted);
  113|  9.24k|    igraph_vit_destroy(&vit);
  114|  9.24k|    igraph_dqueue_int_destroy(&q);
  115|  9.24k|    IGRAPH_FINALLY_CLEAN(3);
  116|       |
  117|  9.24k|    return IGRAPH_SUCCESS;
  118|  9.24k|}
distances.c:igraph_i_pseudo_diameter_unweighted:
  369|  2.00k|) {
  370|       |
  371|  2.00k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  372|  2.00k|    igraph_real_t ecc_v;
  373|  2.00k|    igraph_real_t ecc_u;
  374|  2.00k|    igraph_int_t vid_ecc;
  375|  2.00k|    igraph_int_t ito, ifrom;
  376|  2.00k|    igraph_bool_t inf = false;
  377|       |
  378|  2.00k|    if (vid_start >= no_of_nodes) {
  ------------------
  |  Branch (378:9): [True: 0, False: 2.00k]
  ------------------
  379|      0|        IGRAPH_ERROR("Starting vertex ID for pseudo-diameter out of range.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  380|      0|    }
  381|       |
  382|       |    /* We will reach here when vid_start < 0 and the graph has no vertices. */
  383|  2.00k|    if (no_of_nodes == 0) {
  ------------------
  |  Branch (383:9): [True: 0, False: 2.00k]
  ------------------
  384|      0|        if (diameter) {
  ------------------
  |  Branch (384:13): [True: 0, False: 0]
  ------------------
  385|      0|            *diameter = IGRAPH_NAN;
  ------------------
  |  |  140|      0|#define IGRAPH_NAN ((double)NAN)
  ------------------
  386|      0|        }
  387|      0|        if (from) {
  ------------------
  |  Branch (387:13): [True: 0, False: 0]
  ------------------
  388|      0|            *from = -1;
  389|      0|        }
  390|      0|        if (to) {
  ------------------
  |  Branch (390:13): [True: 0, False: 0]
  ------------------
  391|      0|            *to = -1;
  392|      0|        }
  393|      0|        return IGRAPH_SUCCESS;
  394|      0|    }
  395|       |
  396|  2.00k|    if (vid_start < 0) {
  ------------------
  |  Branch (396:9): [True: 0, False: 2.00k]
  ------------------
  397|      0|        vid_start = RNG_INTEGER(0, no_of_nodes - 1);
  ------------------
  |  |  152|      0|#define RNG_INTEGER(l,h) (igraph_rng_get_integer(igraph_rng_default(),(l),(h)))
  ------------------
  398|      0|    }
  399|       |
  400|  2.00k|    if (!igraph_is_directed(graph) || !directed) {
  ------------------
  |  Branch (400:9): [True: 0, False: 2.00k]
  |  Branch (400:39): [True: 0, False: 2.00k]
  ------------------
  401|      0|        igraph_lazy_adjlist_t adjlist;
  402|      0|        igraph_vector_t ecc_vec;
  403|       |
  404|      0|        IGRAPH_CHECK(igraph_lazy_adjlist_init(graph, &adjlist, IGRAPH_ALL,
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  405|      0|                                              IGRAPH_NO_LOOPS, IGRAPH_NO_MULTIPLE));
  406|      0|        IGRAPH_FINALLY(igraph_lazy_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  407|      0|        ifrom = vid_start;
  408|      0|        IGRAPH_VECTOR_INIT_FINALLY(&ecc_vec, no_of_nodes);
  ------------------
  |  |  104|      0|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|      0|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 0]
  |  |  ------------------
  ------------------
  409|       |
  410|      0|        IGRAPH_CHECK(igraph_i_eccentricity_unweighted(
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  411|      0|            graph, &ecc_vec, igraph_vss_1(vid_start), &adjlist, &vid_ecc, unconn
  412|      0|        ));
  413|      0|        ecc_u = VECTOR(ecc_vec)[0];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  414|       |
  415|      0|        if (!unconn && vid_ecc == -1) {
  ------------------
  |  Branch (415:13): [True: 0, False: 0]
  |  Branch (415:24): [True: 0, False: 0]
  ------------------
  416|      0|            inf = true;
  417|      0|        } else {
  418|      0|            while (true) {
  ------------------
  |  Branch (418:20): [True: 0, Folded]
  ------------------
  419|      0|                IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|      0|    do { \
  |  |   47|      0|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  420|       |
  421|      0|                ito = vid_ecc;
  422|       |
  423|      0|                IGRAPH_CHECK(igraph_i_eccentricity_unweighted(
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  424|      0|                    graph, &ecc_vec, igraph_vss_1(vid_ecc),  &adjlist, &vid_ecc, true
  425|      0|                ));
  426|       |
  427|      0|                ecc_v = VECTOR(ecc_vec)[0];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  428|       |
  429|      0|                if (ecc_u < ecc_v) {
  ------------------
  |  Branch (429:21): [True: 0, False: 0]
  ------------------
  430|      0|                    ecc_u = ecc_v;
  431|      0|                    ifrom = ito;
  432|      0|                } else {
  433|      0|                    break;
  434|      0|                }
  435|      0|            }
  436|      0|        }
  437|      0|        igraph_vector_destroy(&ecc_vec);
  438|      0|        igraph_lazy_adjlist_destroy(&adjlist);
  439|      0|        IGRAPH_FINALLY_CLEAN(2);
  440|  2.00k|    } else {
  441|  2.00k|        igraph_vector_t ecc_out;
  442|  2.00k|        igraph_vector_t ecc_in;
  443|  2.00k|        igraph_int_t vid_ecc_in;
  444|  2.00k|        igraph_int_t vid_ecc_out;
  445|  2.00k|        igraph_int_t vid_end;
  446|  2.00k|        igraph_bool_t direction;
  447|  2.00k|        igraph_lazy_adjlist_t adjlist_in;
  448|  2.00k|        igraph_lazy_adjlist_t adjlist_out;
  449|       |
  450|  2.00k|        IGRAPH_CHECK(igraph_lazy_adjlist_init(graph, &adjlist_in, IGRAPH_IN,
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  451|  2.00k|                                              IGRAPH_NO_LOOPS, IGRAPH_NO_MULTIPLE));
  452|  2.00k|        IGRAPH_FINALLY(igraph_lazy_adjlist_destroy, &adjlist_in);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  453|  2.00k|        IGRAPH_CHECK(igraph_lazy_adjlist_init(graph, &adjlist_out, IGRAPH_OUT,
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  454|  2.00k|                                              IGRAPH_NO_LOOPS, IGRAPH_NO_MULTIPLE));
  455|  2.00k|        IGRAPH_FINALLY(igraph_lazy_adjlist_destroy, &adjlist_out);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  456|       |
  457|  2.00k|        IGRAPH_VECTOR_INIT_FINALLY(&ecc_in, igraph_vcount(graph));
  ------------------
  |  |  104|  2.00k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  2.00k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  458|  2.00k|        IGRAPH_VECTOR_INIT_FINALLY(&ecc_out, igraph_vcount(graph));
  ------------------
  |  |  104|  2.00k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  2.00k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  459|       |
  460|  2.00k|        IGRAPH_CHECK(igraph_i_eccentricity_unweighted(
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  461|  2.00k|            graph, &ecc_out, igraph_vss_1(vid_start),  &adjlist_out,
  462|  2.00k|            &vid_ecc_out, unconn
  463|  2.00k|        ));
  464|  2.00k|        IGRAPH_CHECK(igraph_i_eccentricity_unweighted(
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  465|  2.00k|            graph, &ecc_in, igraph_vss_1(vid_start), &adjlist_in,
  466|  2.00k|            &vid_ecc_in, unconn
  467|  2.00k|        ));
  468|       |
  469|       |        /* A directed graph is strongly connected iff all vertices are reachable
  470|       |         * from vid_start both when moving along or moving opposite the edge directions. */
  471|  2.00k|        if (!unconn && (vid_ecc_out == -1 || vid_ecc_in == -1)) {
  ------------------
  |  Branch (471:13): [True: 0, False: 2.00k]
  |  Branch (471:25): [True: 0, False: 0]
  |  Branch (471:46): [True: 0, False: 0]
  ------------------
  472|      0|            inf = true;
  473|  2.00k|        } else {
  474|  2.00k|            if (VECTOR(ecc_out)[0] > VECTOR(ecc_in)[0]) {
  ------------------
  |  |   60|  2.00k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (VECTOR(ecc_out)[0] > VECTOR(ecc_in)[0]) {
  ------------------
  |  |   60|  2.00k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (474:17): [True: 386, False: 1.61k]
  ------------------
  475|    386|                vid_ecc = vid_ecc_out;
  476|    386|                ecc_u = VECTOR(ecc_out)[0];
  ------------------
  |  |   60|    386|#define VECTOR(v) ((v).stor_begin)
  ------------------
  477|  1.61k|            } else {
  478|  1.61k|                vid_ecc = vid_ecc_in;
  479|  1.61k|                ecc_u = VECTOR(ecc_in)[0];
  ------------------
  |  |   60|  1.61k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  480|  1.61k|            }
  481|       |
  482|  2.61k|            while (1) {
  ------------------
  |  Branch (482:20): [True: 2.61k, Folded]
  ------------------
  483|  2.61k|                IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  2.61k|    do { \
  |  |   47|  2.61k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 2.61k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  2.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 2.61k]
  |  |  ------------------
  ------------------
  484|       |
  485|  2.61k|                vid_end = vid_ecc;
  486|       |
  487|       |                /* TODO: In the undirected case, we break ties between vertices at the
  488|       |                 * same distance based on their degree. In te directed case, should we
  489|       |                 * use in-, out- or total degree? */
  490|  2.61k|                IGRAPH_CHECK(igraph_i_eccentricity_unweighted(
  ------------------
  |  |  656|  2.61k|    do { \
  |  |  657|  2.61k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.61k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.61k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.61k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.61k]
  |  |  ------------------
  ------------------
  491|  2.61k|                    graph, &ecc_out, igraph_vss_1(vid_ecc), &adjlist_out,
  492|  2.61k|                    &vid_ecc_out, true
  493|  2.61k|                ));
  494|  2.61k|                IGRAPH_CHECK(igraph_i_eccentricity_unweighted(
  ------------------
  |  |  656|  2.61k|    do { \
  |  |  657|  2.61k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.61k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.61k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.61k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.61k]
  |  |  ------------------
  ------------------
  495|  2.61k|                    graph, &ecc_in, igraph_vss_1(vid_ecc), &adjlist_in,
  496|  2.61k|                    &vid_ecc_in, true
  497|  2.61k|                ));
  498|       |
  499|  2.61k|                if (VECTOR(ecc_out)[0] > VECTOR(ecc_in)[0]) {
  ------------------
  |  |   60|  2.61k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (VECTOR(ecc_out)[0] > VECTOR(ecc_in)[0]) {
  ------------------
  |  |   60|  2.61k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (499:21): [True: 842, False: 1.77k]
  ------------------
  500|    842|                    vid_ecc = vid_ecc_out;
  501|    842|                    ecc_v = VECTOR(ecc_out)[0];
  ------------------
  |  |   60|    842|#define VECTOR(v) ((v).stor_begin)
  ------------------
  502|    842|                    direction = 1;
  503|  1.77k|                } else {
  504|  1.77k|                    vid_ecc = vid_ecc_in;
  505|  1.77k|                    ecc_v = VECTOR(ecc_in)[0];
  ------------------
  |  |   60|  1.77k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  506|  1.77k|                    direction = 0;
  507|  1.77k|                }
  508|       |
  509|  2.61k|                if (ecc_u < ecc_v) {
  ------------------
  |  Branch (509:21): [True: 616, False: 2.00k]
  ------------------
  510|    616|                    ecc_u = ecc_v;
  511|    616|                    vid_start = vid_end;
  512|  2.00k|                } else {
  513|  2.00k|                    break;
  514|  2.00k|                }
  515|  2.61k|            }
  516|       |
  517|  2.00k|            if (direction) {
  ------------------
  |  Branch (517:17): [True: 458, False: 1.54k]
  ------------------
  518|    458|                ifrom = vid_end;
  519|    458|                ito   = vid_start;
  520|  1.54k|            } else {
  521|  1.54k|                ifrom = vid_start;
  522|  1.54k|                ito   = vid_end;
  523|  1.54k|            }
  524|       |
  525|  2.00k|        }
  526|  2.00k|        igraph_vector_destroy(&ecc_out);
  527|  2.00k|        igraph_vector_destroy(&ecc_in);
  528|  2.00k|        igraph_lazy_adjlist_destroy(&adjlist_in);
  529|  2.00k|        igraph_lazy_adjlist_destroy(&adjlist_out);
  530|  2.00k|        IGRAPH_FINALLY_CLEAN(4);
  531|  2.00k|    }
  532|       |
  533|  2.00k|    if (inf) {
  ------------------
  |  Branch (533:9): [True: 0, False: 2.00k]
  ------------------
  534|      0|        if (diameter) {
  ------------------
  |  Branch (534:13): [True: 0, False: 0]
  ------------------
  535|      0|            *diameter = IGRAPH_INFINITY;
  ------------------
  |  |  139|      0|#define IGRAPH_INFINITY ((double)INFINITY)
  ------------------
  536|      0|        }
  537|      0|        if (from) {
  ------------------
  |  Branch (537:13): [True: 0, False: 0]
  ------------------
  538|      0|            *from = -1;
  539|      0|        }
  540|      0|        if (to) {
  ------------------
  |  Branch (540:13): [True: 0, False: 0]
  ------------------
  541|      0|            *to = -1;
  542|      0|        }
  543|  2.00k|    } else {
  544|  2.00k|        if (diameter) {
  ------------------
  |  Branch (544:13): [True: 2.00k, False: 0]
  ------------------
  545|  2.00k|            *diameter = ecc_u;
  546|  2.00k|        }
  547|  2.00k|        if (from) {
  ------------------
  |  Branch (547:13): [True: 2.00k, False: 0]
  ------------------
  548|  2.00k|            *from = ifrom;
  549|  2.00k|        }
  550|  2.00k|        if (to) {
  ------------------
  |  Branch (550:13): [True: 2.00k, False: 0]
  ------------------
  551|  2.00k|            *to = ito;
  552|  2.00k|        }
  553|  2.00k|    }
  554|       |
  555|  2.00k|    return IGRAPH_SUCCESS;
  556|  2.00k|}

igraph_is_eulerian:
  333|  2.00k|igraph_error_t igraph_is_eulerian(const igraph_t *graph, igraph_bool_t *has_path, igraph_bool_t *has_cycle) {
  334|  2.00k|    igraph_int_t start_of_path = 0;
  335|       |
  336|  2.00k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (336:9): [True: 2.00k, False: 0]
  ------------------
  337|  2.00k|        IGRAPH_CHECK(igraph_i_is_eulerian_directed(graph, has_path, has_cycle, &start_of_path));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  338|  2.00k|    } else {
  339|      0|        IGRAPH_CHECK(igraph_i_is_eulerian_undirected(graph, has_path, has_cycle, &start_of_path));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  340|      0|    }
  341|  2.00k|    return IGRAPH_SUCCESS;
  342|  2.00k|}
igraph_eulerian_cycle:
  595|    389|        const igraph_t *graph, igraph_vector_int_t *edge_res, igraph_vector_int_t *vertex_res) {
  596|       |
  597|    389|    igraph_bool_t has_cycle;
  598|    389|    igraph_bool_t has_path;
  599|    389|    igraph_int_t start_of_path = 0;
  600|       |
  601|    389|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (601:9): [True: 389, False: 0]
  ------------------
  602|    389|        IGRAPH_CHECK(igraph_i_is_eulerian_directed(graph, &has_path, &has_cycle, &start_of_path));
  ------------------
  |  |  656|    389|    do { \
  |  |  657|    389|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    389|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    389|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 389]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    389|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 389]
  |  |  ------------------
  ------------------
  603|       |
  604|    389|        if (!has_cycle) {
  ------------------
  |  Branch (604:13): [True: 0, False: 389]
  ------------------
  605|      0|            IGRAPH_ERROR("The graph does not have an Eulerian cycle.", IGRAPH_ENOSOL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  606|      0|        }
  607|       |
  608|    389|        IGRAPH_CHECK(igraph_i_eulerian_path_directed(graph, edge_res, vertex_res, start_of_path));
  ------------------
  |  |  656|    389|    do { \
  |  |  657|    389|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    389|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    389|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 389]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    389|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 389]
  |  |  ------------------
  ------------------
  609|    389|    } else {
  610|      0|        IGRAPH_CHECK(igraph_i_is_eulerian_undirected(graph, &has_path, &has_cycle, &start_of_path));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  611|       |
  612|      0|        if (!has_cycle) {
  ------------------
  |  Branch (612:13): [True: 0, False: 0]
  ------------------
  613|      0|            IGRAPH_ERROR("The graph does not have an Eulerian cycle.", IGRAPH_ENOSOL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  614|      0|        }
  615|       |
  616|      0|        IGRAPH_CHECK(igraph_i_eulerian_path_undirected(graph, edge_res, vertex_res, start_of_path));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  617|      0|    }
  618|       |
  619|    389|    return IGRAPH_SUCCESS;
  620|    389|}
igraph_eulerian_path:
  657|    751|        const igraph_t *graph, igraph_vector_int_t *edge_res, igraph_vector_int_t *vertex_res) {
  658|       |
  659|    751|    igraph_bool_t has_cycle;
  660|    751|    igraph_bool_t has_path;
  661|    751|    igraph_int_t start_of_path = 0;
  662|       |
  663|    751|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (663:9): [True: 751, False: 0]
  ------------------
  664|    751|        IGRAPH_CHECK(igraph_i_is_eulerian_directed(graph, &has_path, &has_cycle, &start_of_path));
  ------------------
  |  |  656|    751|    do { \
  |  |  657|    751|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    751|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    751|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 751]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    751|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 751]
  |  |  ------------------
  ------------------
  665|       |
  666|    751|        if (!has_path) {
  ------------------
  |  Branch (666:13): [True: 0, False: 751]
  ------------------
  667|      0|            IGRAPH_ERROR("The graph does not have an Eulerian path.", IGRAPH_ENOSOL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  668|      0|        }
  669|    751|        IGRAPH_CHECK(igraph_i_eulerian_path_directed(graph, edge_res, vertex_res, start_of_path));
  ------------------
  |  |  656|    751|    do { \
  |  |  657|    751|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    751|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    751|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 751]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    751|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 751]
  |  |  ------------------
  ------------------
  670|    751|    } else {
  671|      0|        IGRAPH_CHECK(igraph_i_is_eulerian_undirected(graph, &has_path, &has_cycle, &start_of_path));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  672|       |
  673|      0|        if (!has_path) {
  ------------------
  |  Branch (673:13): [True: 0, False: 0]
  ------------------
  674|      0|            IGRAPH_ERROR("The graph does not have an Eulerian path.", IGRAPH_ENOSOL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  675|      0|        }
  676|       |
  677|      0|        IGRAPH_CHECK(igraph_i_eulerian_path_undirected(graph, edge_res, vertex_res, start_of_path));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  678|      0|    }
  679|       |
  680|    751|    return IGRAPH_SUCCESS;
  681|    751|}
eulerian.c:igraph_i_is_eulerian_directed:
  166|  3.14k|        const igraph_t *graph, igraph_bool_t *has_path, igraph_bool_t *has_cycle, igraph_int_t *start_of_path) {
  167|  3.14k|    igraph_int_t incoming_excess, outgoing_excess, n;
  168|  3.14k|    igraph_int_t i, vsize;
  169|  3.14k|    igraph_int_t cluster_count;
  170|  3.14k|    igraph_vector_int_t out_degree, in_degree;
  171|  3.14k|    igraph_vector_int_t csize;
  172|       |    /* boolean vector to mark singletons: */
  173|  3.14k|    igraph_vector_int_t nonsingleton;
  174|       |    /* number of self-looping singletons: */
  175|  3.14k|    igraph_int_t es;
  176|       |    /* will be set to 1 if there are non-isolated vertices, otherwise 0: */
  177|  3.14k|    igraph_int_t ens;
  178|       |
  179|  3.14k|    n = igraph_vcount(graph);
  180|       |
  181|  3.14k|    if (igraph_ecount(graph) == 0 || n <= 1) {
  ------------------
  |  Branch (181:9): [True: 318, False: 2.82k]
  |  Branch (181:38): [True: 66, False: 2.75k]
  ------------------
  182|    384|        start_of_path = 0; /* in case the graph has one vertex with self-loops */
  183|    384|        *has_path = true;
  184|    384|        *has_cycle = true;
  185|    384|        return IGRAPH_SUCCESS;
  186|    384|    }
  187|       |
  188|  2.75k|    incoming_excess = 0;
  189|  2.75k|    outgoing_excess = 0;
  190|       |
  191|       |    /* check for weak connectedness, but singletons are special since they affect
  192|       |     * the Eulerian nature only if there is a self-loop AND another edge
  193|       |     * somewhere else in the graph */
  194|  2.75k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&csize, 0);
  ------------------
  |  |  119|  2.75k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.75k|    do { \
  |  |  |  |  657|  2.75k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.75k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.75k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.75k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.75k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.75k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.75k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.75k|    do { \
  |  |  |  |  604|  2.75k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.75k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.75k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.75k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.75k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.75k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.75k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.75k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.75k]
  |  |  ------------------
  ------------------
  195|       |
  196|  2.75k|    IGRAPH_CHECK(igraph_connected_components(graph, NULL, &csize, NULL, IGRAPH_WEAK));
  ------------------
  |  |  656|  2.75k|    do { \
  |  |  657|  2.75k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.75k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.75k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.75k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.75k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.75k]
  |  |  ------------------
  ------------------
  197|  2.75k|    cluster_count = 0;
  198|  2.75k|    vsize = igraph_vector_int_size(&csize);
  199|   326k|    for (i = 0; i < vsize; i++) {
  ------------------
  |  Branch (199:17): [True: 324k, False: 2.25k]
  ------------------
  200|   324k|        if (VECTOR(csize)[i] > 1) {
  ------------------
  |  |   60|   324k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (200:13): [True: 3.10k, False: 321k]
  ------------------
  201|  3.10k|            cluster_count++;
  202|  3.10k|            if (cluster_count > 1) {
  ------------------
  |  Branch (202:17): [True: 503, False: 2.60k]
  ------------------
  203|       |                /* weakly disconnected edges, they'll never reach each other */
  204|    503|                *has_path = false;
  205|    503|                *has_cycle = false;
  206|    503|                igraph_vector_int_destroy(&csize);
  207|    503|                IGRAPH_FINALLY_CLEAN(1);
  208|       |
  209|    503|                return IGRAPH_SUCCESS;
  210|    503|            }
  211|  3.10k|        }
  212|   324k|    }
  213|       |
  214|  2.25k|    igraph_vector_int_destroy(&csize);
  215|  2.25k|    IGRAPH_FINALLY_CLEAN(1);
  216|       |
  217|       |    /* the graph is weakly connected except for singletons */
  218|       |    /* find the singletons (including those with self-loops) */
  219|  2.25k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&nonsingleton, 0);
  ------------------
  |  |  119|  2.25k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.25k|    do { \
  |  |  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.25k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.25k|    do { \
  |  |  |  |  604|  2.25k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.25k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.25k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.25k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.25k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  220|  2.25k|    IGRAPH_CHECK(igraph_degree(graph, &nonsingleton, igraph_vss_all(), IGRAPH_ALL, IGRAPH_NO_LOOPS));
  ------------------
  |  |  656|  2.25k|    do { \
  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  221|       |
  222|       |
  223|       |    /* checking if no. of incoming edges == outgoing edges
  224|       |     * plus there are a few corner cases with singletons */
  225|  2.25k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&out_degree, 0);
  ------------------
  |  |  119|  2.25k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.25k|    do { \
  |  |  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.25k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.25k|    do { \
  |  |  |  |  604|  2.25k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.25k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.25k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.25k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.25k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  226|  2.25k|    IGRAPH_CHECK(igraph_degree(graph, &out_degree, igraph_vss_all(), IGRAPH_OUT, IGRAPH_LOOPS));
  ------------------
  |  |  656|  2.25k|    do { \
  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  227|       |
  228|  2.25k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&in_degree, 0);
  ------------------
  |  |  119|  2.25k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.25k|    do { \
  |  |  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.25k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.25k|    do { \
  |  |  |  |  604|  2.25k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.25k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.25k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.25k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.25k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  229|  2.25k|    IGRAPH_CHECK(igraph_degree(graph, &in_degree, igraph_vss_all(), IGRAPH_IN, IGRAPH_LOOPS));
  ------------------
  |  |  656|  2.25k|    do { \
  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  230|  2.25k|    es = 0;
  231|  2.25k|    ens = 0;
  232|  2.25k|    *start_of_path = -1;
  233|   234k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (233:17): [True: 233k, False: 1.50k]
  ------------------
  234|   233k|        igraph_int_t degin = VECTOR(in_degree)[i];
  ------------------
  |  |   60|   233k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  235|   233k|        igraph_int_t degout = VECTOR(out_degree)[i];
  ------------------
  |  |   60|   233k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  236|       |
  237|       |        /* Eulerian is about edges, so skip free vertices */
  238|   233k|        if (degin + degout == 0) continue;
  ------------------
  |  Branch (238:13): [True: 215k, False: 17.5k]
  ------------------
  239|       |
  240|  17.5k|        if (!VECTOR(nonsingleton)[i]) {
  ------------------
  |  |   60|  17.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (240:13): [True: 199, False: 17.3k]
  ------------------
  241|       |            /* singleton with self loops */
  242|    199|            es++;
  243|       |            /* if we ever want a path, it has to be this self-loop */
  244|    199|            *start_of_path = i;
  245|  17.3k|        } else {
  246|       |            /* at least one non-singleton */
  247|  17.3k|            ens = 1;
  248|  17.3k|        }
  249|       |
  250|  17.5k|        if (es + ens > 1) {
  ------------------
  |  Branch (250:13): [True: 39, False: 17.4k]
  ------------------
  251|       |            /* 2+ singletons with self loops or singleton with self-loops and
  252|       |             * 1+ edges in the non-singleton part of the graph. */
  253|     39|            *has_path = false;
  254|     39|            *has_cycle = false;
  255|     39|            igraph_vector_int_destroy(&nonsingleton);
  256|     39|            igraph_vector_int_destroy(&in_degree);
  257|     39|            igraph_vector_int_destroy(&out_degree);
  258|     39|            IGRAPH_FINALLY_CLEAN(3);
  259|       |
  260|     39|            return IGRAPH_SUCCESS;
  261|     39|        }
  262|       |
  263|       |        /* as long as we have perfect balance, you can start
  264|       |         * anywhere with an edge */
  265|  17.4k|        if (*start_of_path == -1 && incoming_excess == 0 && outgoing_excess == 0) {
  ------------------
  |  Branch (265:13): [True: 2.08k, False: 15.3k]
  |  Branch (265:37): [True: 2.08k, False: 0]
  |  Branch (265:61): [True: 2.08k, False: 0]
  ------------------
  266|  2.08k|            *start_of_path = i;
  267|  2.08k|        }
  268|       |
  269|       |        /* same in and out (including self-loops, even in singletons) */
  270|  17.4k|        if (degin == degout) {
  ------------------
  |  Branch (270:13): [True: 14.9k, False: 2.54k]
  ------------------
  271|  14.9k|            continue;
  272|  14.9k|        }
  273|       |
  274|       |        /* non-singleton, in != out */
  275|  2.54k|        if (degin > degout) {
  ------------------
  |  Branch (275:13): [True: 1.28k, False: 1.26k]
  ------------------
  276|  1.28k|            incoming_excess += degin - degout;
  277|  1.28k|        } else {
  278|  1.26k|            outgoing_excess += degout - degin;
  279|  1.26k|            if (outgoing_excess == 1) {
  ------------------
  |  Branch (279:17): [True: 912, False: 350]
  ------------------
  280|    912|                *start_of_path = i;
  281|    912|            }
  282|  1.26k|        }
  283|       |
  284|       |        /* too much imbalance, either of the following:
  285|       |         * 1. 1+ vertices have 2+ in/out
  286|       |         * 2. 2+ nodes have 1+ in/out */
  287|  2.54k|        if (incoming_excess > 1 || outgoing_excess > 1) {
  ------------------
  |  Branch (287:13): [True: 360, False: 2.18k]
  |  Branch (287:36): [True: 350, False: 1.83k]
  ------------------
  288|    710|            *has_path = false;
  289|    710|            *has_cycle = false;
  290|    710|            igraph_vector_int_destroy(&nonsingleton);
  291|    710|            igraph_vector_int_destroy(&in_degree);
  292|    710|            igraph_vector_int_destroy(&out_degree);
  293|    710|            IGRAPH_FINALLY_CLEAN(3);
  294|       |
  295|    710|            return IGRAPH_SUCCESS;
  296|    710|        }
  297|  2.54k|    }
  298|       |
  299|  1.50k|    *has_path = true;
  300|       |    /* perfect edge balance -> strong connectivity */
  301|  1.50k|    *has_cycle = (incoming_excess == 0) && (outgoing_excess == 0);
  ------------------
  |  Branch (301:18): [True: 783, False: 724]
  |  Branch (301:44): [True: 783, False: 0]
  ------------------
  302|       |    /* either way, the start was set already */
  303|       |
  304|  1.50k|    igraph_vector_int_destroy(&nonsingleton);
  305|  1.50k|    igraph_vector_int_destroy(&in_degree);
  306|  1.50k|    igraph_vector_int_destroy(&out_degree);
  307|  1.50k|    IGRAPH_FINALLY_CLEAN(3);
  308|       |
  309|  1.50k|    return IGRAPH_SUCCESS;
  310|  2.25k|}
eulerian.c:igraph_i_eulerian_path_directed:
  455|  1.14k|        igraph_int_t start_of_path) {
  456|       |
  457|  1.14k|    igraph_int_t curr;
  458|  1.14k|    igraph_int_t n, m;
  459|  1.14k|    igraph_inclist_t il;
  460|  1.14k|    igraph_stack_int_t path, tracker, edge_tracker, edge_path;
  461|  1.14k|    igraph_bitset_t visited_list;
  462|  1.14k|    igraph_vector_int_t remaining_out_edges;
  463|       |
  464|  1.14k|    n = igraph_vcount(graph);
  465|  1.14k|    m = igraph_ecount(graph);
  466|       |
  467|  1.14k|    if (edge_res) {
  ------------------
  |  Branch (467:9): [True: 1.14k, False: 0]
  ------------------
  468|  1.14k|        igraph_vector_int_clear(edge_res);
  469|  1.14k|    }
  470|       |
  471|  1.14k|    if (vertex_res) {
  ------------------
  |  Branch (471:9): [True: 1.14k, False: 0]
  ------------------
  472|  1.14k|        igraph_vector_int_clear(vertex_res);
  473|  1.14k|    }
  474|       |
  475|  1.14k|    if (m == 0 || n == 0) {
  ------------------
  |  Branch (475:9): [True: 212, False: 928]
  |  Branch (475:19): [True: 0, False: 928]
  ------------------
  476|    212|        return IGRAPH_SUCCESS;
  477|    212|    }
  478|       |
  479|    928|    IGRAPH_STACK_INT_INIT_FINALLY(&path, n);
  ------------------
  |  |   61|    928|    do { IGRAPH_CHECK(igraph_stack_int_init(s, capacity)); \
  |  |  ------------------
  |  |  |  |  656|    928|    do { \
  |  |  |  |  657|    928|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    928|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    928|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 928]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    928|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 928]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|    928|        IGRAPH_FINALLY(igraph_stack_int_destroy, s); } while (0)
  |  |  ------------------
  |  |  |  |  603|    928|    do { \
  |  |  |  |  604|    928|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    928|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    928|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    928|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 928]
  |  |  |  |  ------------------
  |  |  |  |  608|    928|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    928|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 928]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:63): [Folded, False: 928]
  |  |  ------------------
  ------------------
  480|    928|    IGRAPH_STACK_INT_INIT_FINALLY(&tracker, n);
  ------------------
  |  |   61|    928|    do { IGRAPH_CHECK(igraph_stack_int_init(s, capacity)); \
  |  |  ------------------
  |  |  |  |  656|    928|    do { \
  |  |  |  |  657|    928|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    928|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    928|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 928]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    928|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 928]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|    928|        IGRAPH_FINALLY(igraph_stack_int_destroy, s); } while (0)
  |  |  ------------------
  |  |  |  |  603|    928|    do { \
  |  |  |  |  604|    928|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    928|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    928|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    928|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 928]
  |  |  |  |  ------------------
  |  |  |  |  608|    928|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    928|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 928]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:63): [Folded, False: 928]
  |  |  ------------------
  ------------------
  481|    928|    IGRAPH_STACK_INT_INIT_FINALLY(&edge_path, n);
  ------------------
  |  |   61|    928|    do { IGRAPH_CHECK(igraph_stack_int_init(s, capacity)); \
  |  |  ------------------
  |  |  |  |  656|    928|    do { \
  |  |  |  |  657|    928|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    928|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    928|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 928]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    928|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 928]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|    928|        IGRAPH_FINALLY(igraph_stack_int_destroy, s); } while (0)
  |  |  ------------------
  |  |  |  |  603|    928|    do { \
  |  |  |  |  604|    928|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    928|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    928|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    928|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 928]
  |  |  |  |  ------------------
  |  |  |  |  608|    928|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    928|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 928]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:63): [Folded, False: 928]
  |  |  ------------------
  ------------------
  482|    928|    IGRAPH_STACK_INT_INIT_FINALLY(&edge_tracker, n);
  ------------------
  |  |   61|    928|    do { IGRAPH_CHECK(igraph_stack_int_init(s, capacity)); \
  |  |  ------------------
  |  |  |  |  656|    928|    do { \
  |  |  |  |  657|    928|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    928|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    928|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 928]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    928|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 928]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|    928|        IGRAPH_FINALLY(igraph_stack_int_destroy, s); } while (0)
  |  |  ------------------
  |  |  |  |  603|    928|    do { \
  |  |  |  |  604|    928|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    928|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    928|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    928|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 928]
  |  |  |  |  ------------------
  |  |  |  |  608|    928|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    928|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 928]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:63): [Folded, False: 928]
  |  |  ------------------
  ------------------
  483|    928|    IGRAPH_BITSET_INIT_FINALLY(&visited_list, m);
  ------------------
  |  |  265|    928|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  266|    928|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|    928|    do { \
  |  |  |  |  657|    928|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    928|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    928|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 928]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    928|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 928]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  267|    928|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|    928|    do { \
  |  |  |  |  604|    928|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    928|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    928|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    928|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 928]
  |  |  |  |  ------------------
  |  |  |  |  608|    928|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    928|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 928]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (267:62): [Folded, False: 928]
  |  |  ------------------
  ------------------
  484|       |
  485|    928|    IGRAPH_CHECK(igraph_stack_int_push(&tracker, start_of_path));
  ------------------
  |  |  656|    928|    do { \
  |  |  657|    928|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    928|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    928|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 928]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    928|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 928]
  |  |  ------------------
  ------------------
  486|       |
  487|    928|    IGRAPH_CHECK(igraph_inclist_init(graph, &il, IGRAPH_OUT, IGRAPH_LOOPS_ONCE));
  ------------------
  |  |  656|    928|    do { \
  |  |  657|    928|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    928|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    928|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 928]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    928|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 928]
  |  |  ------------------
  ------------------
  488|    928|    IGRAPH_FINALLY(igraph_inclist_destroy, &il);
  ------------------
  |  |  603|    928|    do { \
  |  |  604|    928|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    928|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    928|         * incorrect destructor function with the pointer */ \
  |  |  607|    928|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 928]
  |  |  ------------------
  |  |  608|    928|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    928|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 928]
  |  |  ------------------
  ------------------
  489|       |
  490|    928|    IGRAPH_VECTOR_INT_INIT_FINALLY(&remaining_out_edges, 0);
  ------------------
  |  |  119|    928|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    928|    do { \
  |  |  |  |  657|    928|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    928|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    928|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 928]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    928|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 928]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    928|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    928|    do { \
  |  |  |  |  604|    928|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    928|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    928|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    928|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 928]
  |  |  |  |  ------------------
  |  |  |  |  608|    928|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    928|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 928]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 928]
  |  |  ------------------
  ------------------
  491|    928|    IGRAPH_CHECK(igraph_degree(graph, &remaining_out_edges, igraph_vss_all(), IGRAPH_OUT, IGRAPH_LOOPS));
  ------------------
  |  |  656|    928|    do { \
  |  |  657|    928|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    928|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    928|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 928]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    928|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 928]
  |  |  ------------------
  ------------------
  492|       |
  493|    928|    curr = start_of_path;
  494|       |
  495|  48.8k|    while (!igraph_stack_int_empty(&tracker)) {
  ------------------
  |  Branch (495:12): [True: 47.8k, False: 928]
  ------------------
  496|       |
  497|  47.8k|        if (VECTOR(remaining_out_edges)[curr] != 0) {
  ------------------
  |  |   60|  47.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (497:13): [True: 23.4k, False: 24.4k]
  ------------------
  498|  23.4k|            igraph_vector_int_t *incedges;
  499|  23.4k|            igraph_int_t nc, edge = -1;
  500|  23.4k|            igraph_int_t j, next;
  501|  23.4k|            IGRAPH_CHECK(igraph_stack_int_push(&tracker, curr));
  ------------------
  |  |  656|  23.4k|    do { \
  |  |  657|  23.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  23.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  23.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  23.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 23.4k]
  |  |  ------------------
  ------------------
  502|       |
  503|  23.4k|            incedges = igraph_inclist_get(&il, curr);
  ------------------
  |  |  102|  23.4k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
  504|  23.4k|            nc = igraph_vector_int_size(incedges);
  505|  23.4k|            IGRAPH_ASSERT(nc > 0);
  ------------------
  |  |  924|  23.4k|    do { \
  |  |  925|  23.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  23.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  23.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 23.4k]
  |  |  ------------------
  ------------------
  506|       |
  507|   935k|            for (j = 0; j < nc; j++) {
  ------------------
  |  Branch (507:25): [True: 935k, False: 0]
  ------------------
  508|   935k|                edge = VECTOR(*incedges)[j];
  ------------------
  |  |   60|   935k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  509|   935k|                if (!IGRAPH_BIT_TEST(visited_list, edge)) {
  ------------------
  |  |  142|   935k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   935k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|   935k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   935k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|   935k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   935k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (509:21): [True: 23.4k, False: 911k]
  ------------------
  510|  23.4k|                    break;
  511|  23.4k|                }
  512|   935k|            }
  513|       |
  514|  23.4k|            next = IGRAPH_TO(graph, edge);
  ------------------
  |  |  128|  23.4k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  23.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  515|       |
  516|  23.4k|            IGRAPH_CHECK(igraph_stack_int_push(&edge_tracker, edge));
  ------------------
  |  |  656|  23.4k|    do { \
  |  |  657|  23.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  23.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  23.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  23.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 23.4k]
  |  |  ------------------
  ------------------
  517|       |
  518|       |            /* remove edge here */
  519|  23.4k|            VECTOR(remaining_out_edges)[curr]--;
  ------------------
  |  |   60|  23.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  520|  23.4k|            IGRAPH_BIT_SET(visited_list, edge);
  ------------------
  |  |  103|  23.4k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  23.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  23.4k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  23.4k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  23.4k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  23.4k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  521|       |
  522|  23.4k|            curr = next;
  523|  24.4k|        } else { /* back track to find remaining circuit */
  524|  24.4k|            igraph_int_t curr_e;
  525|  24.4k|            IGRAPH_CHECK(igraph_stack_int_push(&path, curr));
  ------------------
  |  |  656|  24.4k|    do { \
  |  |  657|  24.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  24.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  24.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 24.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  24.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 24.4k]
  |  |  ------------------
  ------------------
  526|  24.4k|            curr = igraph_stack_int_pop(&tracker);
  527|  24.4k|            if (!igraph_stack_int_empty(&edge_tracker)) {
  ------------------
  |  Branch (527:17): [True: 23.4k, False: 928]
  ------------------
  528|  23.4k|                curr_e = igraph_stack_int_pop(&edge_tracker);
  529|  23.4k|                IGRAPH_CHECK(igraph_stack_int_push(&edge_path, curr_e));
  ------------------
  |  |  656|  23.4k|    do { \
  |  |  657|  23.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  23.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  23.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  23.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 23.4k]
  |  |  ------------------
  ------------------
  530|  23.4k|            }
  531|  24.4k|        }
  532|  47.8k|    }
  533|       |
  534|    928|    if (edge_res) {
  ------------------
  |  Branch (534:9): [True: 928, False: 0]
  ------------------
  535|    928|        IGRAPH_CHECK(igraph_vector_int_reserve(edge_res, m));
  ------------------
  |  |  656|    928|    do { \
  |  |  657|    928|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    928|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    928|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 928]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    928|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 928]
  |  |  ------------------
  ------------------
  536|  24.4k|        while (!igraph_stack_int_empty(&edge_path)) {
  ------------------
  |  Branch (536:16): [True: 23.4k, False: 928]
  ------------------
  537|  23.4k|            IGRAPH_CHECK(igraph_vector_int_push_back(edge_res, igraph_stack_int_pop(&edge_path)));
  ------------------
  |  |  656|  23.4k|    do { \
  |  |  657|  23.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  23.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  23.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  23.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 23.4k]
  |  |  ------------------
  ------------------
  538|  23.4k|        }
  539|    928|    }
  540|    928|    if (vertex_res) {
  ------------------
  |  Branch (540:9): [True: 928, False: 0]
  ------------------
  541|    928|        IGRAPH_CHECK(igraph_vector_int_reserve(vertex_res, m+1));
  ------------------
  |  |  656|    928|    do { \
  |  |  657|    928|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    928|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    928|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 928]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    928|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 928]
  |  |  ------------------
  ------------------
  542|  25.3k|        while (!igraph_stack_int_empty(&path)) {
  ------------------
  |  Branch (542:16): [True: 24.4k, False: 928]
  ------------------
  543|  24.4k|            IGRAPH_CHECK(igraph_vector_int_push_back(vertex_res, igraph_stack_int_pop(&path)));
  ------------------
  |  |  656|  24.4k|    do { \
  |  |  657|  24.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  24.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  24.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 24.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  24.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 24.4k]
  |  |  ------------------
  ------------------
  544|  24.4k|        }
  545|    928|    }
  546|       |
  547|    928|    igraph_stack_int_destroy(&path);
  548|    928|    igraph_stack_int_destroy(&tracker);
  549|    928|    igraph_stack_int_destroy(&edge_path);
  550|    928|    igraph_stack_int_destroy(&edge_tracker);
  551|    928|    igraph_bitset_destroy(&visited_list);
  552|    928|    igraph_inclist_destroy(&il);
  553|    928|    igraph_vector_int_destroy(&remaining_out_edges);
  554|    928|    IGRAPH_FINALLY_CLEAN(7);
  555|       |
  556|    928|    return IGRAPH_SUCCESS;
  557|    928|}

igraph_i_distances_unweighted_cutoff:
  111|  2.00k|        igraph_real_t cutoff) {
  112|       |
  113|  2.00k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  114|  2.00k|    igraph_int_t no_of_from, no_of_to;
  115|  2.00k|    igraph_int_t *already_counted;
  116|  2.00k|    igraph_adjlist_t adjlist;
  117|  2.00k|    igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   56|  2.00k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
  118|  2.00k|    igraph_vector_int_t *neis;
  119|  2.00k|    igraph_bool_t all_to;
  120|       |
  121|  2.00k|    igraph_int_t i, j;
  122|  2.00k|    igraph_vit_t fromvit, tovit;
  123|  2.00k|    igraph_vector_int_t indexv;
  124|       |
  125|  2.00k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (125:9): [True: 0, False: 2.00k]
  |  Branch (125:31): [True: 0, False: 0]
  ------------------
  126|      0|        mode != IGRAPH_ALL) {
  ------------------
  |  Branch (126:9): [True: 0, False: 0]
  ------------------
  127|      0|        IGRAPH_ERROR("Invalid mode argument.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  128|      0|    }
  129|       |
  130|  2.00k|    IGRAPH_CHECK(igraph_vit_create(graph, from, &fromvit));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  131|  2.00k|    IGRAPH_FINALLY(igraph_vit_destroy, &fromvit);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  132|  2.00k|    no_of_from = IGRAPH_VIT_SIZE(fromvit);
  ------------------
  |  |  190|  2.00k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  133|       |
  134|  2.00k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, mode, IGRAPH_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  135|  2.00k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  136|       |
  137|  2.00k|    already_counted = IGRAPH_CALLOC(no_of_nodes, igraph_int_t);
  ------------------
  |  |   33|  2.00k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.00k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.00k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.00k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.00k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  138|  2.00k|    IGRAPH_CHECK_OOM(already_counted, "Insufficient memory for graph distance calculation.");
  ------------------
  |  |  709|  2.00k|    do { \
  |  |  710|  2.00k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  139|  2.00k|    IGRAPH_FINALLY(igraph_free, already_counted);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  140|       |
  141|  2.00k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  2.00k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.00k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  142|       |
  143|  2.00k|    all_to = igraph_vs_is_all(&to);
  144|  2.00k|    if (all_to) {
  ------------------
  |  Branch (144:9): [True: 2.00k, False: 0]
  ------------------
  145|  2.00k|        no_of_to = no_of_nodes;
  146|  2.00k|    } else {
  147|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&indexv, no_of_nodes);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  148|      0|        IGRAPH_CHECK(igraph_vit_create(graph, to, &tovit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  149|      0|        IGRAPH_FINALLY(igraph_vit_destroy, &tovit);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  150|      0|        no_of_to = IGRAPH_VIT_SIZE(tovit);
  ------------------
  |  |  190|      0|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  151|      0|        for (i = 0; !IGRAPH_VIT_END(tovit); IGRAPH_VIT_NEXT(tovit)) {
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                      for (i = 0; !IGRAPH_VIT_END(tovit); IGRAPH_VIT_NEXT(tovit)) {
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (151:21): [True: 0, False: 0]
  ------------------
  152|      0|            igraph_int_t v = IGRAPH_VIT_GET(tovit);
  ------------------
  |  |  214|      0|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  215|      0|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  153|      0|            if (VECTOR(indexv)[v]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (153:17): [True: 0, False: 0]
  ------------------
  154|      0|                IGRAPH_ERROR("Target vertex list must not have any duplicates.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  155|      0|                             IGRAPH_EINVAL);
  156|      0|            }
  157|      0|            VECTOR(indexv)[v] = ++i;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  158|      0|        }
  159|      0|    }
  160|       |
  161|  2.00k|    IGRAPH_CHECK(igraph_matrix_resize(res, no_of_from, no_of_to));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  162|  2.00k|    igraph_matrix_fill(res, IGRAPH_INFINITY);
  ------------------
  |  |  139|  2.00k|#define IGRAPH_INFINITY ((double)INFINITY)
  ------------------
  163|       |
  164|  2.00k|    for (IGRAPH_VIT_RESET(fromvit), i = 0;
  ------------------
  |  |  201|  2.00k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
  165|  4.00k|         !IGRAPH_VIT_END(fromvit);
  ------------------
  |  |  179|  4.00k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (165:10): [True: 2.00k, False: 2.00k]
  ------------------
  166|  2.00k|         IGRAPH_VIT_NEXT(fromvit), i++) {
  ------------------
  |  |  167|  2.00k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  167|  2.00k|        igraph_int_t reached = 0;
  168|  2.00k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, IGRAPH_VIT_GET(fromvit)));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  4.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 2.00k, False: 0]
  |  |  ------------------
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  169|  2.00k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, 0));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  170|  2.00k|        already_counted[ IGRAPH_VIT_GET(fromvit) ] = i + 1;
  ------------------
  |  |  214|  2.00k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 2.00k, False: 0]
  |  |  ------------------
  |  |  215|  2.00k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  171|       |
  172|  2.00k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  2.00k|    do { \
  |  |   47|  2.00k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 2.00k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  173|       |
  174|  24.0k|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (174:16): [True: 22.0k, False: 2.00k]
  ------------------
  175|  22.0k|            igraph_int_t act = igraph_dqueue_int_pop(&q);
  176|  22.0k|            igraph_int_t actdist = igraph_dqueue_int_pop(&q);
  177|       |
  178|  22.0k|            if (cutoff >= 0 && actdist > cutoff) {
  ------------------
  |  Branch (178:17): [True: 0, False: 22.0k]
  |  Branch (178:32): [True: 0, False: 0]
  ------------------
  179|      0|                continue;
  180|      0|            }
  181|       |
  182|  22.0k|            if (all_to) {
  ------------------
  |  Branch (182:17): [True: 22.0k, False: 0]
  ------------------
  183|  22.0k|                MATRIX(*res, i, act) = actdist;
  ------------------
  |  |   83|  22.0k|#define MATRIX(m,i,j) ((m).data.stor_begin[(m).nrow*(j)+(i)])
  ------------------
  184|  22.0k|            } else {
  185|      0|                if (VECTOR(indexv)[act]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (185:21): [True: 0, False: 0]
  ------------------
  186|      0|                    MATRIX(*res, i, VECTOR(indexv)[act] - 1) = actdist;
  ------------------
  |  |   83|      0|#define MATRIX(m,i,j) ((m).data.stor_begin[(m).nrow*(j)+(i)])
  ------------------
  187|      0|                    reached++;
  188|      0|                    if (reached == no_of_to) {
  ------------------
  |  Branch (188:25): [True: 0, False: 0]
  ------------------
  189|      0|                        igraph_dqueue_int_clear(&q);
  190|      0|                        break;
  191|      0|                    }
  192|      0|                }
  193|      0|            }
  194|       |
  195|  22.0k|            neis = igraph_adjlist_get(&adjlist, act);
  ------------------
  |  |   73|  22.0k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  196|  22.0k|            igraph_int_t nei_count = igraph_vector_int_size(neis);
  197|  64.0k|            for (j = 0; j < nei_count; j++) {
  ------------------
  |  Branch (197:25): [True: 42.0k, False: 22.0k]
  ------------------
  198|  42.0k|                igraph_int_t neighbor = VECTOR(*neis)[j];
  ------------------
  |  |   60|  42.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  199|  42.0k|                if (already_counted[neighbor] == i + 1) {
  ------------------
  |  Branch (199:21): [True: 22.0k, False: 20.0k]
  ------------------
  200|  22.0k|                    continue;
  201|  22.0k|                }
  202|  20.0k|                already_counted[neighbor] = i + 1;
  203|  20.0k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  20.0k|    do { \
  |  |  657|  20.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  20.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  20.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  20.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 20.0k]
  |  |  ------------------
  ------------------
  204|  20.0k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, actdist + 1));
  ------------------
  |  |  656|  20.0k|    do { \
  |  |  657|  20.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  20.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  20.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  20.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 20.0k]
  |  |  ------------------
  ------------------
  205|  20.0k|            }
  206|  22.0k|        }
  207|  2.00k|    }
  208|       |
  209|       |    /* Clean */
  210|  2.00k|    if (!all_to) {
  ------------------
  |  Branch (210:9): [True: 0, False: 2.00k]
  ------------------
  211|      0|        igraph_vit_destroy(&tovit);
  212|      0|        igraph_vector_int_destroy(&indexv);
  213|      0|        IGRAPH_FINALLY_CLEAN(2);
  214|      0|    }
  215|       |
  216|  2.00k|    IGRAPH_FREE(already_counted);
  ------------------
  |  |   36|  2.00k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  217|  2.00k|    igraph_dqueue_int_destroy(&q);
  218|  2.00k|    igraph_vit_destroy(&fromvit);
  219|  2.00k|    igraph_adjlist_destroy(&adjlist);
  220|  2.00k|    IGRAPH_FINALLY_CLEAN(4);
  221|       |
  222|  2.00k|    return IGRAPH_SUCCESS;
  223|  2.00k|}
igraph_distances:
  282|  2.00k|        igraph_neimode_t mode) {
  283|       |
  284|  2.00k|    igraph_real_t vcount_real = igraph_vcount(graph);
  285|  2.00k|    igraph_real_t ecount_real = igraph_ecount(graph);
  286|  2.00k|    igraph_real_t ecount_threshold;
  287|  2.00k|    igraph_int_t from_size;
  288|  2.00k|    igraph_bool_t negative_weights = false;
  289|       |
  290|  2.00k|    IGRAPH_CHECK(igraph_i_validate_distance_weights(graph, weights, &negative_weights));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  291|       |
  292|  2.00k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (292:9): [True: 0, False: 2.00k]
  ------------------
  293|      0|        mode = IGRAPH_ALL;
  294|      0|    }
  295|       |
  296|       |    /* Edge count threshold for using Floyd-Warshall for all-to-all case.
  297|       |     * Based on experiments, this is faster than Dijkstra for densities
  298|       |     * above 0.1, provided that the graph has more than about 50 vertices.
  299|       |     * See also https://github.com/igraph/igraph/issues/2822 */
  300|  2.00k|    ecount_threshold = vcount_real * vcount_real * 0.1;
  301|  2.00k|    if (ecount_threshold < 250) ecount_threshold = 250;
  ------------------
  |  Branch (301:9): [True: 472, False: 1.53k]
  ------------------
  302|       |
  303|  2.00k|    if (!weights) {
  ------------------
  |  Branch (303:9): [True: 2.00k, False: 0]
  ------------------
  304|       |        /* Unweighted case */
  305|  2.00k|        return igraph_i_distances_unweighted_cutoff(graph, res, from, to, mode, -1);
  306|  2.00k|    } else if (igraph_vs_is_all(&from) && ecount_real > ecount_threshold) {
  ------------------
  |  Branch (306:16): [True: 0, False: 0]
  |  Branch (306:43): [True: 0, False: 0]
  ------------------
  307|       |        /* All-to-all distances with dense graph */
  308|      0|        return igraph_distances_floyd_warshall(graph, res, from, to, weights, mode, IGRAPH_FLOYD_WARSHALL_AUTOMATIC);
  309|      0|    } else if (!negative_weights) {
  ------------------
  |  Branch (309:16): [True: 0, False: 0]
  ------------------
  310|       |        /* Non-negative weights: use Dijkstra's algorithm. */
  311|      0|        return igraph_i_distances_dijkstra_cutoff(graph, res, from, to, weights, mode, -1);
  312|      0|    } else {
  313|       |        /* Negative weights: use Bellman-Ford or Johnson's algorithm.
  314|       |         *
  315|       |         * In the undirected case we always use Bellman-Ford. Normally, a negative weight
  316|       |         * undirected edge triggers an error as it is effectively a negative cycle.
  317|       |         * However, with Bellman-Ford the negative edge might be avoided if it is
  318|       |         * not reachable from the 'from' vertices. In cotrast, Johnson will always raise
  319|       |         * an error.
  320|       |         */
  321|      0|        if (mode != IGRAPH_ALL) {
  ------------------
  |  Branch (321:13): [True: 0, False: 0]
  ------------------
  322|      0|            IGRAPH_CHECK(igraph_vs_size(graph, &from, &from_size));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  323|      0|            if (from_size > 100) {
  ------------------
  |  Branch (323:17): [True: 0, False: 0]
  ------------------
  324|      0|                return igraph_i_distances_johnson(graph, res, from, to, weights, mode);
  325|      0|            }
  326|      0|        }
  327|      0|        return igraph_i_distances_bellman_ford(graph, res, from, to, weights, mode);
  328|      0|    }
  329|  2.00k|}
igraph_get_shortest_paths:
  416|  2.00k|        igraph_vector_int_t *inbound_edges) {
  417|       |
  418|  2.00k|    igraph_bool_t negative_weights;
  419|  2.00k|    IGRAPH_CHECK(igraph_i_validate_distance_weights(graph, weights, &negative_weights));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  420|       |
  421|  2.00k|    if (weights == NULL) {
  ------------------
  |  Branch (421:9): [True: 2.00k, False: 0]
  ------------------
  422|  2.00k|        return igraph_i_get_shortest_paths_unweighted(graph, vertices, edges, from, to, mode, parents, inbound_edges);
  423|  2.00k|    } else if (!negative_weights) {
  ------------------
  |  Branch (423:16): [True: 0, False: 0]
  ------------------
  424|       |        /* Dijkstra's algorithm */
  425|      0|        return igraph_i_get_shortest_paths_dijkstra(graph, vertices, edges, from, to, weights, mode, parents, inbound_edges);
  426|      0|    } else {
  427|       |        /* Negative weights; will use Bellman-Ford algorithm */
  428|      0|        return igraph_i_get_shortest_paths_bellman_ford(graph, vertices, edges, from, to, weights, mode, parents, inbound_edges);
  429|      0|    }
  430|  2.00k|}
igraph_i_get_shortest_paths_unweighted:
  439|  2.00k|        igraph_vector_int_t *inbound_edges) {
  440|       |
  441|       |    /* TODO: use inclist_t if to is long (longer than 1?) */
  442|       |
  443|  2.00k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  444|  2.00k|    igraph_int_t *parent_eids;
  445|       |
  446|  2.00k|    igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   56|  2.00k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
  447|       |
  448|  2.00k|    igraph_int_t i, j, vsize;
  449|  2.00k|    igraph_vector_int_t tmp = IGRAPH_VECTOR_NULL;
  ------------------
  |  |   99|  2.00k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
  450|       |
  451|  2.00k|    igraph_vit_t vit;
  452|       |
  453|  2.00k|    igraph_int_t to_reach;
  454|  2.00k|    igraph_int_t reached = 0;
  455|       |
  456|  2.00k|    if (from < 0 || from >= no_of_nodes) {
  ------------------
  |  Branch (456:9): [True: 0, False: 2.00k]
  |  Branch (456:21): [True: 0, False: 2.00k]
  ------------------
  457|      0|        IGRAPH_ERROR("Index of source vertex is out of range.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  458|      0|    }
  459|  2.00k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (459:9): [True: 0, False: 2.00k]
  |  Branch (459:31): [True: 0, False: 0]
  ------------------
  460|      0|        mode != IGRAPH_ALL) {
  ------------------
  |  Branch (460:9): [True: 0, False: 0]
  ------------------
  461|      0|        IGRAPH_ERROR("Invalid mode argument.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  462|      0|    }
  463|       |
  464|  2.00k|    IGRAPH_CHECK(igraph_vit_create(graph, to, &vit));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  465|  2.00k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  466|       |
  467|  2.00k|    if (vertices) {
  ------------------
  |  Branch (467:9): [True: 2.00k, False: 0]
  ------------------
  468|  2.00k|        IGRAPH_CHECK(igraph_vector_int_list_resize(vertices, IGRAPH_VIT_SIZE(vit)));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  469|  2.00k|    }
  470|  2.00k|    if (edges) {
  ------------------
  |  Branch (470:9): [True: 2.00k, False: 0]
  ------------------
  471|  2.00k|        IGRAPH_CHECK(igraph_vector_int_list_resize(edges, IGRAPH_VIT_SIZE(vit)));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  472|  2.00k|    }
  473|       |
  474|  2.00k|    parent_eids = IGRAPH_CALLOC(no_of_nodes, igraph_int_t);
  ------------------
  |  |   33|  2.00k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.00k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.00k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.00k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.00k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  475|  2.00k|    IGRAPH_CHECK_OOM(parent_eids, "Insufficient memory for shortest path calculation.");
  ------------------
  |  |  709|  2.00k|    do { \
  |  |  710|  2.00k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  476|  2.00k|    IGRAPH_FINALLY(igraph_free, parent_eids);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  477|       |
  478|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&tmp, 0);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  479|  2.00k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  2.00k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.00k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  480|       |
  481|       |    /* Mark the vertices we need to reach */
  482|  2.00k|    to_reach = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|  2.00k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  483|   334k|    for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  201|  2.00k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  179|   334k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  167|   332k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (483:33): [True: 332k, False: 2.00k]
  ------------------
  484|   332k|        if (parent_eids[ IGRAPH_VIT_GET(vit) ] == 0) {
  ------------------
  |  |  214|   332k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 332k, False: 0]
  |  |  ------------------
  |  |  215|   332k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (484:13): [True: 332k, False: 0]
  ------------------
  485|   332k|            parent_eids[ IGRAPH_VIT_GET(vit) ] = -1;
  ------------------
  |  |  214|   332k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 332k, False: 0]
  |  |  ------------------
  |  |  215|   332k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  486|   332k|        } else {
  487|      0|            to_reach--;       /* this node was given multiple times */
  488|      0|        }
  489|   332k|    }
  490|       |
  491|       |    /* Meaning of parent_eids[i]:
  492|       |     *
  493|       |     * - If parent_eids[i] < 0, it means that vertex i has to be reached and has not
  494|       |     *   been reached yet.
  495|       |     *
  496|       |     * - If parent_eids[i] = 0, it means that vertex i does not have to be reached and
  497|       |     *   it has not been reached yet.
  498|       |     *
  499|       |     * - If parent_eids[i] = 1, it means that vertex i is the start vertex.
  500|       |     *
  501|       |     * - Otherwise, parent_eids[i] is the ID of the edge from which vertex i was
  502|       |     *   reached plus 2.
  503|       |     */
  504|       |
  505|  2.00k|    IGRAPH_CHECK(igraph_dqueue_int_push(&q, from + 1));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  506|  2.00k|    if (parent_eids[ from ] < 0) {
  ------------------
  |  Branch (506:9): [True: 2.00k, False: 0]
  ------------------
  507|  2.00k|        reached++;
  508|  2.00k|    }
  509|  2.00k|    parent_eids[ from ] = 1;
  510|       |
  511|  23.7k|    while (!igraph_dqueue_int_empty(&q) && reached < to_reach) {
  ------------------
  |  Branch (511:12): [True: 21.9k, False: 1.82k]
  |  Branch (511:44): [True: 21.7k, False: 177]
  ------------------
  512|  21.7k|        igraph_int_t act = igraph_dqueue_int_pop(&q) - 1;
  513|       |
  514|  21.7k|        IGRAPH_CHECK(igraph_incident(graph, &tmp, act, mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  21.7k|    do { \
  |  |  657|  21.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  21.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  21.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 21.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  21.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 21.7k]
  |  |  ------------------
  ------------------
  515|  21.7k|        vsize = igraph_vector_int_size(&tmp);
  516|  61.7k|        for (j = 0; j < vsize; j++) {
  ------------------
  |  Branch (516:21): [True: 39.9k, False: 21.7k]
  ------------------
  517|  39.9k|            igraph_int_t edge = VECTOR(tmp)[j];
  ------------------
  |  |   60|  39.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  518|  39.9k|            igraph_int_t neighbor = IGRAPH_OTHER(graph, edge, act);
  ------------------
  |  |  146|  39.9k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  39.9k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  39.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  8.62k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  8.62k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  31.3k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  31.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 8.62k, False: 31.3k]
  |  |  ------------------
  ------------------
  519|  39.9k|            if (parent_eids[neighbor] > 0) {
  ------------------
  |  Branch (519:17): [True: 19.9k, False: 20.0k]
  ------------------
  520|  19.9k|                continue;
  521|  20.0k|            } else if (parent_eids[neighbor] < 0) {
  ------------------
  |  Branch (521:24): [True: 20.0k, False: 0]
  ------------------
  522|  20.0k|                reached++;
  523|  20.0k|            }
  524|  20.0k|            parent_eids[neighbor] = edge + 2;
  525|  20.0k|            IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor + 1));
  ------------------
  |  |  656|  20.0k|    do { \
  |  |  657|  20.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  20.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  20.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  20.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 20.0k]
  |  |  ------------------
  ------------------
  526|  20.0k|        }
  527|  21.7k|    }
  528|       |
  529|  2.00k|    if (reached < to_reach) {
  ------------------
  |  Branch (529:9): [True: 1.82k, False: 177]
  ------------------
  530|  1.82k|        IGRAPH_WARNING("Couldn't reach some vertices.");
  ------------------
  |  |  797|  1.82k|    do { \
  |  |  798|  1.82k|        igraph_warning(reason, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  799|  1.82k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (799:14): [Folded, False: 1.82k]
  |  |  ------------------
  ------------------
  531|  1.82k|    }
  532|       |
  533|       |    /* Create `parents' if needed */
  534|  2.00k|    if (parents) {
  ------------------
  |  Branch (534:9): [True: 2.00k, False: 0]
  ------------------
  535|  2.00k|        IGRAPH_CHECK(igraph_vector_int_resize(parents, no_of_nodes));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  536|       |
  537|   334k|        for (i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (537:21): [True: 332k, False: 2.00k]
  ------------------
  538|   332k|            if (parent_eids[i] <= 0) {
  ------------------
  |  Branch (538:17): [True: 310k, False: 22.0k]
  ------------------
  539|       |                /* i was not reached */
  540|   310k|                VECTOR(*parents)[i] = -2;
  ------------------
  |  |   60|   310k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  541|   310k|            } else if (parent_eids[i] == 1) {
  ------------------
  |  Branch (541:24): [True: 2.00k, False: 20.0k]
  ------------------
  542|       |                /* i is the start vertex */
  543|  2.00k|                VECTOR(*parents)[i] = -1;
  ------------------
  |  |   60|  2.00k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  544|  20.0k|            } else {
  545|       |                /* i was reached via the edge with ID = parent_eids[i] - 2 */
  546|  20.0k|                VECTOR(*parents)[i] = IGRAPH_OTHER(graph, parent_eids[i] - 2, i);
  ------------------
  |  |   60|  20.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*parents)[i] = IGRAPH_OTHER(graph, parent_eids[i] - 2, i);
  ------------------
  |  |  146|  20.0k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  20.0k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  20.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  20.0k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  20.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 20.0k, False: 0]
  |  |  ------------------
  ------------------
  547|  20.0k|            }
  548|   332k|        }
  549|  2.00k|    }
  550|       |
  551|       |    /* Create `inbound_edges' if needed */
  552|  2.00k|    if (inbound_edges) {
  ------------------
  |  Branch (552:9): [True: 2.00k, False: 0]
  ------------------
  553|  2.00k|        IGRAPH_CHECK(igraph_vector_int_resize(inbound_edges, no_of_nodes));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  554|       |
  555|   334k|        for (i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (555:21): [True: 332k, False: 2.00k]
  ------------------
  556|   332k|            if (parent_eids[i] <= 1) {
  ------------------
  |  Branch (556:17): [True: 312k, False: 20.0k]
  ------------------
  557|       |                /* i was not reached or i is the start vertex */
  558|   312k|                VECTOR(*inbound_edges)[i] = -1;
  ------------------
  |  |   60|   312k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  559|   312k|            } else {
  560|       |                /* i was reached via the edge with ID = parent_eids[i] - 2 */
  561|  20.0k|                VECTOR(*inbound_edges)[i] = parent_eids[i] - 2;
  ------------------
  |  |   60|  20.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  562|  20.0k|            }
  563|   332k|        }
  564|  2.00k|    }
  565|       |
  566|       |    /* Create `vertices' and `edges' if needed */
  567|  2.00k|    if (vertices || edges) {
  ------------------
  |  Branch (567:9): [True: 2.00k, False: 0]
  |  Branch (567:21): [True: 0, False: 0]
  ------------------
  568|  2.00k|        for (IGRAPH_VIT_RESET(vit), j = 0;
  ------------------
  |  |  201|  2.00k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
  569|   334k|             !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|   334k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (569:14): [True: 332k, False: 2.00k]
  ------------------
  570|   332k|             IGRAPH_VIT_NEXT(vit), j++) {
  ------------------
  |  |  167|   332k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  571|   332k|            igraph_int_t node = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|   332k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 332k, False: 0]
  |  |  ------------------
  |  |  215|   332k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  572|   332k|            igraph_vector_int_t *vvec = 0, *evec = 0;
  573|   332k|            if (vertices) {
  ------------------
  |  Branch (573:17): [True: 332k, False: 0]
  ------------------
  574|   332k|                vvec = igraph_vector_int_list_get_ptr(vertices, j);
  575|   332k|                igraph_vector_int_clear(vvec);
  576|   332k|            }
  577|   332k|            if (edges) {
  ------------------
  |  Branch (577:17): [True: 332k, False: 0]
  ------------------
  578|   332k|                evec = igraph_vector_int_list_get_ptr(edges, j);
  579|   332k|                igraph_vector_int_clear(evec);
  580|   332k|            }
  581|       |
  582|   332k|            IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   332k|    do { \
  |  |   47|   332k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 332k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   332k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 332k]
  |  |  ------------------
  ------------------
  583|       |
  584|   332k|            if (parent_eids[node] > 0) {
  ------------------
  |  Branch (584:17): [True: 22.0k, False: 310k]
  ------------------
  585|  22.0k|                igraph_int_t act = node;
  586|  22.0k|                igraph_int_t size = 0;
  587|  22.0k|                igraph_int_t edge;
  588|   325k|                while (parent_eids[act] > 1) {
  ------------------
  |  Branch (588:24): [True: 303k, False: 22.0k]
  ------------------
  589|   303k|                    size++;
  590|   303k|                    edge = parent_eids[act] - 2;
  591|   303k|                    act = IGRAPH_OTHER(graph, edge, act);
  ------------------
  |  |  146|   303k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   303k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   303k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|   303k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   303k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 303k, False: 0]
  |  |  ------------------
  ------------------
  592|   303k|                }
  593|  22.0k|                if (vvec) {
  ------------------
  |  Branch (593:21): [True: 22.0k, False: 0]
  ------------------
  594|  22.0k|                    IGRAPH_CHECK(igraph_vector_int_resize(vvec, size + 1));
  ------------------
  |  |  656|  22.0k|    do { \
  |  |  657|  22.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  22.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  22.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 22.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  22.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  595|  22.0k|                    VECTOR(*vvec)[size] = node;
  ------------------
  |  |   60|  22.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  596|  22.0k|                }
  597|  22.0k|                if (evec) {
  ------------------
  |  Branch (597:21): [True: 22.0k, False: 0]
  ------------------
  598|  22.0k|                    IGRAPH_CHECK(igraph_vector_int_resize(evec, size));
  ------------------
  |  |  656|  22.0k|    do { \
  |  |  657|  22.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  22.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  22.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 22.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  22.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  599|  22.0k|                }
  600|  22.0k|                act = node;
  601|   325k|                while (parent_eids[act] > 1) {
  ------------------
  |  Branch (601:24): [True: 303k, False: 22.0k]
  ------------------
  602|   303k|                    size--;
  603|   303k|                    edge = parent_eids[act] - 2;
  604|   303k|                    act = IGRAPH_OTHER(graph, edge, act);
  ------------------
  |  |  146|   303k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   303k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   303k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|   303k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   303k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 303k, False: 0]
  |  |  ------------------
  ------------------
  605|   303k|                    if (vvec) {
  ------------------
  |  Branch (605:25): [True: 303k, False: 0]
  ------------------
  606|   303k|                        VECTOR(*vvec)[size] = act;
  ------------------
  |  |   60|   303k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  607|   303k|                    }
  608|   303k|                    if (evec) {
  ------------------
  |  Branch (608:25): [True: 303k, False: 0]
  ------------------
  609|   303k|                        VECTOR(*evec)[size] = edge;
  ------------------
  |  |   60|   303k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  610|   303k|                    }
  611|   303k|                }
  612|  22.0k|            }
  613|   332k|        }
  614|  2.00k|    }
  615|       |
  616|       |    /* Clean */
  617|  2.00k|    IGRAPH_FREE(parent_eids);
  ------------------
  |  |   36|  2.00k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  618|  2.00k|    igraph_dqueue_int_destroy(&q);
  619|  2.00k|    igraph_vector_int_destroy(&tmp);
  620|  2.00k|    igraph_vit_destroy(&vit);
  621|  2.00k|    IGRAPH_FINALLY_CLEAN(4);
  622|       |
  623|  2.00k|    return IGRAPH_SUCCESS;
  624|  2.00k|}

igraph_mean_degree:
  133|  2.00k|                                  igraph_bool_t loops) {
  134|       |
  135|  2.00k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  136|  2.00k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  137|  2.00k|    igraph_bool_t directed = igraph_is_directed(graph);
  138|       |
  139|  2.00k|    if (no_of_nodes == 0) {
  ------------------
  |  Branch (139:9): [True: 1, False: 2.00k]
  ------------------
  140|      1|        *res = IGRAPH_NAN;
  ------------------
  |  |  140|      1|#define IGRAPH_NAN ((double)NAN)
  ------------------
  141|      1|        return IGRAPH_SUCCESS;
  142|      1|    }
  143|       |
  144|  2.00k|    if (! loops) {
  ------------------
  |  Branch (144:9): [True: 2.00k, False: 0]
  ------------------
  145|  2.00k|        igraph_int_t loop_count;
  146|  2.00k|        IGRAPH_CHECK(igraph_count_loops(graph, &loop_count));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  147|  2.00k|        no_of_edges -= loop_count;
  148|  2.00k|    }
  149|       |
  150|  2.00k|    *res = (directed ? 1.0 : 2.0) * (igraph_real_t) no_of_edges / (igraph_real_t) no_of_nodes;
  ------------------
  |  Branch (150:13): [True: 2.00k, False: 0]
  ------------------
  151|       |
  152|  2.00k|    return IGRAPH_SUCCESS;
  153|  2.00k|}
igraph_reciprocity:
  328|  2.00k|                       igraph_reciprocity_t mode) {
  329|       |
  330|  2.00k|    igraph_int_t nonrec = 0, rec = 0, loops = 0;
  331|  2.00k|    igraph_vector_int_t inneis, outneis;
  332|  2.00k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  333|       |
  334|  2.00k|    if (mode != IGRAPH_RECIPROCITY_DEFAULT &&
  ------------------
  |  Branch (334:9): [True: 0, False: 2.00k]
  ------------------
  335|      0|        mode != IGRAPH_RECIPROCITY_RATIO) {
  ------------------
  |  Branch (335:9): [True: 0, False: 0]
  ------------------
  336|      0|        IGRAPH_ERROR("Invalid reciprocity type.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  337|      0|    }
  338|       |
  339|       |    /* Undirected graphs have reciprocity 1.0 by definition. */
  340|  2.00k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (340:9): [True: 0, False: 2.00k]
  ------------------
  341|      0|        *res = 1.0;
  342|      0|        return IGRAPH_SUCCESS;
  343|      0|    }
  344|       |
  345|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&inneis, 0);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  346|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&outneis, 0);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  347|       |
  348|   334k|    for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (348:30): [True: 332k, False: 2.00k]
  ------------------
  349|   332k|        igraph_int_t ip, op, indeg, outdeg;
  350|   332k|        IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|   332k|    do { \
  |  |  657|   332k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   332k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   332k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 332k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   332k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 332k]
  |  |  ------------------
  ------------------
  351|   332k|            graph, &inneis, i, IGRAPH_IN, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE
  352|   332k|        ));
  353|   332k|        IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|   332k|    do { \
  |  |  657|   332k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   332k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   332k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 332k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   332k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 332k]
  |  |  ------------------
  ------------------
  354|   332k|            graph, &outneis, i, IGRAPH_OUT, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE
  355|   332k|        ));
  356|       |
  357|   332k|        indeg = igraph_vector_int_size(&inneis);
  358|   332k|        outdeg = igraph_vector_int_size(&outneis);
  359|       |
  360|   332k|        ip = op = 0;
  361|   391k|        while (ip < indeg && op < outdeg) {
  ------------------
  |  Branch (361:16): [True: 81.6k, False: 309k]
  |  Branch (361:30): [True: 58.4k, False: 23.1k]
  ------------------
  362|  58.4k|            if (VECTOR(inneis)[ip] < VECTOR(outneis)[op]) {
  ------------------
  |  |   60|  58.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (VECTOR(inneis)[ip] < VECTOR(outneis)[op]) {
  ------------------
  |  |   60|  58.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (362:17): [True: 19.2k, False: 39.1k]
  ------------------
  363|  19.2k|                nonrec += 1;
  364|  19.2k|                ip++;
  365|  39.1k|            } else if (VECTOR(inneis)[ip] > VECTOR(outneis)[op]) {
  ------------------
  |  |   60|  39.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          } else if (VECTOR(inneis)[ip] > VECTOR(outneis)[op]) {
  ------------------
  |  |   60|  39.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (365:24): [True: 18.6k, False: 20.4k]
  ------------------
  366|  18.6k|                nonrec += 1;
  367|  18.6k|                op++;
  368|  20.4k|            } else {
  369|       |
  370|       |                /* loop edge? */
  371|  20.4k|                if (VECTOR(inneis)[ip] == i) {
  ------------------
  |  |   60|  20.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (371:21): [True: 12.7k, False: 7.77k]
  ------------------
  372|  12.7k|                    loops += 1;
  373|  12.7k|                    if (!ignore_loops) {
  ------------------
  |  Branch (373:25): [True: 0, False: 12.7k]
  ------------------
  374|      0|                        rec += 1;
  375|      0|                    }
  376|  12.7k|                } else {
  377|  7.77k|                    rec += 1;
  378|  7.77k|                }
  379|       |
  380|  20.4k|                ip++;
  381|  20.4k|                op++;
  382|  20.4k|            }
  383|  58.4k|        }
  384|   332k|        nonrec += (indeg - ip) + (outdeg - op);
  385|   332k|    }
  386|       |
  387|       |    /* If we found non-loop mutual connections, we can set the cache. */
  388|  2.00k|    if (rec - (ignore_loops ? 0 : loops) > 0) {
  ------------------
  |  Branch (388:9): [True: 488, False: 1.51k]
  |  Branch (388:16): [True: 2.00k, False: 0]
  ------------------
  389|    488|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_MUTUAL, true);
  390|    488|    }
  391|       |
  392|  2.00k|    if (mode == IGRAPH_RECIPROCITY_DEFAULT) {
  ------------------
  |  Branch (392:9): [True: 2.00k, False: 0]
  ------------------
  393|  2.00k|        if (ignore_loops) {
  ------------------
  |  Branch (393:13): [True: 2.00k, False: 0]
  ------------------
  394|  2.00k|            *res = (igraph_real_t) rec / (igraph_ecount(graph) - loops);
  395|  2.00k|        } else {
  396|      0|            *res = (igraph_real_t) rec / (igraph_ecount(graph));
  397|      0|        }
  398|  2.00k|    } else if (mode == IGRAPH_RECIPROCITY_RATIO) {
  ------------------
  |  Branch (398:16): [True: 0, False: 0]
  ------------------
  399|      0|        *res = (igraph_real_t) rec / (rec + nonrec);
  400|      0|    }
  401|       |
  402|  2.00k|    igraph_vector_int_destroy(&inneis);
  403|  2.00k|    igraph_vector_int_destroy(&outneis);
  404|  2.00k|    IGRAPH_FINALLY_CLEAN(2);
  405|       |
  406|  2.00k|    return IGRAPH_SUCCESS;
  407|  2.00k|}

igraph_topological_sorting:
   55|    718|        const igraph_t* graph, igraph_vector_int_t *res, igraph_neimode_t mode) {
   56|       |
   57|       |    /* Note: This function ignores self-loops, there it cannot
   58|       |     * use the IGRAPH_PROP_IS_DAG property cache entry. */
   59|       |
   60|    718|    igraph_int_t no_of_nodes = igraph_vcount(graph);
   61|    718|    igraph_vector_int_t degrees;
   62|    718|    igraph_vector_int_t neis;
   63|    718|    igraph_dqueue_int_t sources;
   64|    718|    igraph_neimode_t deg_mode;
   65|    718|    igraph_int_t node, i, j;
   66|       |
   67|    718|    if (mode == IGRAPH_ALL || !igraph_is_directed(graph)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 718]
  |  Branch (67:31): [True: 0, False: 718]
  ------------------
   68|      0|        IGRAPH_ERROR("Topological sorting does not make sense for undirected graphs.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   69|      0|                     IGRAPH_EINVAL);
   70|    718|    } else if (mode == IGRAPH_OUT) {
  ------------------
  |  Branch (70:16): [True: 718, False: 0]
  ------------------
   71|    718|        deg_mode = IGRAPH_IN;
   72|    718|    } else if (mode == IGRAPH_IN) {
  ------------------
  |  Branch (72:16): [True: 0, False: 0]
  ------------------
   73|      0|        deg_mode = IGRAPH_OUT;
   74|      0|    } else {
   75|      0|        IGRAPH_ERROR("Invalid mode for topological sorting.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   76|      0|    }
   77|       |
   78|    718|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  119|    718|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    718|    do { \
  |  |  |  |  657|    718|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    718|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    718|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 718]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    718|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 718]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    718|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    718|    do { \
  |  |  |  |  604|    718|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    718|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    718|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    718|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 718]
  |  |  |  |  ------------------
  |  |  |  |  608|    718|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    718|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 718]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 718]
  |  |  ------------------
  ------------------
   79|    718|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  119|    718|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    718|    do { \
  |  |  |  |  657|    718|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    718|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    718|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 718]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    718|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 718]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    718|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    718|    do { \
  |  |  |  |  604|    718|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    718|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    718|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    718|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 718]
  |  |  |  |  ------------------
  |  |  |  |  608|    718|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    718|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 718]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 718]
  |  |  ------------------
  ------------------
   80|    718|    IGRAPH_CHECK(igraph_dqueue_int_init(&sources, 0));
  ------------------
  |  |  656|    718|    do { \
  |  |  657|    718|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    718|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    718|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 718]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    718|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 718]
  |  |  ------------------
  ------------------
   81|    718|    IGRAPH_FINALLY(igraph_dqueue_int_destroy, &sources);
  ------------------
  |  |  603|    718|    do { \
  |  |  604|    718|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    718|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    718|         * incorrect destructor function with the pointer */ \
  |  |  607|    718|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 718]
  |  |  ------------------
  |  |  608|    718|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    718|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 718]
  |  |  ------------------
  ------------------
   82|    718|    IGRAPH_CHECK(igraph_degree(graph, &degrees, igraph_vss_all(), deg_mode, IGRAPH_NO_LOOPS));
  ------------------
  |  |  656|    718|    do { \
  |  |  657|    718|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    718|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    718|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 718]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    718|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 718]
  |  |  ------------------
  ------------------
   83|       |
   84|    718|    igraph_vector_int_clear(res);
   85|       |
   86|       |    /* Do we have nodes with no incoming vertices? */
   87|   121k|    for (i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (87:17): [True: 121k, False: 718]
  ------------------
   88|   121k|        if (VECTOR(degrees)[i] == 0) {
  ------------------
  |  |   60|   121k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (88:13): [True: 113k, False: 7.60k]
  ------------------
   89|   113k|            IGRAPH_CHECK(igraph_dqueue_int_push(&sources, i));
  ------------------
  |  |  656|   113k|    do { \
  |  |  657|   113k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   113k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   113k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 113k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   113k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 113k]
  |  |  ------------------
  ------------------
   90|   113k|        }
   91|   121k|    }
   92|       |
   93|       |    /* Take all nodes with no incoming vertices and remove them */
   94|   121k|    while (!igraph_dqueue_int_empty(&sources)) {
  ------------------
  |  Branch (94:12): [True: 121k, False: 718]
  ------------------
   95|   121k|        node = igraph_dqueue_int_pop(&sources);
   96|       |        /* Add the node to the result vector */
   97|   121k|        IGRAPH_CHECK(igraph_vector_int_push_back(res, node));
  ------------------
  |  |  656|   121k|    do { \
  |  |  657|   121k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   121k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   121k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 121k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   121k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 121k]
  |  |  ------------------
  ------------------
   98|       |        /* Exclude the node from further source searches */
   99|   121k|        VECTOR(degrees)[node] = -1;
  ------------------
  |  |   60|   121k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  100|       |        /* Get the neighbors and decrease their degrees by one */
  101|   121k|        IGRAPH_CHECK(igraph_neighbors(graph, &neis, node, mode, IGRAPH_NO_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|   121k|    do { \
  |  |  657|   121k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   121k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   121k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 121k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   121k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 121k]
  |  |  ------------------
  ------------------
  102|   121k|        j = igraph_vector_int_size(&neis);
  103|   133k|        for (i = 0; i < j; i++) {
  ------------------
  |  Branch (103:21): [True: 12.8k, False: 121k]
  ------------------
  104|  12.8k|            VECTOR(degrees)[ VECTOR(neis)[i] ]--;
  ------------------
  |  |   60|  12.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(degrees)[ VECTOR(neis)[i] ]--;
  ------------------
  |  |   60|  12.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  105|  12.8k|            if (VECTOR(degrees)[ VECTOR(neis)[i] ] == 0) {
  ------------------
  |  |   60|  12.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (VECTOR(degrees)[ VECTOR(neis)[i] ] == 0) {
  ------------------
  |  |   60|  12.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (105:17): [True: 7.60k, False: 5.20k]
  ------------------
  106|  7.60k|                IGRAPH_CHECK(igraph_dqueue_int_push(&sources, VECTOR(neis)[i]));
  ------------------
  |  |  656|  7.60k|    do { \
  |  |  657|  7.60k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  7.60k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  7.60k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.60k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  7.60k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 7.60k]
  |  |  ------------------
  ------------------
  107|  7.60k|            }
  108|  12.8k|        }
  109|   121k|    }
  110|       |
  111|    718|    igraph_vector_int_destroy(&degrees);
  112|    718|    igraph_vector_int_destroy(&neis);
  113|    718|    igraph_dqueue_int_destroy(&sources);
  114|    718|    IGRAPH_FINALLY_CLEAN(3);
  115|       |
  116|    718|    if (igraph_vector_int_size(res) < no_of_nodes) {
  ------------------
  |  Branch (116:9): [True: 0, False: 718]
  ------------------
  117|      0|        IGRAPH_ERROR("The graph has cycles; "
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  118|      0|                     "topological sorting is only possible in acyclic graphs.",
  119|      0|                     IGRAPH_EINVAL);
  120|      0|    }
  121|       |
  122|    718|    return IGRAPH_SUCCESS;
  123|    718|}
igraph_is_dag:
  151|  2.00k|igraph_error_t igraph_is_dag(const igraph_t* graph, igraph_bool_t *res) {
  152|  2.00k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  153|  2.00k|    igraph_vector_int_t degrees;
  154|  2.00k|    igraph_vector_int_t neis;
  155|  2.00k|    igraph_dqueue_int_t sources;
  156|       |
  157|  2.00k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (157:9): [True: 0, False: 2.00k]
  ------------------
  158|      0|        *res = false;
  159|      0|        return IGRAPH_SUCCESS;
  160|      0|    }
  161|       |
  162|  2.00k|    IGRAPH_RETURN_IF_CACHED_BOOL(graph, IGRAPH_PROP_IS_DAG, res);
  ------------------
  |  |   97|  2.00k|    do { \
  |  |   98|  2.00k|        if (igraph_i_property_cache_has((graphptr), (prop))) { \
  |  |  ------------------
  |  |  |  Branch (98:13): [True: 718, False: 1.28k]
  |  |  ------------------
  |  |   99|    718|            *(resptr) = igraph_i_property_cache_get_bool((graphptr), (prop)); \
  |  |  100|    718|            return IGRAPH_SUCCESS; \
  |  |  101|    718|        } \
  |  |  102|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (102:14): [Folded, False: 1.28k]
  |  |  ------------------
  ------------------
  163|       |
  164|  1.28k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  119|  1.28k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.28k|    do { \
  |  |  |  |  657|  1.28k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.28k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.28k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.28k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.28k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.28k|    do { \
  |  |  |  |  604|  1.28k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.28k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.28k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.28k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.28k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.28k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.28k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.28k]
  |  |  ------------------
  ------------------
  165|  1.28k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  119|  1.28k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.28k|    do { \
  |  |  |  |  657|  1.28k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.28k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.28k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.28k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.28k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.28k|    do { \
  |  |  |  |  604|  1.28k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.28k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.28k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.28k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.28k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.28k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.28k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.28k]
  |  |  ------------------
  ------------------
  166|  1.28k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&sources, 0);
  ------------------
  |  |   61|  1.28k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  1.28k|    do { \
  |  |  |  |  657|  1.28k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.28k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.28k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.28k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  1.28k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.28k|    do { \
  |  |  |  |  604|  1.28k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.28k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.28k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.28k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.28k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.28k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.28k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 1.28k]
  |  |  ------------------
  ------------------
  167|       |
  168|  1.28k|    IGRAPH_CHECK(igraph_degree(graph, &degrees, igraph_vss_all(), IGRAPH_IN, IGRAPH_LOOPS));
  ------------------
  |  |  656|  1.28k|    do { \
  |  |  657|  1.28k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.28k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.28k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.28k]
  |  |  ------------------
  ------------------
  169|       |
  170|  1.28k|    igraph_int_t vertices_left = no_of_nodes;
  171|       |
  172|       |    /* Do we have nodes with no incoming edges? */
  173|   212k|    for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (173:30): [True: 211k, False: 1.28k]
  ------------------
  174|   211k|        if (VECTOR(degrees)[i] == 0) {
  ------------------
  |  |   60|   211k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (174:13): [True: 181k, False: 30.2k]
  ------------------
  175|   181k|            IGRAPH_CHECK(igraph_dqueue_int_push(&sources, i));
  ------------------
  |  |  656|   181k|    do { \
  |  |  657|   181k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   181k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   181k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 181k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   181k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 181k]
  |  |  ------------------
  ------------------
  176|   181k|        }
  177|   211k|    }
  178|       |
  179|       |    /* Take all nodes with no incoming edges and remove them */
  180|   185k|    while (!igraph_dqueue_int_empty(&sources)) {
  ------------------
  |  Branch (180:12): [True: 184k, False: 1.28k]
  ------------------
  181|   184k|        igraph_int_t node = igraph_dqueue_int_pop(&sources);
  182|       |        /* Exclude the node from further source searches */
  183|   184k|        VECTOR(degrees)[node] = -1;
  ------------------
  |  |   60|   184k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  184|   184k|        vertices_left--;
  185|       |        /* Get the neighbors and decrease their degrees by one */
  186|   184k|        IGRAPH_CHECK(igraph_neighbors(graph, &neis, node, IGRAPH_OUT, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|   184k|    do { \
  |  |  657|   184k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   184k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   184k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 184k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   184k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 184k]
  |  |  ------------------
  ------------------
  187|   184k|        igraph_int_t n = igraph_vector_int_size(&neis);
  188|   193k|        for (igraph_int_t i = 0; i < n; i++) {
  ------------------
  |  Branch (188:34): [True: 9.45k, False: 184k]
  ------------------
  189|  9.45k|            igraph_int_t nei = VECTOR(neis)[i];
  ------------------
  |  |   60|  9.45k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  190|  9.45k|            if (nei == node) {
  ------------------
  |  Branch (190:17): [True: 0, False: 9.45k]
  ------------------
  191|       |                /* Found a self-loop, graph is not a DAG */
  192|      0|                *res = false;
  193|      0|                goto finalize;
  194|      0|            }
  195|  9.45k|            VECTOR(degrees)[nei]--;
  ------------------
  |  |   60|  9.45k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  196|  9.45k|            if (VECTOR(degrees)[nei] == 0) {
  ------------------
  |  |   60|  9.45k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (196:17): [True: 3.12k, False: 6.33k]
  ------------------
  197|  3.12k|                IGRAPH_CHECK(igraph_dqueue_int_push(&sources, nei));
  ------------------
  |  |  656|  3.12k|    do { \
  |  |  657|  3.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  3.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  3.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  3.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 3.12k]
  |  |  ------------------
  ------------------
  198|  3.12k|            }
  199|  9.45k|        }
  200|   184k|    }
  201|       |
  202|  1.28k|    IGRAPH_ASSERT(vertices_left >= 0);
  ------------------
  |  |  924|  1.28k|    do { \
  |  |  925|  1.28k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.28k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.28k]
  |  |  ------------------
  ------------------
  203|  1.28k|    *res = (vertices_left == 0);
  204|       |
  205|  1.28k|finalize:
  206|  1.28k|    igraph_vector_int_destroy(&degrees);
  207|  1.28k|    igraph_vector_int_destroy(&neis);
  208|  1.28k|    igraph_dqueue_int_destroy(&sources);
  209|  1.28k|    IGRAPH_FINALLY_CLEAN(3);
  210|       |
  211|  1.28k|    igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_DAG, *res);
  212|       |
  213|  1.28k|    return IGRAPH_SUCCESS;
  214|  1.28k|}

igraph_maxdegree:
   59|  2.00k|) {
   60|       |
   61|  2.00k|    igraph_vector_int_t tmp;
   62|       |
   63|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&tmp, 0);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   64|       |
   65|  2.00k|    IGRAPH_CHECK(igraph_degree(graph, &tmp, vids, mode, loops));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   66|  2.00k|    if (igraph_vector_int_size(&tmp) == 0) {
  ------------------
  |  Branch (66:9): [True: 1, False: 2.00k]
  ------------------
   67|      1|        *res = 0;
   68|  2.00k|    } else {
   69|  2.00k|        *res = igraph_vector_int_max(&tmp);
   70|  2.00k|    }
   71|       |
   72|  2.00k|    igraph_vector_int_destroy(&tmp);
   73|  2.00k|    IGRAPH_FINALLY_CLEAN(1);
   74|       |
   75|  2.00k|    return IGRAPH_SUCCESS;
   76|  2.00k|}
igraph_strength:
  637|  4.00k|) {
  638|       |
  639|  4.00k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  640|  4.00k|    igraph_vit_t vit;
  641|  4.00k|    igraph_int_t no_vids;
  642|  4.00k|    igraph_vector_int_t degrees;
  643|  4.00k|    igraph_vector_int_t neis;
  644|       |
  645|  4.00k|    if (! weights) {
  ------------------
  |  Branch (645:9): [True: 4.00k, False: 0]
  ------------------
  646|  4.00k|        IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, 0);
  ------------------
  |  |  119|  4.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  4.00k|    do { \
  |  |  |  |  657|  4.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  4.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.00k|    do { \
  |  |  |  |  604|  4.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
  647|  4.00k|        IGRAPH_CHECK(igraph_degree(graph, &degrees, vids, mode, loops));
  ------------------
  |  |  656|  4.00k|    do { \
  |  |  657|  4.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
  648|  4.00k|        no_vids = igraph_vector_int_size(&degrees);
  649|  4.00k|        IGRAPH_CHECK(igraph_vector_resize(res, no_vids));
  ------------------
  |  |  656|  4.00k|    do { \
  |  |  657|  4.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
  650|   669k|        for (igraph_int_t i = 0; i < no_vids; i++) {
  ------------------
  |  Branch (650:34): [True: 665k, False: 4.00k]
  ------------------
  651|   665k|            VECTOR(*res)[i] = VECTOR(degrees)[i];
  ------------------
  |  |   60|   665k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[i] = VECTOR(degrees)[i];
  ------------------
  |  |   60|   665k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  652|   665k|        }
  653|  4.00k|        igraph_vector_int_destroy(&degrees);
  654|  4.00k|        IGRAPH_FINALLY_CLEAN(1);
  655|  4.00k|        return IGRAPH_SUCCESS;
  656|  4.00k|    }
  657|       |
  658|      0|    if (igraph_vector_size(weights) != igraph_ecount(graph)) {
  ------------------
  |  Branch (658:9): [True: 0, False: 0]
  ------------------
  659|      0|        IGRAPH_ERROR("Invalid weight vector length.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  660|      0|    }
  661|       |
  662|      0|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (662:9): [True: 0, False: 0]
  |  Branch (662:31): [True: 0, False: 0]
  |  Branch (662:52): [True: 0, False: 0]
  ------------------
  663|      0|        IGRAPH_ERROR("Invalid mode for vertex strength calculation.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  664|      0|    }
  665|       |
  666|      0|    if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (666:9): [True: 0, False: 0]
  ------------------
  667|      0|        return strength_all(graph, res, mode, loops, weights);
  668|      0|    }
  669|       |
  670|      0|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  671|      0|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  672|      0|    no_vids = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|      0|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  673|       |
  674|      0|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  675|      0|    IGRAPH_CHECK(igraph_vector_int_reserve(&neis, no_of_nodes));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  676|      0|    IGRAPH_CHECK(igraph_vector_resize(res, no_vids));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  677|      0|    igraph_vector_null(res);
  678|       |
  679|      0|    for (igraph_int_t i = 0; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (igraph_int_t i = 0; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (679:30): [True: 0, False: 0]
  ------------------
  680|      0|        IGRAPH_CHECK(igraph_incident(graph, &neis, IGRAPH_VIT_GET(vit), mode, loops));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 0, False: 0]
  |  |  ------------------
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  681|      0|        const igraph_int_t n = igraph_vector_int_size(&neis);
  682|      0|        for (igraph_int_t j = 0; j < n; j++) {
  ------------------
  |  Branch (682:34): [True: 0, False: 0]
  ------------------
  683|      0|            igraph_int_t edge = VECTOR(neis)[j];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  684|      0|            VECTOR(*res)[i] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[i] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  685|      0|        }
  686|      0|    }
  687|       |
  688|      0|    igraph_vit_destroy(&vit);
  689|      0|    igraph_vector_int_destroy(&neis);
  690|      0|    IGRAPH_FINALLY_CLEAN(2);
  691|       |
  692|      0|    return IGRAPH_SUCCESS;
  693|      0|}

igraph_has_loop:
   48|  2.00k|igraph_error_t igraph_has_loop(const igraph_t *graph, igraph_bool_t *res) {
   49|  2.00k|    igraph_int_t i, m = igraph_ecount(graph);
   50|       |
   51|  2.00k|    IGRAPH_RETURN_IF_CACHED_BOOL(graph, IGRAPH_PROP_HAS_LOOP, res);
  ------------------
  |  |   97|  2.00k|    do { \
  |  |   98|  2.00k|        if (igraph_i_property_cache_has((graphptr), (prop))) { \
  |  |  ------------------
  |  |  |  Branch (98:13): [True: 2.00k, False: 1]
  |  |  ------------------
  |  |   99|  2.00k|            *(resptr) = igraph_i_property_cache_get_bool((graphptr), (prop)); \
  |  |  100|  2.00k|            return IGRAPH_SUCCESS; \
  |  |  101|  2.00k|        } \
  |  |  102|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (102:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
   52|       |
   53|      1|    *res = false;
   54|       |
   55|      1|    for (i = 0; i < m; i++) {
  ------------------
  |  Branch (55:17): [True: 0, False: 1]
  ------------------
   56|      0|        if (IGRAPH_FROM(graph, i) == IGRAPH_TO(graph, i)) {
  ------------------
  |  |  115|      0|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                      if (IGRAPH_FROM(graph, i) == IGRAPH_TO(graph, i)) {
  ------------------
  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (56:13): [True: 0, False: 0]
  ------------------
   57|      0|            *res = true;
   58|      0|            break;
   59|      0|        }
   60|      0|    }
   61|       |
   62|      1|    igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, *res);
   63|       |
   64|      1|    return IGRAPH_SUCCESS;
   65|  2.00k|}
igraph_is_loop:
   86|  2.00k|                              igraph_es_t es) {
   87|  2.00k|    igraph_eit_t eit;
   88|  2.00k|    igraph_bool_t found_loop = false;
   89|       |
   90|  2.00k|    IGRAPH_CHECK(igraph_eit_create(graph, es, &eit));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   91|  2.00k|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   92|       |
   93|  2.00k|    IGRAPH_CHECK(igraph_vector_bool_resize(res, IGRAPH_EIT_SIZE(eit)));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   94|       |
   95|  2.00k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (95:9): [True: 0, False: 2.00k]
  ------------------
   96|      0|        ! igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (96:9): [True: 0, False: 0]
  ------------------
   97|      0|        igraph_vector_bool_null(res);
   98|      0|        goto done;
   99|      0|    }
  100|       |
  101|  76.9k|    for (igraph_int_t i = 0; !IGRAPH_EIT_END(eit); i++, IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  371|  76.9k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                  for (igraph_int_t i = 0; !IGRAPH_EIT_END(eit); i++, IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  359|  74.9k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (101:30): [True: 74.9k, False: 2.00k]
  ------------------
  102|  74.9k|        igraph_int_t e = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|  74.9k|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 0, False: 74.9k]
  |  |  ------------------
  |  |  406|  74.9k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  103|  74.9k|        igraph_bool_t is_loop = (IGRAPH_FROM(graph, e) == IGRAPH_TO(graph, e));
  ------------------
  |  |  115|  74.9k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                      igraph_bool_t is_loop = (IGRAPH_FROM(graph, e) == IGRAPH_TO(graph, e));
  ------------------
  |  |  128|  74.9k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  104|  74.9k|        VECTOR(*res)[i] = is_loop;
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  105|  74.9k|        if (is_loop) {
  ------------------
  |  Branch (105:13): [True: 12.7k, False: 62.2k]
  ------------------
  106|  12.7k|            found_loop = true;
  107|  12.7k|        }
  108|  74.9k|    }
  109|       |
  110|  2.00k|    if (found_loop) {
  ------------------
  |  Branch (110:9): [True: 675, False: 1.32k]
  ------------------
  111|    675|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, true);
  112|  1.32k|    } else if (igraph_es_is_all(&es)) {
  ------------------
  |  Branch (112:16): [True: 0, False: 1.32k]
  ------------------
  113|      0|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, false);
  114|      0|    }
  115|       |
  116|  2.00k|done:
  117|  2.00k|    igraph_eit_destroy(&eit);
  118|  2.00k|    IGRAPH_FINALLY_CLEAN(1);
  119|       |
  120|  2.00k|    return IGRAPH_SUCCESS;
  121|  2.00k|}
igraph_count_loops:
  137|  2.00k|igraph_error_t igraph_count_loops(const igraph_t *graph, igraph_int_t *loop_count) {
  138|  2.00k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  139|  2.00k|    igraph_int_t count;
  140|       |
  141|       |    /* Nothing to do if we know that there are no loops. */
  142|  2.00k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (142:9): [True: 675, False: 1.32k]
  ------------------
  143|    675|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (143:9): [True: 0, False: 675]
  ------------------
  144|      0|        *loop_count = 0;
  145|      0|        return IGRAPH_SUCCESS;
  146|      0|    }
  147|       |
  148|  2.00k|    count = 0;
  149|  76.9k|    for (igraph_int_t e=0; e < no_of_edges; e++) {
  ------------------
  |  Branch (149:28): [True: 74.9k, False: 2.00k]
  ------------------
  150|  74.9k|        if (IGRAPH_FROM(graph, e) == IGRAPH_TO(graph, e)) {
  ------------------
  |  |  115|  74.9k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                      if (IGRAPH_FROM(graph, e) == IGRAPH_TO(graph, e)) {
  ------------------
  |  |  128|  74.9k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (150:13): [True: 12.7k, False: 62.2k]
  ------------------
  151|  12.7k|            count++;
  152|  12.7k|        }
  153|  74.9k|    }
  154|       |
  155|       |    /* We already checked for loops, so take the opportunity to set the cache. */
  156|  2.00k|    igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, count > 0);
  157|       |
  158|  2.00k|    *loop_count = count;
  159|       |
  160|  2.00k|    return IGRAPH_SUCCESS;
  161|  2.00k|}

igraph_has_multiple:
  176|  2.00k|igraph_error_t igraph_has_multiple(const igraph_t *graph, igraph_bool_t *res) {
  177|  2.00k|    igraph_int_t vc = igraph_vcount(graph);
  178|  2.00k|    igraph_int_t ec = igraph_ecount(graph);
  179|  2.00k|    igraph_bool_t directed = igraph_is_directed(graph);
  180|       |
  181|  2.00k|    IGRAPH_RETURN_IF_CACHED_BOOL(graph, IGRAPH_PROP_HAS_MULTI, res);
  ------------------
  |  |   97|  2.00k|    do { \
  |  |   98|  2.00k|        if (igraph_i_property_cache_has((graphptr), (prop))) { \
  |  |  ------------------
  |  |  |  Branch (98:13): [True: 0, False: 2.00k]
  |  |  ------------------
  |  |   99|      0|            *(resptr) = igraph_i_property_cache_get_bool((graphptr), (prop)); \
  |  |  100|      0|            return IGRAPH_SUCCESS; \
  |  |  101|      0|        } \
  |  |  102|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (102:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  182|       |
  183|  2.00k|    if (vc == 0 || ec == 0) {
  ------------------
  |  Branch (183:9): [True: 1, False: 2.00k]
  |  Branch (183:20): [True: 105, False: 1.89k]
  ------------------
  184|    106|        *res = false;
  185|  1.89k|    } else {
  186|  1.89k|        igraph_vector_int_t neis;
  187|  1.89k|        igraph_int_t i, j, n;
  188|  1.89k|        igraph_bool_t found = false;
  189|  1.89k|        IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  119|  1.89k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.89k|    do { \
  |  |  |  |  657|  1.89k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.89k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.89k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.89k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.89k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.89k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.89k|    do { \
  |  |  |  |  604|  1.89k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.89k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.89k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.89k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.89k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.89k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.89k]
  |  |  ------------------
  ------------------
  190|   260k|        for (i = 0; i < vc && !found; i++) {
  ------------------
  |  Branch (190:21): [True: 258k, False: 1.34k]
  |  Branch (190:31): [True: 258k, False: 551]
  ------------------
  191|   258k|            IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|   258k|    do { \
  |  |  657|   258k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   258k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   258k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 258k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   258k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 258k]
  |  |  ------------------
  ------------------
  192|   258k|                graph, &neis, i, IGRAPH_OUT, IGRAPH_LOOPS, IGRAPH_MULTIPLE
  193|   258k|            ));
  194|   258k|            n = igraph_vector_int_size(&neis);
  195|   267k|            for (j = 1; j < n; j++) {
  ------------------
  |  Branch (195:25): [True: 9.63k, False: 257k]
  ------------------
  196|  9.63k|                if (VECTOR(neis)[j - 1] == VECTOR(neis)[j]) {
  ------------------
  |  |   60|  9.63k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (VECTOR(neis)[j - 1] == VECTOR(neis)[j]) {
  ------------------
  |  |   60|  9.63k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (196:21): [True: 651, False: 8.98k]
  ------------------
  197|       |                    /* If the graph is undirected, loop edges appear twice in the neighbor
  198|       |                     * list, so check the next item as well */
  199|    651|                    if (directed) {
  ------------------
  |  Branch (199:25): [True: 651, False: 0]
  ------------------
  200|       |                        /* Directed, so this is a real multiple edge */
  201|    651|                        found = true; break;
  202|    651|                    } else if (VECTOR(neis)[j - 1] != i) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (202:32): [True: 0, False: 0]
  ------------------
  203|       |                        /* Undirected, but not a loop edge */
  204|      0|                        found = true; break;
  205|      0|                    } else if (j < n - 1 && VECTOR(neis)[j] == VECTOR(neis)[j + 1]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  } else if (j < n - 1 && VECTOR(neis)[j] == VECTOR(neis)[j + 1]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (205:32): [True: 0, False: 0]
  |  Branch (205:45): [True: 0, False: 0]
  ------------------
  206|       |                        /* Undirected, loop edge, multiple times */
  207|      0|                        found = true; break;
  208|      0|                    }
  209|    651|                }
  210|  9.63k|            }
  211|   258k|        }
  212|  1.89k|        *res = found;
  213|  1.89k|        igraph_vector_int_destroy(&neis);
  214|  1.89k|        IGRAPH_FINALLY_CLEAN(1);
  215|  1.89k|    }
  216|       |
  217|  2.00k|    igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_MULTI, *res);
  218|       |
  219|  2.00k|    return IGRAPH_SUCCESS;
  220|  2.00k|}
igraph_is_multiple:
  250|  2.00k|                                  igraph_es_t es) {
  251|  2.00k|    igraph_eit_t eit;
  252|  2.00k|    igraph_int_t i, j, n;
  253|  2.00k|    igraph_lazy_inclist_t inclist;
  254|       |
  255|  2.00k|    IGRAPH_CHECK(igraph_eit_create(graph, es, &eit));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  256|  2.00k|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  257|       |
  258|  2.00k|    IGRAPH_CHECK(igraph_lazy_inclist_init(graph, &inclist, IGRAPH_OUT, IGRAPH_LOOPS_ONCE));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  259|  2.00k|    IGRAPH_FINALLY(igraph_lazy_inclist_destroy, &inclist);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  260|       |
  261|  2.00k|    IGRAPH_CHECK(igraph_vector_bool_resize(res, IGRAPH_EIT_SIZE(eit)));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  262|       |
  263|  76.9k|    for (i = 0; !IGRAPH_EIT_END(eit); i++, IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  371|  76.9k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                  for (i = 0; !IGRAPH_EIT_END(eit); i++, IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  359|  74.9k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (263:17): [True: 74.9k, False: 2.00k]
  ------------------
  264|  74.9k|        igraph_int_t e = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|  74.9k|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 0, False: 74.9k]
  |  |  ------------------
  |  |  406|  74.9k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  265|  74.9k|        igraph_int_t from = IGRAPH_FROM(graph, e);
  ------------------
  |  |  115|  74.9k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  266|  74.9k|        igraph_int_t to = IGRAPH_TO(graph, e);
  ------------------
  |  |  128|  74.9k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  267|  74.9k|        igraph_vector_int_t *neis = igraph_lazy_inclist_get(&inclist, from);
  ------------------
  |  |  214|  74.9k|    (igraph_lazy_inclist_has(il,no) ? ((il)->incs[(igraph_int_t)(no)]) \
  |  |  ------------------
  |  |  |  |  189|  74.9k|#define igraph_lazy_inclist_has(il,no) ((il)->incs[(igraph_int_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (189:40): [True: 37.0k, False: 37.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  215|  74.9k|                                    : (igraph_i_lazy_inclist_get_real(il,no)))
  ------------------
  268|       |
  269|  74.9k|        IGRAPH_CHECK_OOM(neis, "Failed to query incident edges.");
  ------------------
  |  |  709|  74.9k|    do { \
  |  |  710|  74.9k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  74.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 74.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  74.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 74.9k]
  |  |  ------------------
  ------------------
  270|       |
  271|  74.9k|        VECTOR(*res)[i] = false;
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  272|       |
  273|  74.9k|        n = igraph_vector_int_size(neis);
  274|  3.53M|        for (j = 0; j < n; j++) {
  ------------------
  |  Branch (274:21): [True: 3.45M, False: 74.9k]
  ------------------
  275|  3.45M|            igraph_int_t e2 = VECTOR(*neis)[j];
  ------------------
  |  |   60|  3.45M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  276|  3.45M|            igraph_int_t to2 = IGRAPH_OTHER(graph, e2, from);
  ------------------
  |  |  146|  3.45M|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  3.45M|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.45M|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  1.64M|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.64M|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  1.81M|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.81M|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 1.64M, False: 1.81M]
  |  |  ------------------
  ------------------
  277|  3.45M|            if (to2 == to && e2 < e) {
  ------------------
  |  Branch (277:17): [True: 2.61M, False: 841k]
  |  Branch (277:30): [True: 1.26M, False: 1.34M]
  ------------------
  278|  1.26M|                VECTOR(*res)[i] = true;
  ------------------
  |  |   60|  1.26M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  279|  1.26M|            }
  280|  3.45M|        }
  281|  74.9k|    }
  282|       |
  283|  2.00k|    igraph_lazy_inclist_destroy(&inclist);
  284|  2.00k|    igraph_eit_destroy(&eit);
  285|  2.00k|    IGRAPH_FINALLY_CLEAN(2);
  286|  2.00k|    return IGRAPH_SUCCESS;
  287|  2.00k|}
igraph_count_multiple:
  314|  2.00k|                                     igraph_es_t es) {
  315|  2.00k|    igraph_eit_t eit;
  316|  2.00k|    igraph_int_t i, j, n;
  317|  2.00k|    igraph_lazy_adjlist_t adjlist;
  318|       |
  319|  2.00k|    IGRAPH_CHECK(igraph_eit_create(graph, es, &eit));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  320|  2.00k|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  321|  2.00k|    IGRAPH_CHECK(igraph_lazy_adjlist_init(graph, &adjlist, IGRAPH_OUT, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  322|  2.00k|    IGRAPH_FINALLY(igraph_lazy_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  323|       |
  324|  2.00k|    IGRAPH_CHECK(igraph_vector_int_resize(res, IGRAPH_EIT_SIZE(eit)));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  325|       |
  326|  76.9k|    for (i = 0; !IGRAPH_EIT_END(eit); i++, IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  371|  76.9k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                  for (i = 0; !IGRAPH_EIT_END(eit); i++, IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  359|  74.9k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (326:17): [True: 74.9k, False: 2.00k]
  ------------------
  327|  74.9k|        igraph_int_t e = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|  74.9k|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 74.9k, False: 0]
  |  |  ------------------
  |  |  406|  74.9k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  328|  74.9k|        igraph_int_t from = IGRAPH_FROM(graph, e);
  ------------------
  |  |  115|  74.9k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  329|  74.9k|        igraph_int_t to = IGRAPH_TO(graph, e);
  ------------------
  |  |  128|  74.9k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  330|  74.9k|        igraph_vector_int_t *neis = igraph_lazy_adjlist_get(&adjlist, from);
  ------------------
  |  |  158|  74.9k|    (igraph_lazy_adjlist_has(al,no) ? ((al)->adjs[(igraph_int_t)(no)]) \
  |  |  ------------------
  |  |  |  |  133|  74.9k|#define igraph_lazy_adjlist_has(al,no) ((al)->adjs[(igraph_int_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (133:40): [True: 37.0k, False: 37.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  159|  74.9k|                                    : (igraph_i_lazy_adjlist_get_real(al, no)))
  ------------------
  331|       |
  332|  74.9k|        IGRAPH_CHECK_OOM(neis, "Failed to query adjacent vertices.");
  ------------------
  |  |  709|  74.9k|    do { \
  |  |  710|  74.9k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  74.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 74.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  74.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 74.9k]
  |  |  ------------------
  ------------------
  333|       |
  334|  74.9k|        VECTOR(*res)[i] = 0;
  ------------------
  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  335|       |
  336|  74.9k|        n = igraph_vector_int_size(neis);
  337|  3.53M|        for (j = 0; j < n; j++) {
  ------------------
  |  Branch (337:21): [True: 3.45M, False: 74.9k]
  ------------------
  338|  3.45M|            if (VECTOR(*neis)[j] == to) {
  ------------------
  |  |   60|  3.45M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (338:17): [True: 2.61M, False: 841k]
  ------------------
  339|  2.61M|                VECTOR(*res)[i]++;
  ------------------
  |  |   60|  2.61M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  340|  2.61M|            }
  341|  3.45M|        }
  342|  74.9k|    }
  343|       |
  344|  2.00k|    igraph_lazy_adjlist_destroy(&adjlist);
  345|  2.00k|    igraph_eit_destroy(&eit);
  346|  2.00k|    IGRAPH_FINALLY_CLEAN(2);
  347|       |
  348|  2.00k|    return IGRAPH_SUCCESS;
  349|  2.00k|}
igraph_count_multiple_1:
  369|  2.00k|{
  370|  2.00k|    igraph_int_t i, n, count;
  371|  2.00k|    igraph_int_t from, to;
  372|  2.00k|    igraph_vector_int_t vids;
  373|       |
  374|  2.00k|    if (eid < 0 || eid >= igraph_ecount(graph)) {
  ------------------
  |  Branch (374:9): [True: 0, False: 2.00k]
  |  Branch (374:20): [True: 0, False: 2.00k]
  ------------------
  375|      0|        IGRAPH_ERROR("Edge ID out of range.", IGRAPH_EINVEID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  376|      0|    }
  377|       |
  378|  2.00k|    from = IGRAPH_FROM(graph, eid);
  ------------------
  |  |  115|  2.00k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  2.00k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  379|  2.00k|    to = IGRAPH_TO(graph, eid);
  ------------------
  |  |  128|  2.00k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  2.00k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  380|       |
  381|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&vids, 0);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  382|  2.00k|    IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  383|  2.00k|        graph, &vids, from, IGRAPH_OUT, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE
  384|  2.00k|    ));
  385|       |
  386|  2.00k|    count = 0;
  387|  2.00k|    n = igraph_vector_int_size(&vids);
  388|  8.03k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (388:17): [True: 6.02k, False: 2.00k]
  ------------------
  389|  6.02k|        if (VECTOR(vids)[i] == to) {
  ------------------
  |  |   60|  6.02k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (389:13): [True: 2.06k, False: 3.96k]
  ------------------
  390|  2.06k|            count++;
  391|  2.06k|        }
  392|  6.02k|    }
  393|       |
  394|  2.00k|    igraph_vector_int_destroy(&vids);
  395|  2.00k|    IGRAPH_FINALLY_CLEAN(1);
  396|       |
  397|  2.00k|    *res = count;
  398|       |
  399|  2.00k|    return IGRAPH_SUCCESS;
  400|  2.00k|}
igraph_is_mutual:
  433|  2.00k|                                igraph_es_t es, igraph_bool_t loops) {
  434|       |
  435|  2.00k|    igraph_eit_t eit;
  436|  2.00k|    igraph_lazy_adjlist_t adjlist;
  437|  2.00k|    igraph_int_t i;
  438|       |
  439|       |    /* How many edges do we have? */
  440|  2.00k|    IGRAPH_CHECK(igraph_eit_create(graph, es, &eit));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  441|  2.00k|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  442|  2.00k|    IGRAPH_CHECK(igraph_vector_bool_resize(res, IGRAPH_EIT_SIZE(eit)));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  443|       |
  444|       |    /* An undirected graph has mutual edges by definition,
  445|       |       res is already properly resized */
  446|  2.00k|    if (! igraph_is_directed(graph)) {
  ------------------
  |  Branch (446:9): [True: 0, False: 2.00k]
  ------------------
  447|      0|        igraph_vector_bool_fill(res, true);
  448|      0|        igraph_eit_destroy(&eit);
  449|      0|        IGRAPH_FINALLY_CLEAN(1);
  450|      0|        return IGRAPH_SUCCESS;
  451|      0|    }
  452|       |
  453|  2.00k|    IGRAPH_CHECK(igraph_lazy_adjlist_init(graph, &adjlist, IGRAPH_OUT, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  454|  2.00k|    IGRAPH_FINALLY(igraph_lazy_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  2.00k|    do { \
  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  ------------------
  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  455|       |
  456|  76.9k|    for (i = 0; ! IGRAPH_EIT_END(eit); i++, IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  371|  76.9k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                  for (i = 0; ! IGRAPH_EIT_END(eit); i++, IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  359|  74.9k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (456:17): [True: 74.9k, False: 2.00k]
  ------------------
  457|  74.9k|        igraph_int_t edge = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|  74.9k|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 0, False: 74.9k]
  |  |  ------------------
  |  |  406|  74.9k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  458|  74.9k|        igraph_int_t from = IGRAPH_FROM(graph, edge);
  ------------------
  |  |  115|  74.9k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  459|  74.9k|        igraph_int_t to = IGRAPH_TO(graph, edge);
  ------------------
  |  |  128|  74.9k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  460|       |
  461|  74.9k|        if (from == to) {
  ------------------
  |  Branch (461:13): [True: 12.7k, False: 62.2k]
  ------------------
  462|  12.7k|            VECTOR(*res)[i] = loops;
  ------------------
  |  |   60|  12.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  463|  12.7k|            continue; /* no need to do binsearch for self-loops */
  464|  12.7k|        }
  465|       |
  466|       |        /* Check whether there is a to->from edge, search for from in the
  467|       |           out-list of to */
  468|  62.2k|        igraph_vector_int_t *neis = igraph_lazy_adjlist_get(&adjlist, to);
  ------------------
  |  |  158|  62.2k|    (igraph_lazy_adjlist_has(al,no) ? ((al)->adjs[(igraph_int_t)(no)]) \
  |  |  ------------------
  |  |  |  |  133|  62.2k|#define igraph_lazy_adjlist_has(al,no) ((al)->adjs[(igraph_int_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (133:40): [True: 24.2k, False: 38.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  159|  62.2k|                                    : (igraph_i_lazy_adjlist_get_real(al, no)))
  ------------------
  469|  62.2k|        IGRAPH_CHECK_OOM(neis, "Failed to query neighbors.");
  ------------------
  |  |  709|  62.2k|    do { \
  |  |  710|  62.2k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  62.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 62.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  62.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 62.2k]
  |  |  ------------------
  ------------------
  470|  62.2k|        VECTOR(*res)[i] = igraph_vector_int_contains_sorted(neis, from);
  ------------------
  |  |   60|  62.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  471|  62.2k|    }
  472|       |
  473|  2.00k|    igraph_lazy_adjlist_destroy(&adjlist);
  474|  2.00k|    igraph_eit_destroy(&eit);
  475|  2.00k|    IGRAPH_FINALLY_CLEAN(2);
  476|       |
  477|  2.00k|    return IGRAPH_SUCCESS;
  478|  2.00k|}

igraph_unfold_tree:
   59|  2.00k|                       igraph_vector_int_t *vertex_index) {
   60|       |
   61|  2.00k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
   62|  2.00k|    igraph_int_t no_of_edges = igraph_ecount(graph);
   63|  2.00k|    igraph_int_t no_of_roots = igraph_vector_int_size(roots);
   64|  2.00k|    igraph_int_t tree_vertex_count = no_of_nodes;
   65|       |
   66|  2.00k|    igraph_vector_int_t edges;
   67|  2.00k|    igraph_bitset_t seen_vertices;
   68|  2.00k|    igraph_bitset_t seen_edges;
   69|       |
   70|  2.00k|    igraph_dqueue_int_t Q;
   71|  2.00k|    igraph_vector_int_t neis;
   72|       |
   73|  2.00k|    igraph_int_t v_ptr = no_of_nodes;
   74|       |
   75|  2.00k|    if (! igraph_vector_int_isininterval(roots, 0, no_of_nodes-1)) {
  ------------------
  |  Branch (75:9): [True: 0, False: 2.00k]
  ------------------
   76|      0|        IGRAPH_ERROR("All roots should be vertices of the graph.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   77|      0|    }
   78|       |
   79|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, 0);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   80|  2.00k|    IGRAPH_CHECK(igraph_vector_int_reserve(&edges, no_of_edges * 2));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   81|  2.00k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&Q, 100);
  ------------------
  |  |   61|  2.00k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.00k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   82|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   83|  2.00k|    IGRAPH_BITSET_INIT_FINALLY(&seen_vertices, no_of_nodes);
  ------------------
  |  |  265|  2.00k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  266|  2.00k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  267|  2.00k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (267:62): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   84|  2.00k|    IGRAPH_BITSET_INIT_FINALLY(&seen_edges, no_of_edges);
  ------------------
  |  |  265|  2.00k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  266|  2.00k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  267|  2.00k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (267:62): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   85|       |
   86|  2.00k|    if (vertex_index) {
  ------------------
  |  Branch (86:9): [True: 2.00k, False: 0]
  ------------------
   87|  2.00k|        IGRAPH_CHECK(igraph_vector_int_range(vertex_index, 0, no_of_nodes));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   88|  2.00k|    }
   89|       |
   90|  4.00k|    for (igraph_int_t r = 0; r < no_of_roots; r++) {
  ------------------
  |  Branch (90:30): [True: 2.00k, False: 2.00k]
  ------------------
   91|       |
   92|  2.00k|        igraph_int_t root = VECTOR(*roots)[r];
  ------------------
  |  |   60|  2.00k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   93|  2.00k|        IGRAPH_BIT_SET(seen_vertices, root);
  ------------------
  |  |  103|  2.00k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  2.00k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  2.00k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  2.00k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  2.00k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  2.00k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   94|  2.00k|        IGRAPH_CHECK(igraph_dqueue_int_push(&Q, root));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   95|       |
   96|  24.0k|        while (!igraph_dqueue_int_empty(&Q)) {
  ------------------
  |  Branch (96:16): [True: 22.0k, False: 2.00k]
  ------------------
   97|  22.0k|            igraph_int_t actnode = igraph_dqueue_int_pop(&Q);
   98|       |
   99|  22.0k|            IGRAPH_CHECK(igraph_incident(graph, &neis, actnode, mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  22.0k|    do { \
  |  |  657|  22.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  22.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  22.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 22.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  22.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  100|       |
  101|  22.0k|            igraph_int_t n = igraph_vector_int_size(&neis);
  102|  64.0k|            for (igraph_int_t i = 0; i < n; i++) {
  ------------------
  |  Branch (102:38): [True: 42.0k, False: 22.0k]
  ------------------
  103|       |
  104|  42.0k|                igraph_int_t edge = VECTOR(neis)[i];
  ------------------
  |  |   60|  42.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  105|  42.0k|                igraph_int_t from = IGRAPH_FROM(graph, edge);
  ------------------
  |  |  115|  42.0k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  42.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  106|  42.0k|                igraph_int_t to = IGRAPH_TO(graph, edge);
  ------------------
  |  |  128|  42.0k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  42.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  107|  42.0k|                igraph_int_t nei = IGRAPH_OTHER(graph, edge, actnode);
  ------------------
  |  |  146|  42.0k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  42.0k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  42.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  42.0k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  42.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 42.0k, False: 0]
  |  |  ------------------
  ------------------
  108|       |
  109|  42.0k|                if (! IGRAPH_BIT_TEST(seen_edges, edge)) {
  ------------------
  |  |  142|  42.0k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  42.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  42.0k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  42.0k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  42.0k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  42.0k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (109:21): [True: 42.0k, False: 0]
  ------------------
  110|       |
  111|  42.0k|                    IGRAPH_BIT_SET(seen_edges, edge);
  ------------------
  |  |  103|  42.0k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  42.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  42.0k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  42.0k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  42.0k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  42.0k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  112|       |
  113|  42.0k|                    if (! IGRAPH_BIT_TEST(seen_vertices, nei)) {
  ------------------
  |  |  142|  42.0k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  42.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  42.0k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  42.0k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  42.0k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  42.0k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (113:25): [True: 20.0k, False: 22.0k]
  ------------------
  114|       |
  115|  20.0k|                        IGRAPH_CHECK(igraph_vector_int_push_back(&edges, from));
  ------------------
  |  |  656|  20.0k|    do { \
  |  |  657|  20.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  20.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  20.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  20.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 20.0k]
  |  |  ------------------
  ------------------
  116|  20.0k|                        IGRAPH_CHECK(igraph_vector_int_push_back(&edges, to));
  ------------------
  |  |  656|  20.0k|    do { \
  |  |  657|  20.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  20.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  20.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  20.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 20.0k]
  |  |  ------------------
  ------------------
  117|       |
  118|  20.0k|                        IGRAPH_BIT_SET(seen_vertices, nei);
  ------------------
  |  |  103|  20.0k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  20.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  20.0k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  20.0k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  20.0k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  20.0k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  119|  20.0k|                        IGRAPH_CHECK(igraph_dqueue_int_push(&Q, nei));
  ------------------
  |  |  656|  20.0k|    do { \
  |  |  657|  20.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  20.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  20.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  20.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 20.0k]
  |  |  ------------------
  ------------------
  120|       |
  121|  22.0k|                    } else {
  122|       |
  123|  22.0k|                        tree_vertex_count++;
  124|  22.0k|                        if (vertex_index) {
  ------------------
  |  Branch (124:29): [True: 22.0k, False: 0]
  ------------------
  125|  22.0k|                            IGRAPH_CHECK(igraph_vector_int_push_back(vertex_index, nei));
  ------------------
  |  |  656|  22.0k|    do { \
  |  |  657|  22.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  22.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  22.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 22.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  22.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  126|  22.0k|                        }
  127|       |
  128|  22.0k|                        if (from == nei) {
  ------------------
  |  Branch (128:29): [True: 22.0k, False: 0]
  ------------------
  129|  22.0k|                            IGRAPH_CHECK(igraph_vector_int_push_back(&edges, v_ptr++));
  ------------------
  |  |  656|  22.0k|    do { \
  |  |  657|  22.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  22.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  22.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 22.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  22.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  130|  22.0k|                            IGRAPH_CHECK(igraph_vector_int_push_back(&edges, to));
  ------------------
  |  |  656|  22.0k|    do { \
  |  |  657|  22.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  22.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  22.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 22.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  22.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  131|  22.0k|                        } else {
  132|      0|                            IGRAPH_CHECK(igraph_vector_int_push_back(&edges, from));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  133|      0|                            IGRAPH_CHECK(igraph_vector_int_push_back(&edges, v_ptr++));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  134|      0|                        }
  135|  22.0k|                    }
  136|  42.0k|                }
  137|       |
  138|  42.0k|            } /* for i<n */
  139|       |
  140|  22.0k|        } /* ! igraph_dqueue_int_empty(&Q) */
  141|       |
  142|  2.00k|    } /* r < igraph_vector_int_size(roots) */
  143|       |
  144|  2.00k|    igraph_bitset_destroy(&seen_edges);
  145|  2.00k|    igraph_bitset_destroy(&seen_vertices);
  146|  2.00k|    igraph_vector_int_destroy(&neis);
  147|  2.00k|    igraph_dqueue_int_destroy(&Q);
  148|  2.00k|    IGRAPH_FINALLY_CLEAN(4);
  149|       |
  150|  2.00k|    IGRAPH_CHECK(igraph_create(tree, &edges, tree_vertex_count, igraph_is_directed(graph)));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  151|  2.00k|    igraph_vector_int_destroy(&edges);
  152|  2.00k|    IGRAPH_FINALLY_CLEAN(1);
  153|       |
  154|  2.00k|    return IGRAPH_SUCCESS;
  155|  2.00k|}

igraph_rng_default:
  188|  97.4k|igraph_rng_t *igraph_rng_default(void) {
  189|  97.4k|    return igraph_i_rng_default_ptr;
  190|  97.4k|}
igraph_rng_seed:
  260|  2.00k|igraph_error_t igraph_rng_seed(igraph_rng_t *rng, igraph_uint_t seed) {
  261|  2.00k|    const igraph_rng_type_t *type = rng->type;
  262|  2.00k|    IGRAPH_CHECK(type->seed(rng->state, seed));
  ------------------
  |  |  656|  2.00k|    do { \
  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  263|  2.00k|    rng->is_seeded = true;
  264|  2.00k|    return IGRAPH_SUCCESS;
  265|  2.00k|}
igraph_rng_bits:
  277|  95.4k|igraph_int_t igraph_rng_bits(const igraph_rng_t* rng) {
  278|  95.4k|    return rng->type->bits;
  279|  95.4k|}
igraph_rng_get_integer:
  593|  95.4k|) {
  594|  95.4k|    const igraph_rng_type_t *type = rng->type;
  595|  95.4k|    igraph_uint_t range;
  596|       |
  597|  95.4k|    assert(h >= l);
  ------------------
  |  Branch (597:5): [True: 0, False: 95.4k]
  |  Branch (597:5): [True: 95.4k, False: 0]
  ------------------
  598|       |
  599|  95.4k|    if (h == l) {
  ------------------
  |  Branch (599:9): [True: 0, False: 95.4k]
  ------------------
  600|      0|        return l;
  601|      0|    }
  602|       |
  603|  95.4k|    if (type->get_int) {
  ------------------
  |  Branch (603:9): [True: 0, False: 95.4k]
  ------------------
  604|      0|        return type->get_int(rng->state, l, h);
  605|      0|    }
  606|       |
  607|  95.4k|    if (IGRAPH_UNLIKELY(l == IGRAPH_INTEGER_MIN && h == IGRAPH_INTEGER_MAX)) {
  ------------------
  |  |  612|  95.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  ------------------
  |  |  |  Branch (612:32): [True: 0, False: 95.4k]
  |  |  |  Branch (612:52): [True: 0, False: 95.4k]
  |  |  |  Branch (612:52): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  608|       |        /* Full uint range is needed, we can just grab a random number from
  609|       |         * the uint range and cast it to a signed integer */
  610|      0|        return (igraph_int_t) igraph_i_rng_get_uint(rng);
  611|  95.4k|    } else if (l >= 0 || h < 0) {
  ------------------
  |  Branch (611:16): [True: 95.4k, False: 0]
  |  Branch (611:26): [True: 0, False: 0]
  ------------------
  612|       |        /* this is okay, (h - l) will not overflow an igraph_int_t */
  613|  95.4k|        range = (igraph_uint_t)(h - l) + 1;
  614|  95.4k|    } else {
  615|       |        /* (h - l) could potentially overflow so we need to play it safe. If we
  616|       |         * are here, l < 0 and h >= 0 so we can cast -l into an igraph_uint_t
  617|       |         * safely and do the subtraction that way */
  618|      0|        range = ((igraph_uint_t)(h)) + ((igraph_uint_t)(-l)) + 1;
  619|      0|    }
  620|       |
  621|  95.4k|    return l + igraph_i_rng_get_uint_bounded(rng, range);
  622|  95.4k|}
random.c:igraph_i_rng_get_random_bits:
  336|  95.4k|static igraph_uint_t igraph_i_rng_get_random_bits(igraph_rng_t *rng, uint8_t bits) {
  337|  95.4k|    const igraph_rng_type_t *type = rng->type;
  338|  95.4k|    igraph_int_t rng_bitwidth = igraph_rng_bits(rng);
  339|  95.4k|    igraph_uint_t result;
  340|       |
  341|  95.4k|    if (rng_bitwidth >= bits) {
  ------------------
  |  Branch (341:9): [True: 95.4k, False: 0]
  ------------------
  342|       |        /* keep the high bits as RNGs sometimes tend to have lower entropy in
  343|       |         * low bits than in high bits */
  344|  95.4k|        result = type->get(rng->state) >> (rng_bitwidth - bits);
  345|  95.4k|    } else {
  346|      0|        result = 0;
  347|      0|        do {
  348|      0|            result = (result << rng_bitwidth) + type->get(rng->state);
  349|      0|            bits -= rng_bitwidth;
  350|      0|        } while (bits > rng_bitwidth);
  ------------------
  |  Branch (350:18): [True: 0, False: 0]
  ------------------
  351|       |
  352|       |        /* and now the last piece */
  353|      0|        result = (result << bits) + (type->get(rng->state) >> (rng_bitwidth - bits));
  354|      0|    }
  355|       |
  356|  95.4k|    return result;
  357|  95.4k|}
random.c:igraph_i_rng_get_uint_bounded:
  532|  95.4k|static igraph_uint_t igraph_i_rng_get_uint_bounded(igraph_rng_t *rng, igraph_uint_t range) {
  533|       |    /* We must make this function behave the same way for range < 2^32 so igraph
  534|       |     * behaves the same way on 32-bit and 64-bit platforms as long as we stick
  535|       |     * to integers less than 2^32. This is to ensure that the unit tests are
  536|       |     * consistent */
  537|       |
  538|       |#if IGRAPH_INTEGER_SIZE == 32
  539|       |    return igraph_i_rng_get_uint32_bounded(rng, range);
  540|       |#else
  541|  95.4k|    if (range <= UINT32_MAX) {
  ------------------
  |  Branch (541:9): [True: 95.4k, False: 0]
  ------------------
  542|  95.4k|        return igraph_i_rng_get_uint32_bounded(rng, range);
  543|  95.4k|    } else {
  544|      0|        return igraph_i_rng_get_uint64_bounded(rng, range);
  545|      0|    }
  546|  95.4k|#endif
  547|  95.4k|}
random.c:igraph_i_rng_get_uint32_bounded:
  428|  95.4k|static uint32_t igraph_i_rng_get_uint32_bounded(igraph_rng_t *rng, uint32_t range) {
  429|       |    /* Debiased integer multiplication -- Lemire's method
  430|       |     * from https://www.pcg-random.org/posts/bounded-rands.html */
  431|  95.4k|    uint32_t x, l, t = (-range) % range;
  432|  95.4k|    uint64_t m;
  433|  95.4k|    do {
  434|  95.4k|        x = igraph_i_rng_get_uint32(rng);
  435|  95.4k|        m = (uint64_t)(x) * (uint64_t)(range);
  436|  95.4k|        l = (uint32_t)m;
  437|  95.4k|    } while (l < t);
  ------------------
  |  Branch (437:14): [True: 0, False: 95.4k]
  ------------------
  438|  95.4k|    return m >> 32;
  439|  95.4k|}
random.c:igraph_i_rng_get_uint32:
  416|  95.4k|static uint32_t igraph_i_rng_get_uint32(igraph_rng_t *rng) {
  417|  95.4k|    return igraph_i_rng_get_random_bits(rng, 32);
  418|  95.4k|}

rng_pcg32.c:igraph_rng_pcg32_seed:
   41|  2.00k|static igraph_error_t igraph_rng_pcg32_seed(void *vstate, igraph_uint_t seed) {
   42|  2.00k|    pcg32_random_t *state = (pcg32_random_t*) vstate;
   43|       |
   44|       |    /* PCG32 is seeded by a 64-bit state and a 64-bit sequence number (well, only
   45|       |     * 63 bits are used from the sequence number, though). Since the unified
   46|       |     * igraph RNG seeding interface provides a single igraph_uint_t as the seed,
   47|       |     * we use the seed to fill in the sequence number and use the state from
   48|       |     * PCG32_INITIALIZER */
   49|  2.00k|    if (seed == 0) {
  ------------------
  |  Branch (49:9): [True: 0, False: 2.00k]
  ------------------
   50|       |        /* If you feel the temptation to unify the two branches by running
   51|       |         * seed = pcg32_initializer.inc >> 1, don't.
   52|       |         * seed is an igraph_uint_t, so it can be 32-bit or 64-bit.
   53|       |         * pcg32_initializer.inc is always 64-bit.
   54|       |         */
   55|      0|        pcg32_srandom_r(state, pcg32_initializer.state, pcg32_initializer.inc >> 1);
  ------------------
  |  | 2398|      0|#define pcg32_srandom_r                 pcg_setseq_64_srandom_r
  ------------------
   56|  2.00k|    } else {
   57|  2.00k|        pcg32_srandom_r(state, pcg32_initializer.state, seed);
  ------------------
  |  | 2398|  2.00k|#define pcg32_srandom_r                 pcg_setseq_64_srandom_r
  ------------------
   58|  2.00k|    }
   59|       |
   60|  2.00k|    return IGRAPH_SUCCESS;
   61|  2.00k|}
rng_pcg32.c:igraph_rng_pcg32_get:
   36|  95.4k|static igraph_uint_t igraph_rng_pcg32_get(void *vstate) {
   37|  95.4k|    pcg32_random_t *state = (pcg32_random_t*) vstate;
   38|  95.4k|    return pcg32_random_r(state);
  ------------------
  |  | 2388|  95.4k|#define pcg32_random_r                  pcg_setseq_64_xsh_rr_32_random_r
  ------------------
   39|  95.4k|}

