LLVMFuzzerTestOneInput:
   26|  2.04k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   27|  2.04k|    igraph_t graph;
   28|  2.04k|    igraph_vector_int_t edges;
   29|       |
   30|  2.04k|    igraph_set_warning_handler(igraph_warning_handler_ignore);
   31|       |
   32|  2.04k|    if (Size % 2 == 0 || Size > 512+1 || Size < 1) {
  ------------------
  |  Branch (32:9): [True: 4, False: 2.03k]
  |  Branch (32:26): [True: 10, False: 2.02k]
  |  Branch (32:42): [True: 0, False: 2.02k]
  ------------------
   33|     14|        return 0;
   34|     14|    }
   35|       |
   36|  2.02k|    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.02k]
  ------------------
   38|   149k|        VECTOR(edges)[i] = Data[i+1];
  ------------------
  |  |   65|   149k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   39|   149k|    }
   40|       |
   41|       |    /* Undirected */
   42|  2.02k|    if (igraph_create(&graph, &edges, Data[0], IGRAPH_UNDIRECTED) == IGRAPH_SUCCESS) {
  ------------------
  |  Branch (42:9): [True: 2.02k, False: 0]
  ------------------
   43|  2.02k|        igraph_vector_int_list_t ivl1, ivl2;
   44|  2.02k|        igraph_vector_int_t iv1, iv2, iv3, iv4, iv5;
   45|  2.02k|        igraph_graph_list_t gl;
   46|  2.02k|        igraph_vector_bool_t bv;
   47|  2.02k|        igraph_matrix_t m;
   48|  2.02k|        igraph_integer_t i, i2;
   49|  2.02k|        igraph_bool_t b, b2, loop, multi, graphical;
   50|  2.02k|        igraph_real_t r;
   51|  2.02k|        igraph_t g;
   52|       |
   53|  2.02k|        igraph_vector_int_list_init(&ivl1, 0);
   54|  2.02k|        igraph_vector_int_list_init(&ivl2, 0);
   55|  2.02k|        igraph_vector_int_init(&iv1, 0);
   56|  2.02k|        igraph_vector_int_init(&iv2, 0);
   57|  2.02k|        igraph_vector_int_init(&iv3, 0);
   58|  2.02k|        igraph_vector_int_init(&iv4, 0);
   59|  2.02k|        igraph_vector_int_init(&iv5, 0);
   60|  2.02k|        igraph_vector_bool_init(&bv, 0);
   61|  2.02k|        igraph_matrix_init(&m, 0, 0);
   62|       |
   63|  2.02k|        igraph_find_cycle(&graph, &iv1, &iv2, IGRAPH_ALL);
   64|  2.02k|        igraph_biconnected_components(&graph, &i, NULL, &ivl1, &ivl2, &iv1);
   65|  2.02k|        igraph_maximum_cardinality_search(&graph, &iv1, &iv2);
   66|  2.02k|        igraph_coreness(&graph, &iv1, IGRAPH_ALL);
   67|  2.02k|        igraph_girth(&graph, &r, &iv1);
   68|  2.02k|        igraph_bridges(&graph, &iv1);
   69|  2.02k|        igraph_assortativity_degree(&graph, &r, IGRAPH_UNDIRECTED);
   70|  2.02k|        igraph_count_multiple(&graph, &iv1, igraph_ess_all(IGRAPH_EDGEORDER_FROM));
   71|  2.02k|        igraph_is_loop(&graph, &bv, igraph_ess_all(IGRAPH_EDGEORDER_TO));
   72|  2.02k|        igraph_is_multiple(&graph, &bv, igraph_ess_all(IGRAPH_EDGEORDER_ID));
   73|  2.02k|        igraph_maxdegree(&graph, &i, igraph_vss_all(), IGRAPH_ALL, true);
   74|  2.02k|        igraph_mean_degree(&graph, &r, IGRAPH_NO_LOOPS);
   75|       |
   76|       |        /* Graphicality and graph realization based on the degrees of 'graph'. */
   77|  2.02k|        igraph_has_loop(&graph, &loop);
   78|  2.02k|        igraph_has_multiple(&graph, &multi);
   79|  2.02k|        igraph_degree(&graph, &iv1, igraph_vss_all(), IGRAPH_ALL, true);
   80|  2.02k|        igraph_is_graphical(&iv1, NULL, IGRAPH_SIMPLE_SW, &b);
   81|  2.02k|        if (!loop && !multi) {
  ------------------
  |  Branch (81:13): [True: 1.28k, False: 743]
  |  Branch (81:22): [True: 1.03k, False: 249]
  ------------------
   82|  1.03k|            IGRAPH_ASSERT(b);
  ------------------
  |  |  916|  1.03k|    do { \
  |  |  917|  1.03k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.03k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.03k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  919|      0|        } \
  |  |  920|  1.03k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   83|  1.03k|            igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_SIMPLE_SW, IGRAPH_REALIZE_DEGSEQ_SMALLEST);
   84|  1.03k|            igraph_destroy(&g);
   85|  1.03k|            igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_SIMPLE_SW, IGRAPH_REALIZE_DEGSEQ_LARGEST);
   86|  1.03k|            igraph_destroy(&g);
   87|  1.03k|            igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_SIMPLE_SW, IGRAPH_REALIZE_DEGSEQ_INDEX);
   88|  1.03k|            igraph_destroy(&g);
   89|  1.03k|        }
   90|  2.02k|        igraph_is_graphical(&iv1, NULL, IGRAPH_LOOPS_SW, &b);
   91|  2.02k|        if (!multi) {
  ------------------
  |  Branch (91:13): [True: 1.28k, False: 741]
  ------------------
   92|  1.28k|            IGRAPH_ASSERT(b);
  ------------------
  |  |  916|  1.28k|    do { \
  |  |  917|  1.28k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  919|      0|        } \
  |  |  920|  1.28k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   93|       |            /* Undirected realization is not yet implemented. */
   94|  1.28k|        }
   95|  2.02k|        igraph_is_graphical(&iv1, NULL, IGRAPH_MULTI_SW, &b);
   96|  2.02k|        if (!loop) {
  ------------------
  |  Branch (96:13): [True: 1.28k, False: 743]
  ------------------
   97|  1.28k|            IGRAPH_ASSERT(b);
  ------------------
  |  |  916|  1.28k|    do { \
  |  |  917|  1.28k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  919|      0|        } \
  |  |  920|  1.28k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   98|  1.28k|            igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_MULTI_SW, IGRAPH_REALIZE_DEGSEQ_SMALLEST);
   99|  1.28k|            igraph_destroy(&g);
  100|  1.28k|            igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_MULTI_SW, IGRAPH_REALIZE_DEGSEQ_LARGEST);
  101|  1.28k|            igraph_destroy(&g);
  102|  1.28k|            igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_MULTI_SW, IGRAPH_REALIZE_DEGSEQ_INDEX);
  103|  1.28k|            igraph_destroy(&g);
  104|  1.28k|        }
  105|  2.02k|        igraph_is_graphical(&iv1, NULL, IGRAPH_LOOPS_SW | IGRAPH_MULTI_SW, &b);
  106|  2.02k|        IGRAPH_ASSERT(b);
  ------------------
  |  |  916|  2.02k|    do { \
  |  |  917|  2.02k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  919|      0|        } \
  |  |  920|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  107|  2.02k|        igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_LOOPS_SW | IGRAPH_MULTI_SW, IGRAPH_REALIZE_DEGSEQ_SMALLEST);
  108|  2.02k|        igraph_destroy(&g);
  109|  2.02k|        igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_LOOPS_SW | IGRAPH_MULTI_SW, IGRAPH_REALIZE_DEGSEQ_LARGEST);
  110|  2.02k|        igraph_destroy(&g);
  111|  2.02k|        igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_LOOPS_SW | IGRAPH_MULTI_SW, IGRAPH_REALIZE_DEGSEQ_INDEX);
  112|  2.02k|        igraph_destroy(&g);
  113|       |
  114|       |        /* Graphicality and graph realization based on the degrees of 'graph'. */
  115|  2.02k|        igraph_has_loop(&graph, &loop);
  116|  2.02k|        igraph_has_multiple(&graph, &multi);
  117|  2.02k|        igraph_degree(&graph, &iv1, igraph_vss_all(), IGRAPH_ALL, true);
  118|  2.02k|        igraph_is_graphical(&iv1, NULL, IGRAPH_SIMPLE_SW, &graphical);
  119|  2.02k|        if (!loop && !multi) {
  ------------------
  |  Branch (119:13): [True: 1.28k, False: 743]
  |  Branch (119:22): [True: 1.03k, False: 249]
  ------------------
  120|  1.03k|            IGRAPH_ASSERT(graphical);
  ------------------
  |  |  916|  1.03k|    do { \
  |  |  917|  1.03k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.03k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.03k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  919|      0|        } \
  |  |  920|  1.03k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  121|  1.03k|        }
  122|  2.02k|        if (graphical) {
  ------------------
  |  Branch (122:13): [True: 1.37k, False: 655]
  ------------------
  123|  1.37k|            igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_SIMPLE_SW, IGRAPH_REALIZE_DEGSEQ_SMALLEST);
  124|  1.37k|            igraph_destroy(&g);
  125|  1.37k|            igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_SIMPLE_SW, IGRAPH_REALIZE_DEGSEQ_LARGEST);
  126|  1.37k|            igraph_destroy(&g);
  127|  1.37k|            igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_SIMPLE_SW, IGRAPH_REALIZE_DEGSEQ_INDEX);
  128|  1.37k|            igraph_destroy(&g);
  129|  1.37k|        } else {
  130|    655|            CHECK_ERROR(
  ------------------
  |  |    7|    655|    do { \
  |  |    8|    655|            igraph_error_handler_t *handler; \
  |  |    9|    655|            handler = igraph_set_error_handler(igraph_error_handler_ignore); \
  |  |   10|    655|            IGRAPH_ASSERT(funcall == expected_err); \
  |  |  ------------------
  |  |  |  |  916|    655|    do { \
  |  |  |  |  917|    655|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    655|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 655]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  |  |  ------------------
  |  |  |  |  919|      0|        } \
  |  |  |  |  920|    655|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   11|    655|            igraph_set_error_handler(handler); \
  |  |   12|    655|    } while (0)
  |  |  ------------------
  |  |  |  Branch (12:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  131|    655|                igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_SIMPLE_SW, IGRAPH_REALIZE_DEGSEQ_SMALLEST),
  132|    655|                IGRAPH_EINVAL);
  133|    655|            CHECK_ERROR(
  ------------------
  |  |    7|    655|    do { \
  |  |    8|    655|            igraph_error_handler_t *handler; \
  |  |    9|    655|            handler = igraph_set_error_handler(igraph_error_handler_ignore); \
  |  |   10|    655|            IGRAPH_ASSERT(funcall == expected_err); \
  |  |  ------------------
  |  |  |  |  916|    655|    do { \
  |  |  |  |  917|    655|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    655|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 655]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  |  |  ------------------
  |  |  |  |  919|      0|        } \
  |  |  |  |  920|    655|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   11|    655|            igraph_set_error_handler(handler); \
  |  |   12|    655|    } while (0)
  |  |  ------------------
  |  |  |  Branch (12:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  134|    655|                igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_SIMPLE_SW, IGRAPH_REALIZE_DEGSEQ_LARGEST),
  135|    655|                IGRAPH_EINVAL);
  136|    655|            CHECK_ERROR(
  ------------------
  |  |    7|    655|    do { \
  |  |    8|    655|            igraph_error_handler_t *handler; \
  |  |    9|    655|            handler = igraph_set_error_handler(igraph_error_handler_ignore); \
  |  |   10|    655|            IGRAPH_ASSERT(funcall == expected_err); \
  |  |  ------------------
  |  |  |  |  916|    655|    do { \
  |  |  |  |  917|    655|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    655|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 655]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  |  |  ------------------
  |  |  |  |  919|      0|        } \
  |  |  |  |  920|    655|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   11|    655|            igraph_set_error_handler(handler); \
  |  |   12|    655|    } while (0)
  |  |  ------------------
  |  |  |  Branch (12:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  137|    655|                igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_SIMPLE_SW, IGRAPH_REALIZE_DEGSEQ_INDEX),
  138|    655|                IGRAPH_EINVAL);
  139|    655|        }
  140|  2.02k|        igraph_is_graphical(&iv1, NULL, IGRAPH_LOOPS_SW, &graphical);
  141|  2.02k|        if (!multi) {
  ------------------
  |  Branch (141:13): [True: 1.28k, False: 741]
  ------------------
  142|  1.28k|            IGRAPH_ASSERT(graphical);
  ------------------
  |  |  916|  1.28k|    do { \
  |  |  917|  1.28k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  919|      0|        } \
  |  |  920|  1.28k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  143|       |            /* Undirected realization is not yet implemented. */
  144|  1.28k|        }
  145|  2.02k|        igraph_is_graphical(&iv1, NULL, IGRAPH_MULTI_SW, &graphical);
  146|  2.02k|        if (!loop) {
  ------------------
  |  Branch (146:13): [True: 1.28k, False: 743]
  ------------------
  147|  1.28k|            IGRAPH_ASSERT(graphical);
  ------------------
  |  |  916|  1.28k|    do { \
  |  |  917|  1.28k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  919|      0|        } \
  |  |  920|  1.28k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  148|  1.28k|        }
  149|  2.02k|        if (graphical) {
  ------------------
  |  Branch (149:13): [True: 1.65k, False: 375]
  ------------------
  150|  1.65k|            igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_MULTI_SW, IGRAPH_REALIZE_DEGSEQ_SMALLEST);
  151|  1.65k|            igraph_destroy(&g);
  152|  1.65k|            igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_MULTI_SW, IGRAPH_REALIZE_DEGSEQ_LARGEST);
  153|  1.65k|            igraph_destroy(&g);
  154|  1.65k|            igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_MULTI_SW, IGRAPH_REALIZE_DEGSEQ_INDEX);
  155|  1.65k|            igraph_destroy(&g);
  156|  1.65k|        } else {
  157|    375|            CHECK_ERROR(
  ------------------
  |  |    7|    375|    do { \
  |  |    8|    375|            igraph_error_handler_t *handler; \
  |  |    9|    375|            handler = igraph_set_error_handler(igraph_error_handler_ignore); \
  |  |   10|    375|            IGRAPH_ASSERT(funcall == expected_err); \
  |  |  ------------------
  |  |  |  |  916|    375|    do { \
  |  |  |  |  917|    375|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    375|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 375]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  |  |  ------------------
  |  |  |  |  919|      0|        } \
  |  |  |  |  920|    375|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   11|    375|            igraph_set_error_handler(handler); \
  |  |   12|    375|    } while (0)
  |  |  ------------------
  |  |  |  Branch (12:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  158|    375|                igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_MULTI_SW, IGRAPH_REALIZE_DEGSEQ_SMALLEST),
  159|    375|                IGRAPH_EINVAL);
  160|    375|            CHECK_ERROR(
  ------------------
  |  |    7|    375|    do { \
  |  |    8|    375|            igraph_error_handler_t *handler; \
  |  |    9|    375|            handler = igraph_set_error_handler(igraph_error_handler_ignore); \
  |  |   10|    375|            IGRAPH_ASSERT(funcall == expected_err); \
  |  |  ------------------
  |  |  |  |  916|    375|    do { \
  |  |  |  |  917|    375|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    375|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 375]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  |  |  ------------------
  |  |  |  |  919|      0|        } \
  |  |  |  |  920|    375|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   11|    375|            igraph_set_error_handler(handler); \
  |  |   12|    375|    } while (0)
  |  |  ------------------
  |  |  |  Branch (12:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  161|    375|                igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_MULTI_SW, IGRAPH_REALIZE_DEGSEQ_LARGEST),
  162|    375|                IGRAPH_EINVAL);
  163|    375|            CHECK_ERROR(
  ------------------
  |  |    7|    375|    do { \
  |  |    8|    375|            igraph_error_handler_t *handler; \
  |  |    9|    375|            handler = igraph_set_error_handler(igraph_error_handler_ignore); \
  |  |   10|    375|            IGRAPH_ASSERT(funcall == expected_err); \
  |  |  ------------------
  |  |  |  |  916|    375|    do { \
  |  |  |  |  917|    375|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    375|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 375]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  |  |  ------------------
  |  |  |  |  919|      0|        } \
  |  |  |  |  920|    375|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   11|    375|            igraph_set_error_handler(handler); \
  |  |   12|    375|    } while (0)
  |  |  ------------------
  |  |  |  Branch (12:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  164|    375|                igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_MULTI_SW, IGRAPH_REALIZE_DEGSEQ_INDEX),
  165|    375|                IGRAPH_EINVAL);
  166|    375|        }
  167|  2.02k|        igraph_is_graphical(&iv1, NULL, IGRAPH_LOOPS_SW | IGRAPH_MULTI_SW, &graphical);
  168|  2.02k|        IGRAPH_ASSERT(graphical);
  ------------------
  |  |  916|  2.02k|    do { \
  |  |  917|  2.02k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  919|      0|        } \
  |  |  920|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  169|  2.02k|        igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_LOOPS_SW | IGRAPH_MULTI_SW, IGRAPH_REALIZE_DEGSEQ_SMALLEST);
  170|  2.02k|        igraph_destroy(&g);
  171|  2.02k|        igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_LOOPS_SW | IGRAPH_MULTI_SW, IGRAPH_REALIZE_DEGSEQ_LARGEST);
  172|  2.02k|        igraph_destroy(&g);
  173|  2.02k|        igraph_realize_degree_sequence(&g, &iv1, NULL, IGRAPH_LOOPS_SW | IGRAPH_MULTI_SW, IGRAPH_REALIZE_DEGSEQ_INDEX);
  174|  2.02k|        igraph_destroy(&g);
  175|       |
  176|       |        // These algorithms require a starting vertex,
  177|       |        // so we require the graph to have at least one vertex.
  178|  2.02k|        if (igraph_vcount(&graph) >= 1) {
  ------------------
  |  Branch (178:13): [True: 2.02k, False: 1]
  ------------------
  179|  2.02k|            igraph_distances(&graph, &m, igraph_vss_1(0), igraph_vss_all(), IGRAPH_ALL);
  180|  2.02k|            igraph_get_shortest_paths(&graph, &ivl1, &ivl2, 0, igraph_vss_all(), IGRAPH_ALL, &iv1, &iv2);
  181|  2.02k|            igraph_pseudo_diameter(&graph, &r, 0, &i, &i2, false, true);
  182|  2.02k|            igraph_bfs(&graph, 0, NULL, IGRAPH_ALL, true, NULL, &iv1, &iv2, &iv3, &iv4, NULL, &iv5, NULL, NULL);
  183|  2.02k|            igraph_dfs(&graph, 0, IGRAPH_ALL, true, &iv1, &iv2, &iv3, &iv4, NULL, NULL, NULL);
  184|  2.02k|            igraph_bfs_simple(&graph, 0, IGRAPH_ALL, &iv1, &iv2, &iv3);
  185|  2.02k|            igraph_subcomponent(&graph, &iv1, 0, IGRAPH_ALL);
  186|  2.02k|            igraph_degree_1(&graph, &i, 0, IGRAPH_OUT, true);
  187|  2.02k|            igraph_degree_1(&graph, &i, 0, IGRAPH_OUT, false);
  188|  2.02k|        }
  189|       |
  190|  2.02k|        if (igraph_vcount(&graph) >= 2) {
  ------------------
  |  Branch (190:13): [True: 2.01k, False: 15]
  ------------------
  191|  2.01k|            igraph_get_all_eids_between(&graph, &iv2, 1, 0, IGRAPH_UNDIRECTED);
  192|  2.01k|            igraph_get_all_eids_between(&graph, &iv2, 0, 0, IGRAPH_UNDIRECTED);
  193|       |
  194|  2.01k|            igraph_edges(&graph, igraph_ess_all(IGRAPH_EDGEORDER_FROM), &iv1);
  195|  2.01k|            igraph_vector_int_push_back(&iv1, 0);
  196|  2.01k|            igraph_vector_int_push_back(&iv1, 1);
  197|  2.01k|            igraph_vector_int_push_back(&iv1, 1);
  198|  2.01k|            igraph_vector_int_push_back(&iv1, 1);
  199|  2.01k|            igraph_get_eids(&graph, &iv2, &iv1, IGRAPH_UNDIRECTED, false);
  200|  2.01k|        }
  201|       |
  202|  2.02k|        igraph_is_eulerian(&graph, &b, &b2);
  203|  2.02k|        if (b) igraph_eulerian_path(&graph, &iv1, &iv2);
  ------------------
  |  Branch (203:13): [True: 882, False: 1.14k]
  ------------------
  204|  2.02k|        if (b2) igraph_eulerian_cycle(&graph, &iv1, &iv2);
  ------------------
  |  Branch (204:13): [True: 400, False: 1.62k]
  ------------------
  205|       |
  206|  2.02k|        igraph_vertex_coloring_greedy(&graph, &iv1, IGRAPH_COLORING_GREEDY_COLORED_NEIGHBORS);
  207|  2.02k|        igraph_vertex_coloring_greedy(&graph, &iv1, IGRAPH_COLORING_GREEDY_DSATUR);
  208|       |
  209|  2.02k|        igraph_connected_components(&graph, &iv1, &iv2, &i, IGRAPH_WEAK);
  210|  2.02k|        igraph_minimum_spanning_tree(&graph, &iv1, NULL, IGRAPH_MST_UNWEIGHTED);
  211|  2.02k|        igraph_subgraph_from_edges(&graph, &g, igraph_ess_vector(&iv1), false);
  212|  2.02k|        if (i == 1 && igraph_vcount(&g) >= 2) {
  ------------------
  |  Branch (212:13): [True: 189, False: 1.83k]
  |  Branch (212:23): [True: 175, False: 14]
  ------------------
  213|       |            // 'g' is a tree (not a forest) when 'graph' had exactly one
  214|       |            // connected component.
  215|    175|            igraph_to_prufer(&g, &iv1);
  216|       |
  217|    175|            igraph_t t;
  218|    175|            igraph_from_prufer(&t, &iv1);
  219|    175|            igraph_destroy(&t);
  220|    175|        }
  221|  2.02k|        igraph_destroy(&g);
  222|       |
  223|  2.02k|        if (igraph_vcount(&graph) >= 1) {
  ------------------
  |  Branch (223:13): [True: 2.02k, False: 1]
  ------------------
  224|  2.02k|            igraph_vector_int_resize(&iv1, 1);
  225|  2.02k|            VECTOR(iv1)[0] = 0;
  ------------------
  |  |   65|  2.02k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  226|  2.02k|            igraph_unfold_tree(&graph, &g, IGRAPH_ALL, &iv1, &iv2);
  227|  2.02k|            igraph_destroy(&g);
  228|  2.02k|        }
  229|       |
  230|  2.02k|        igraph_graph_list_init(&gl, 0);
  231|  2.02k|        igraph_decompose(&graph, &gl, IGRAPH_WEAK, -1, 4);
  232|  2.02k|        igraph_graph_list_destroy(&gl);
  233|       |
  234|  2.02k|        igraph_simplify(&graph, true, true, NULL);
  235|       |
  236|  2.02k|        if (igraph_vcount(&graph) >=1) {
  ------------------
  |  Branch (236:13): [True: 2.02k, False: 1]
  ------------------
  237|       |            // Run only on the simplified graph to avoid a very large number of
  238|       |            // shortest paths due to multi-edges.
  239|  2.02k|            igraph_get_all_shortest_paths(&graph, &ivl1, &ivl2, &iv1, 0, igraph_vss_all(), IGRAPH_ALL);
  240|  2.02k|        }
  241|       |
  242|       |        /* Basic graph modification */
  243|  2.02k|        igraph_add_vertices(&graph, 3, NULL);
  244|  2.02k|        igraph_degree_1(&graph, &i, 0, IGRAPH_ALL, IGRAPH_NO_LOOPS);
  245|  2.02k|        igraph_delete_vertices(&graph, igraph_vss_1(0));
  246|  2.02k|        igraph_add_edge(&graph, 0, 1);
  247|  2.02k|        igraph_count_multiple_1(&graph, &i, 0);
  248|  2.02k|        igraph_delete_edges(&graph, igraph_ess_1(0));
  249|       |
  250|  2.02k|        if (igraph_vcount(&graph) >= 4) {
  ------------------
  |  Branch (250:13): [True: 2.01k, False: 15]
  ------------------
  251|  2.01k|            igraph_rewire(&graph, igraph_ecount(&graph) + 1, IGRAPH_REWIRING_SIMPLE);
  252|  2.01k|        }
  253|       |
  254|  2.02k|        igraph_matrix_destroy(&m);
  255|  2.02k|        igraph_vector_bool_destroy(&bv);
  256|  2.02k|        igraph_vector_int_destroy(&iv5);
  257|  2.02k|        igraph_vector_int_destroy(&iv4);
  258|  2.02k|        igraph_vector_int_destroy(&iv3);
  259|  2.02k|        igraph_vector_int_destroy(&iv2);
  260|  2.02k|        igraph_vector_int_destroy(&iv1);
  261|  2.02k|        igraph_vector_int_list_destroy(&ivl2);
  262|  2.02k|        igraph_vector_int_list_destroy(&ivl1);
  263|       |
  264|  2.02k|        igraph_destroy(&graph);
  265|  2.02k|    }
  266|       |
  267|  2.02k|    igraph_vector_int_destroy(&edges);
  268|       |
  269|  2.02k|    IGRAPH_ASSERT(IGRAPH_FINALLY_STACK_EMPTY);
  ------------------
  |  |  916|  2.02k|    do { \
  |  |  917|  2.02k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  919|      0|        } \
  |  |  920|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  270|       |
  271|  2.02k|    return 0;  // Non-zero return values are reserved for future use.
  272|  2.02k|}

igraph_coreness:
   57|  2.02k|        igraph_vector_int_t *cores, igraph_neimode_t mode) {
   58|       |
   59|  2.02k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
   60|  2.02k|    igraph_integer_t *bin, *vert, *pos;
   61|  2.02k|    igraph_integer_t maxdeg;
   62|  2.02k|    igraph_vector_int_t neis;
   63|  2.02k|    igraph_neimode_t omode;
   64|       |
   65|  2.02k|    if (mode != IGRAPH_ALL && mode != IGRAPH_OUT && mode != IGRAPH_IN) {
  ------------------
  |  Branch (65:9): [True: 0, False: 2.02k]
  |  Branch (65:31): [True: 0, False: 0]
  |  Branch (65:53): [True: 0, False: 0]
  ------------------
   66|      0|        IGRAPH_ERROR("Invalid mode in k-cores.", IGRAPH_EINVMODE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   67|      0|    }
   68|  2.02k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (68:9): [True: 2.02k, False: 0]
  ------------------
   69|  2.02k|        mode = IGRAPH_ALL;
   70|  2.02k|    }
   71|  2.02k|    omode = IGRAPH_REVERSE_MODE(mode);
  ------------------
  |  |   55|  2.02k|    ((mode) == IGRAPH_IN ? IGRAPH_OUT : ((mode) == IGRAPH_OUT ? IGRAPH_IN : (mode)))
  |  |  ------------------
  |  |  |  Branch (55:6): [True: 0, False: 2.02k]
  |  |  |  Branch (55:42): [True: 0, False: 2.02k]
  |  |  ------------------
  ------------------
   72|       |
   73|       |    /* catch null graph */
   74|  2.02k|    if (no_of_nodes == 0) {
  ------------------
  |  Branch (74:9): [True: 1, False: 2.02k]
  ------------------
   75|      1|        igraph_vector_int_clear(cores);
   76|      1|        return IGRAPH_SUCCESS;
   77|      1|    }
   78|       |
   79|  2.02k|    vert = IGRAPH_CALLOC(no_of_nodes, igraph_integer_t);
  ------------------
  |  |   38|  2.02k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  4.05k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 2.02k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 2.02k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 2.02k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   80|  2.02k|    IGRAPH_CHECK_OOM(vert, "Insufficient memory for k-cores.");
  ------------------
  |  |  701|  2.02k|    do { \
  |  |  702|  2.02k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   81|  2.02k|    IGRAPH_FINALLY(igraph_free, vert);
  ------------------
  |  |  591|  2.02k|    do { \
  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   82|       |
   83|  2.02k|    pos = IGRAPH_CALLOC(no_of_nodes, igraph_integer_t);
  ------------------
  |  |   38|  2.02k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  4.05k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 2.02k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 2.02k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 2.02k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   84|  2.02k|    IGRAPH_CHECK_OOM(pos, "Insufficient memory for k-cores.");
  ------------------
  |  |  701|  2.02k|    do { \
  |  |  702|  2.02k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   85|  2.02k|    IGRAPH_FINALLY(igraph_free, pos);
  ------------------
  |  |  591|  2.02k|    do { \
  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   86|       |
   87|       |    /* maximum degree + degree of vertices */
   88|  2.02k|    IGRAPH_CHECK(igraph_degree(graph, cores, igraph_vss_all(), mode, /* loops= */ true));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   89|       |
   90|       |    /* null graph was already handled earlier, 'cores' is not empty */
   91|  2.02k|    maxdeg = igraph_vector_int_max(cores);
   92|       |
   93|  2.02k|    bin = IGRAPH_CALLOC(maxdeg + 1, igraph_integer_t);
  ------------------
  |  |   38|  2.02k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  4.05k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 2.02k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 2.02k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 2.02k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   94|  2.02k|    IGRAPH_CHECK_OOM(bin, "Insufficient memory for k-cores.");
  ------------------
  |  |  701|  2.02k|    do { \
  |  |  702|  2.02k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   95|  2.02k|    IGRAPH_FINALLY(igraph_free, bin);
  ------------------
  |  |  591|  2.02k|    do { \
  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   96|       |
   97|       |    /* degree histogram */
   98|   351k|    for (igraph_integer_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (98:34): [True: 349k, False: 2.02k]
  ------------------
   99|   349k|        bin[ VECTOR(*cores)[i] ] += 1;
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  100|   349k|    }
  101|       |
  102|       |    /* start pointers */
  103|  57.9k|    for (igraph_integer_t d = 0, start = 0; d <= maxdeg; d++) {
  ------------------
  |  Branch (103:45): [True: 55.9k, False: 2.02k]
  ------------------
  104|  55.9k|        igraph_integer_t k = bin[d];
  105|  55.9k|        bin[d] = start;
  106|  55.9k|        start += k;
  107|  55.9k|    }
  108|       |
  109|       |    /* sort in vert (and corrupt bin) */
  110|   351k|    for (igraph_integer_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (110:34): [True: 349k, False: 2.02k]
  ------------------
  111|   349k|        pos[i] = bin[VECTOR(*cores)[i]];
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  112|   349k|        vert[pos[i]] = i;
  113|   349k|        bin[VECTOR(*cores)[i]] += 1;
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  114|   349k|    }
  115|       |
  116|       |    /* correct bin */
  117|  55.9k|    for (igraph_integer_t d = maxdeg; d > 0; d--) {
  ------------------
  |  Branch (117:39): [True: 53.8k, False: 2.02k]
  ------------------
  118|  53.8k|        bin[d] = bin[d - 1];
  119|  53.8k|    }
  120|  2.02k|    bin[0] = 0;
  121|       |
  122|       |    /* this is the main algorithm */
  123|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, maxdeg);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  124|   351k|    for (igraph_integer_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (124:34): [True: 349k, False: 2.02k]
  ------------------
  125|   349k|        igraph_integer_t v = vert[i];
  126|   349k|        IGRAPH_CHECK(igraph_neighbors(graph, &neis, v, omode));
  ------------------
  |  |  648|   349k|    do { \
  |  |  649|   349k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   349k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   349k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 349k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   349k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  127|   349k|        igraph_integer_t nei_count = igraph_vector_int_size(&neis);
  128|   499k|        for (igraph_integer_t j = 0; j < nei_count; j++) {
  ------------------
  |  Branch (128:38): [True: 149k, False: 349k]
  ------------------
  129|   149k|            igraph_integer_t u = VECTOR(neis)[j];
  ------------------
  |  |   65|   149k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  130|   149k|            if (VECTOR(*cores)[u] > VECTOR(*cores)[v]) {
  ------------------
  |  |   65|   149k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (VECTOR(*cores)[u] > VECTOR(*cores)[v]) {
  ------------------
  |  |   65|   149k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (130:17): [True: 40.3k, False: 109k]
  ------------------
  131|  40.3k|                igraph_integer_t du = VECTOR(*cores)[u];
  ------------------
  |  |   65|  40.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  132|  40.3k|                igraph_integer_t pu = pos[u];
  133|  40.3k|                igraph_integer_t pw = bin[du];
  134|  40.3k|                igraph_integer_t w = vert[pw];
  135|  40.3k|                if (u != w) {
  ------------------
  |  Branch (135:21): [True: 13.2k, False: 27.0k]
  ------------------
  136|  13.2k|                    pos[u] = pw;
  137|  13.2k|                    pos[w] = pu;
  138|  13.2k|                    vert[pu] = w;
  139|  13.2k|                    vert[pw] = u;
  140|  13.2k|                }
  141|  40.3k|                bin[du] += 1;
  142|  40.3k|                VECTOR(*cores)[u] -= 1;
  ------------------
  |  |   65|  40.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  143|  40.3k|            }
  144|   149k|        }
  145|   349k|    }
  146|       |
  147|  2.02k|    igraph_vector_int_destroy(&neis);
  148|  2.02k|    IGRAPH_FINALLY_CLEAN(1);
  149|       |
  150|  2.02k|    igraph_free(bin);
  151|  2.02k|    igraph_free(pos);
  152|  2.02k|    igraph_free(vert);
  153|  2.02k|    IGRAPH_FINALLY_CLEAN(3);
  154|       |
  155|  2.02k|    return IGRAPH_SUCCESS;
  156|  2.02k|}

igraph_connected_components:
   87|  5.01k|) {
   88|  5.01k|    if (mode == IGRAPH_WEAK || !igraph_is_directed(graph)) {
  ------------------
  |  Branch (88:9): [True: 5.01k, False: 0]
  |  Branch (88:32): [True: 0, False: 0]
  ------------------
   89|  5.01k|        return igraph_i_connected_components_weak(graph, membership, csize, no);
   90|  5.01k|    } else if (mode == IGRAPH_STRONG) {
  ------------------
  |  Branch (90:16): [True: 0, False: 0]
  ------------------
   91|      0|        return igraph_i_connected_components_strong(graph, membership, csize, no);
   92|      0|    }
   93|       |
   94|      0|    IGRAPH_ERROR("Invalid connectedness mode.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   95|      0|}
igraph_is_connected:
  433|  1.66k|                        igraph_connectedness_t mode) {
  434|       |
  435|  1.66k|    igraph_cached_property_t prop;
  436|  1.66k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  437|  1.66k|    igraph_integer_t no;
  438|       |
  439|  1.66k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (439:9): [True: 1.66k, False: 0]
  ------------------
  440|  1.66k|        mode = IGRAPH_WEAK;
  441|  1.66k|    }
  442|       |
  443|  1.66k|    switch (mode) {
  444|  1.66k|        case IGRAPH_WEAK:
  ------------------
  |  Branch (444:9): [True: 1.66k, False: 0]
  ------------------
  445|  1.66k|            prop = IGRAPH_PROP_IS_WEAKLY_CONNECTED;
  446|  1.66k|            break;
  447|       |
  448|      0|        case IGRAPH_STRONG:
  ------------------
  |  Branch (448:9): [True: 0, False: 1.66k]
  ------------------
  449|      0|            prop = IGRAPH_PROP_IS_STRONGLY_CONNECTED;
  450|      0|            break;
  451|       |
  452|      0|        default:
  ------------------
  |  Branch (452:9): [True: 0, False: 1.66k]
  ------------------
  453|      0|            IGRAPH_ERROR("Invalid connectedness mode.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  454|  1.66k|    }
  455|       |
  456|  1.66k|    IGRAPH_RETURN_IF_CACHED_BOOL(graph, prop, res);
  ------------------
  |  |   95|  1.66k|    do { \
  |  |   96|  1.66k|        if (igraph_i_property_cache_has((graphptr), (prop))) { \
  |  |  ------------------
  |  |  |  Branch (96:13): [True: 0, False: 1.66k]
  |  |  ------------------
  |  |   97|      0|            *(resptr) = igraph_i_property_cache_get_bool((graphptr), (prop)); \
  |  |   98|      0|            return IGRAPH_SUCCESS; \
  |  |   99|      0|        } \
  |  |  100|  1.66k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (100:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  457|       |
  458|  1.66k|    if (no_of_nodes == 0) {
  ------------------
  |  Branch (458:9): [True: 0, False: 1.66k]
  ------------------
  459|       |        /* Changed in igraph 0.9; see https://github.com/igraph/igraph/issues/1539
  460|       |         * for the reasoning behind the change */
  461|      0|        *res = false;
  462|  1.66k|    } else if (no_of_nodes == 1) {
  ------------------
  |  Branch (462:16): [True: 0, False: 1.66k]
  ------------------
  463|      0|        *res = true;
  464|  1.66k|    } else if (mode == IGRAPH_WEAK) {
  ------------------
  |  Branch (464:16): [True: 1.66k, False: 0]
  ------------------
  465|  1.66k|        IGRAPH_CHECK(igraph_i_is_connected_weak(graph, res));
  ------------------
  |  |  648|  1.66k|    do { \
  |  |  649|  1.66k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.66k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.66k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.66k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.66k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  466|  1.66k|    } else {   /* mode == IGRAPH_STRONG */
  467|       |        /* A strongly connected graph has at least as many edges as vertices,
  468|       |         * except for the singleton graph, which is handled above. */
  469|      0|        if (igraph_ecount(graph) < no_of_nodes) {
  ------------------
  |  Branch (469:13): [True: 0, False: 0]
  ------------------
  470|      0|            *res = false;
  471|      0|        } else {
  472|      0|            IGRAPH_CHECK(igraph_i_connected_components_strong(graph, NULL, NULL, &no));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  473|      0|            *res = (no == 1);
  474|      0|        }
  475|      0|    }
  476|       |
  477|       |    /* Cache updates are done in igraph_i_connected_components_strong() and
  478|       |     * igraph_i_is_connected_weak() because those might be called from other
  479|       |     * places and we want to make use of the caching if so */
  480|       |
  481|  1.66k|    return IGRAPH_SUCCESS;
  482|  1.66k|}
igraph_decompose:
  603|  2.02k|                     igraph_integer_t maxcompno, igraph_integer_t minelements) {
  604|  2.02k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (604:9): [True: 2.02k, False: 0]
  ------------------
  605|  2.02k|        mode = IGRAPH_WEAK;
  606|  2.02k|    }
  607|       |
  608|  2.02k|    switch (mode) {
  609|  2.02k|    case IGRAPH_WEAK:
  ------------------
  |  Branch (609:5): [True: 2.02k, False: 0]
  ------------------
  610|  2.02k|        return igraph_i_decompose_weak(graph, components, maxcompno, minelements);
  611|      0|    case IGRAPH_STRONG:
  ------------------
  |  Branch (611:5): [True: 0, False: 2.02k]
  ------------------
  612|      0|        return igraph_i_decompose_strong(graph, components, maxcompno, minelements);
  613|      0|    default:
  ------------------
  |  Branch (613:5): [True: 0, False: 2.02k]
  ------------------
  614|      0|        IGRAPH_ERROR("Invalid connectedness mode.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  615|  2.02k|    }
  616|  2.02k|}
igraph_biconnected_components:
 1033|  2.02k|                                  igraph_vector_int_t *articulation_points) {
 1034|       |
 1035|  2.02k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
 1036|  2.02k|    igraph_vector_int_t nextptr;
 1037|  2.02k|    igraph_vector_int_t num, low;
 1038|  2.02k|    igraph_bitset_t found;
 1039|  2.02k|    igraph_vector_int_t *adjedges;
 1040|  2.02k|    igraph_stack_int_t path;
 1041|  2.02k|    igraph_stack_int_t edgestack;
 1042|  2.02k|    igraph_inclist_t inclist;
 1043|  2.02k|    igraph_integer_t counter, rootdfs = 0;
 1044|  2.02k|    igraph_vector_int_t vertex_added;
 1045|  2.02k|    igraph_integer_t comps = 0;
 1046|  2.02k|    igraph_vector_int_list_t *mycomponents = components, vcomponents;
 1047|       |
 1048|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&nextptr, no_of_nodes);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1049|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&num, no_of_nodes);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1050|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&low, no_of_nodes);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1051|  2.02k|    IGRAPH_BITSET_INIT_FINALLY(&found, no_of_nodes);
  ------------------
  |  |  261|  2.02k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  262|  2.02k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  263|  2.02k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (263:62): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1052|       |
 1053|  2.02k|    IGRAPH_STACK_INT_INIT_FINALLY(&path, 100);
  ------------------
  |  |   66|  2.02k|    do { IGRAPH_CHECK(igraph_stack_int_init(s, capacity)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   67|  2.02k|        IGRAPH_FINALLY(igraph_stack_int_destroy, s); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (67:63): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1054|  2.02k|    IGRAPH_STACK_INT_INIT_FINALLY(&edgestack, 100);
  ------------------
  |  |   66|  2.02k|    do { IGRAPH_CHECK(igraph_stack_int_init(s, capacity)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   67|  2.02k|        IGRAPH_FINALLY(igraph_stack_int_destroy, s); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (67:63): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1055|       |
 1056|  2.02k|    IGRAPH_CHECK(igraph_inclist_init(graph, &inclist, IGRAPH_ALL, IGRAPH_LOOPS_TWICE));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1057|  2.02k|    IGRAPH_FINALLY(igraph_inclist_destroy, &inclist);
  ------------------
  |  |  591|  2.02k|    do { \
  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1058|       |
 1059|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&vertex_added, no_of_nodes);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1060|       |
 1061|  2.02k|    if (no) {
  ------------------
  |  Branch (1061:9): [True: 2.02k, False: 0]
  ------------------
 1062|  2.02k|        *no = 0;
 1063|  2.02k|    }
 1064|  2.02k|    if (tree_edges) {
  ------------------
  |  Branch (1064:9): [True: 0, False: 2.02k]
  ------------------
 1065|      0|        igraph_vector_int_list_clear(tree_edges);
 1066|      0|    }
 1067|  2.02k|    if (components) {
  ------------------
  |  Branch (1067:9): [True: 2.02k, False: 0]
  ------------------
 1068|  2.02k|        igraph_vector_int_list_clear(components);
 1069|  2.02k|    }
 1070|  2.02k|    if (component_edges) {
  ------------------
  |  Branch (1070:9): [True: 2.02k, False: 0]
  ------------------
 1071|  2.02k|        igraph_vector_int_list_clear(component_edges);
 1072|  2.02k|    }
 1073|  2.02k|    if (articulation_points) {
  ------------------
  |  Branch (1073:9): [True: 2.02k, False: 0]
  ------------------
 1074|  2.02k|        igraph_vector_int_clear(articulation_points);
 1075|  2.02k|    }
 1076|  2.02k|    if (component_edges && !components) {
  ------------------
  |  Branch (1076:9): [True: 2.02k, False: 0]
  |  Branch (1076:28): [True: 0, False: 2.02k]
  ------------------
 1077|      0|        mycomponents = &vcomponents;
 1078|      0|        IGRAPH_VECTOR_INT_LIST_INIT_FINALLY(mycomponents, 0);
  ------------------
  |  |   62|      0|    do { IGRAPH_CHECK(igraph_vector_int_list_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|        IGRAPH_FINALLY(igraph_vector_int_list_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (63:69): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1079|      0|    }
 1080|       |
 1081|   351k|    for (igraph_integer_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (1081:34): [True: 349k, False: 2.02k]
  ------------------
 1082|       |
 1083|   349k|        if (VECTOR(low)[i] != 0) {
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1083:13): [True: 46.9k, False: 302k]
  ------------------
 1084|  46.9k|            continue;    /* already visited */
 1085|  46.9k|        }
 1086|       |
 1087|   302k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|   302k|    do { \
  |  |   48|   302k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 302k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|   302k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1088|       |
 1089|   302k|        IGRAPH_CHECK(igraph_stack_int_push(&path, i));
  ------------------
  |  |  648|   302k|    do { \
  |  |  649|   302k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   302k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   302k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 302k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   302k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1090|   302k|        counter = 1;
 1091|   302k|        rootdfs = 0;
 1092|   302k|        VECTOR(low)[i] = VECTOR(num)[i] = counter++;
  ------------------
  |  |   65|   302k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(low)[i] = VECTOR(num)[i] = counter++;
  ------------------
  |  |   65|   302k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1093|   801k|        while (!igraph_stack_int_empty(&path)) {
  ------------------
  |  Branch (1093:16): [True: 499k, False: 302k]
  ------------------
 1094|   499k|            igraph_integer_t n;
 1095|   499k|            igraph_integer_t act = igraph_stack_int_top(&path);
 1096|   499k|            igraph_integer_t actnext = VECTOR(nextptr)[act];
  ------------------
  |  |   65|   499k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1097|       |
 1098|   499k|            adjedges = igraph_inclist_get(&inclist, act);
  ------------------
  |  |  107|   499k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_integer_t)(no)])
  ------------------
 1099|   499k|            n = igraph_vector_int_size(adjedges);
 1100|   499k|            if (actnext < n) {
  ------------------
  |  Branch (1100:17): [True: 149k, False: 349k]
  ------------------
 1101|       |                /* Step down (maybe) */
 1102|   149k|                igraph_integer_t edge = VECTOR(*adjedges)[actnext];
  ------------------
  |  |   65|   149k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1103|   149k|                igraph_integer_t nei = IGRAPH_OTHER(graph, edge, act);
  ------------------
  |  |  144|   149k|    ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|   149k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|   149k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  113|  90.1k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  90.1k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  59.7k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  59.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:25): [True: 90.1k, False: 59.7k]
  |  |  ------------------
  ------------------
 1104|   149k|                if (VECTOR(low)[nei] == 0) {
  ------------------
  |  |   65|   149k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1104:21): [True: 46.9k, False: 103k]
  ------------------
 1105|  46.9k|                    if (act == i) {
  ------------------
  |  Branch (1105:25): [True: 11.4k, False: 35.4k]
  ------------------
 1106|  11.4k|                        rootdfs++;
 1107|  11.4k|                    }
 1108|  46.9k|                    IGRAPH_CHECK(igraph_stack_int_push(&edgestack, edge));
  ------------------
  |  |  648|  46.9k|    do { \
  |  |  649|  46.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  46.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  46.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 46.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  46.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1109|  46.9k|                    IGRAPH_CHECK(igraph_stack_int_push(&path, nei));
  ------------------
  |  |  648|  46.9k|    do { \
  |  |  649|  46.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  46.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  46.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 46.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  46.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1110|  46.9k|                    VECTOR(low)[nei] = VECTOR(num)[nei] = counter++;
  ------------------
  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(low)[nei] = VECTOR(num)[nei] = counter++;
  ------------------
  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1111|   103k|                } else {
 1112|       |                    /* Update low value if needed */
 1113|   103k|                    if (VECTOR(num)[nei] < VECTOR(low)[act]) {
  ------------------
  |  |   65|   103k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  if (VECTOR(num)[nei] < VECTOR(low)[act]) {
  ------------------
  |  |   65|   103k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1113:25): [True: 45.4k, False: 57.5k]
  ------------------
 1114|  45.4k|                        VECTOR(low)[act] = VECTOR(num)[nei];
  ------------------
  |  |   65|  45.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      VECTOR(low)[act] = VECTOR(num)[nei];
  ------------------
  |  |   65|  45.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1115|  45.4k|                    }
 1116|   103k|                }
 1117|   149k|                VECTOR(nextptr)[act] += 1;
  ------------------
  |  |   65|   149k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1118|   349k|            } else {
 1119|       |                /* Step up */
 1120|   349k|                igraph_stack_int_pop(&path);
 1121|   349k|                if (!igraph_stack_int_empty(&path)) {
  ------------------
  |  Branch (1121:21): [True: 46.9k, False: 302k]
  ------------------
 1122|  46.9k|                    igraph_integer_t prev = igraph_stack_int_top(&path);
 1123|       |                    /* Update LOW value if needed */
 1124|  46.9k|                    if (VECTOR(low)[act] < VECTOR(low)[prev]) {
  ------------------
  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  if (VECTOR(low)[act] < VECTOR(low)[prev]) {
  ------------------
  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1124:25): [True: 5.08k, False: 41.8k]
  ------------------
 1125|  5.08k|                        VECTOR(low)[prev] = VECTOR(low)[act];
  ------------------
  |  |   65|  5.08k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      VECTOR(low)[prev] = VECTOR(low)[act];
  ------------------
  |  |   65|  5.08k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1126|  5.08k|                    }
 1127|       |                    /* Check for articulation point */
 1128|  46.9k|                    if (VECTOR(low)[act] >= VECTOR(num)[prev]) {
  ------------------
  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  if (VECTOR(low)[act] >= VECTOR(num)[prev]) {
  ------------------
  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1128:25): [True: 39.6k, False: 7.24k]
  ------------------
 1129|  39.6k|                        if (articulation_points && !IGRAPH_BIT_TEST(found, prev)
  ------------------
  |  |  144|  79.3k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  39.6k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  39.6k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  39.6k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  39.6k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  39.6k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1129:29): [True: 39.6k, False: 0]
  |  Branch (1129:52): [True: 22.8k, False: 16.8k]
  ------------------
 1130|  39.6k|                            && prev != i /* the root */) {
  ------------------
  |  Branch (1130:32): [True: 11.3k, False: 11.4k]
  ------------------
 1131|  11.3k|                            IGRAPH_CHECK(igraph_vector_int_push_back(articulation_points, prev));
  ------------------
  |  |  648|  11.3k|    do { \
  |  |  649|  11.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  11.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  11.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 11.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  11.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1132|  11.3k|                            IGRAPH_BIT_SET(found, prev);
  ------------------
  |  |  105|  11.3k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  11.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  11.3k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.3k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  11.3k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.3k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1133|  11.3k|                        }
 1134|  39.6k|                        if (no) {
  ------------------
  |  Branch (1134:29): [True: 39.6k, False: 0]
  ------------------
 1135|  39.6k|                            *no += 1;
 1136|  39.6k|                        }
 1137|       |
 1138|       |                        /*------------------------------------*/
 1139|       |                        /* Record the biconnected component just found */
 1140|  39.6k|                        if (tree_edges || mycomponents) {
  ------------------
  |  Branch (1140:29): [True: 0, False: 39.6k]
  |  Branch (1140:43): [True: 39.6k, False: 0]
  ------------------
 1141|  39.6k|                            igraph_vector_int_t *v, *v2;
 1142|  39.6k|                            comps++;
 1143|  39.6k|                            if (tree_edges) {
  ------------------
  |  Branch (1143:33): [True: 0, False: 39.6k]
  ------------------
 1144|      0|                                IGRAPH_CHECK(igraph_vector_int_list_push_back_new(tree_edges, &v));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1145|      0|                            }
 1146|  39.6k|                            if (mycomponents) {
  ------------------
  |  Branch (1146:33): [True: 39.6k, False: 0]
  ------------------
 1147|  39.6k|                                IGRAPH_CHECK(igraph_vector_int_list_push_back_new(mycomponents, &v2));
  ------------------
  |  |  648|  39.6k|    do { \
  |  |  649|  39.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  39.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  39.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 39.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  39.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1148|  39.6k|                            }
 1149|       |
 1150|  46.9k|                            while (!igraph_stack_int_empty(&edgestack)) {
  ------------------
  |  Branch (1150:36): [True: 46.9k, False: 0]
  ------------------
 1151|  46.9k|                                igraph_integer_t e = igraph_stack_int_pop(&edgestack);
 1152|  46.9k|                                igraph_integer_t from = IGRAPH_FROM(graph, e);
  ------------------
  |  |  113|  46.9k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1153|  46.9k|                                igraph_integer_t to = IGRAPH_TO(graph, e);
  ------------------
  |  |  126|  46.9k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1154|  46.9k|                                if (tree_edges) {
  ------------------
  |  Branch (1154:37): [True: 0, False: 46.9k]
  ------------------
 1155|      0|                                    IGRAPH_CHECK(igraph_vector_int_push_back(v, e));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1156|      0|                                }
 1157|  46.9k|                                if (mycomponents) {
  ------------------
  |  Branch (1157:37): [True: 46.9k, False: 0]
  ------------------
 1158|  46.9k|                                    if (VECTOR(vertex_added)[from] != comps) {
  ------------------
  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1158:41): [True: 43.2k, False: 3.64k]
  ------------------
 1159|  43.2k|                                        VECTOR(vertex_added)[from] = comps;
  ------------------
  |  |   65|  43.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1160|  43.2k|                                        IGRAPH_CHECK(igraph_vector_int_push_back(v2, from));
  ------------------
  |  |  648|  43.2k|    do { \
  |  |  649|  43.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  43.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  43.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 43.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  43.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1161|  43.2k|                                    }
 1162|  46.9k|                                    if (VECTOR(vertex_added)[to] != comps) {
  ------------------
  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1162:41): [True: 43.3k, False: 3.59k]
  ------------------
 1163|  43.3k|                                        VECTOR(vertex_added)[to] = comps;
  ------------------
  |  |   65|  43.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1164|  43.3k|                                        IGRAPH_CHECK(igraph_vector_int_push_back(v2, to));
  ------------------
  |  |  648|  43.3k|    do { \
  |  |  649|  43.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  43.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  43.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 43.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  43.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1165|  43.3k|                                    }
 1166|  46.9k|                                }
 1167|  46.9k|                                if (from == prev || to == prev) {
  ------------------
  |  Branch (1167:37): [True: 10.2k, False: 36.6k]
  |  Branch (1167:53): [True: 29.4k, False: 7.24k]
  ------------------
 1168|  39.6k|                                    break;
 1169|  39.6k|                                }
 1170|  46.9k|                            }
 1171|       |
 1172|  39.6k|                            if (component_edges) {
  ------------------
  |  Branch (1172:33): [True: 39.6k, False: 0]
  ------------------
 1173|  39.6k|                                igraph_vector_int_t *nodes = igraph_vector_int_list_get_ptr(mycomponents, comps - 1);
 1174|  39.6k|                                igraph_integer_t ii, no_vert = igraph_vector_int_size(nodes);
 1175|  39.6k|                                igraph_vector_int_t *vv;
 1176|       |
 1177|  39.6k|                                IGRAPH_CHECK(igraph_vector_int_list_push_back_new(component_edges, &vv));
  ------------------
  |  |  648|  39.6k|    do { \
  |  |  649|  39.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  39.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  39.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 39.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  39.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1178|   126k|                                for (ii = 0; ii < no_vert; ii++) {
  ------------------
  |  Branch (1178:46): [True: 86.6k, False: 39.6k]
  ------------------
 1179|  86.6k|                                    igraph_integer_t vert = VECTOR(*nodes)[ii];
  ------------------
  |  |   65|  86.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1180|  86.6k|                                    igraph_vector_int_t *edges = igraph_inclist_get(&inclist,
  ------------------
  |  |  107|  86.6k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_integer_t)(no)])
  ------------------
 1181|  86.6k|                                                                 vert);
 1182|  86.6k|                                    igraph_integer_t j, nn = igraph_vector_int_size(edges);
 1183|  1.70M|                                    for (j = 0; j < nn; j++) {
  ------------------
  |  Branch (1183:49): [True: 1.61M, False: 86.6k]
  ------------------
 1184|  1.61M|                                        igraph_integer_t e = VECTOR(*edges)[j];
  ------------------
  |  |   65|  1.61M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1185|  1.61M|                                        igraph_integer_t nei = IGRAPH_OTHER(graph, e, vert);
  ------------------
  |  |  144|  1.61M|    ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  1.61M|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  1.61M|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  113|  1.23M|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  1.23M|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|   382k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|   382k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:25): [True: 1.23M, False: 382k]
  |  |  ------------------
  ------------------
 1186|  1.61M|                                        if (VECTOR(vertex_added)[nei] == comps && nei < vert) {
  ------------------
  |  |   65|  1.61M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1186:45): [True: 169k, False: 1.44M]
  |  Branch (1186:83): [True: 59.7k, False: 109k]
  ------------------
 1187|  59.7k|                                            IGRAPH_CHECK(igraph_vector_int_push_back(vv, e));
  ------------------
  |  |  648|  59.7k|    do { \
  |  |  649|  59.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  59.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  59.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 59.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  59.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1188|  59.7k|                                        }
 1189|  1.61M|                                    }
 1190|  86.6k|                                }
 1191|  39.6k|                            }
 1192|  39.6k|                        } /* record component if requested */
 1193|       |                        /*------------------------------------*/
 1194|       |
 1195|  39.6k|                    }
 1196|  46.9k|                } /* !igraph_stack_int_empty(&path) */
 1197|   349k|            }
 1198|       |
 1199|   499k|        } /* !igraph_stack_int_empty(&path) */
 1200|       |
 1201|   302k|        if (articulation_points && rootdfs >= 2) {
  ------------------
  |  Branch (1201:13): [True: 302k, False: 0]
  |  Branch (1201:36): [True: 1.30k, False: 301k]
  ------------------
 1202|  1.30k|            IGRAPH_CHECK(igraph_vector_int_push_back(articulation_points, i));
  ------------------
  |  |  648|  1.30k|    do { \
  |  |  649|  1.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1203|  1.30k|        }
 1204|       |
 1205|   302k|    } /* i < no_of_nodes */
 1206|       |
 1207|  2.02k|    if (mycomponents != components) {
  ------------------
  |  Branch (1207:9): [True: 0, False: 2.02k]
  ------------------
 1208|      0|        igraph_vector_int_list_destroy(mycomponents);
 1209|      0|        IGRAPH_FINALLY_CLEAN(1);
 1210|      0|    }
 1211|       |
 1212|  2.02k|    igraph_vector_int_destroy(&vertex_added);
 1213|  2.02k|    igraph_inclist_destroy(&inclist);
 1214|  2.02k|    igraph_stack_int_destroy(&edgestack);
 1215|  2.02k|    igraph_stack_int_destroy(&path);
 1216|  2.02k|    igraph_bitset_destroy(&found);
 1217|  2.02k|    igraph_vector_int_destroy(&low);
 1218|  2.02k|    igraph_vector_int_destroy(&num);
 1219|  2.02k|    igraph_vector_int_destroy(&nextptr);
 1220|  2.02k|    IGRAPH_FINALLY_CLEAN(8);
 1221|       |
 1222|  2.02k|    return IGRAPH_SUCCESS;
 1223|  2.02k|}
igraph_bridges:
 1396|  2.02k|igraph_error_t igraph_bridges(const igraph_t *graph, igraph_vector_int_t *bridges) {
 1397|       |
 1398|       |    /* The algorithm is based on https://www.geeksforgeeks.org/bridge-in-a-graph/
 1399|       |       but instead of keeping track of the parent of each vertex in the DFS tree
 1400|       |       we keep track of its incoming edge. This is necessary to support multigraphs.
 1401|       |       Additionally, we use explicit stacks instead of recursion to avoid
 1402|       |       stack overflow. */
 1403|       |
 1404|  2.02k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
 1405|  2.02k|    igraph_inclist_t il;
 1406|  2.02k|    igraph_bitset_t visited;
 1407|  2.02k|    igraph_vector_int_t vis; /* vis[u] time when vertex u was first visited */
 1408|  2.02k|    igraph_vector_int_t low; /* low[u] is the lowest visit time of vertices reachable from u */
 1409|  2.02k|    igraph_vector_int_t incoming_edge;
 1410|  2.02k|    igraph_stack_int_t su, si;
 1411|  2.02k|    igraph_integer_t time;
 1412|       |
 1413|  2.02k|    IGRAPH_CHECK(igraph_inclist_init(graph, &il, IGRAPH_ALL, IGRAPH_LOOPS_TWICE));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1414|  2.02k|    IGRAPH_FINALLY(igraph_inclist_destroy, &il);
  ------------------
  |  |  591|  2.02k|    do { \
  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1415|       |
 1416|       |
 1417|  2.02k|    IGRAPH_BITSET_INIT_FINALLY(&visited, no_of_nodes);
  ------------------
  |  |  261|  2.02k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  262|  2.02k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  263|  2.02k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (263:62): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1418|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&vis, no_of_nodes);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1419|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&low, no_of_nodes);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1420|       |
 1421|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&incoming_edge, no_of_nodes);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1422|  2.02k|    igraph_vector_int_fill(&incoming_edge, -1);
 1423|       |
 1424|  2.02k|    IGRAPH_STACK_INT_INIT_FINALLY(&su, 0);
  ------------------
  |  |   66|  2.02k|    do { IGRAPH_CHECK(igraph_stack_int_init(s, capacity)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   67|  2.02k|        IGRAPH_FINALLY(igraph_stack_int_destroy, s); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (67:63): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1425|  2.02k|    IGRAPH_STACK_INT_INIT_FINALLY(&si, 0);
  ------------------
  |  |   66|  2.02k|    do { IGRAPH_CHECK(igraph_stack_int_init(s, capacity)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   67|  2.02k|        IGRAPH_FINALLY(igraph_stack_int_destroy, s); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (67:63): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1426|       |
 1427|  2.02k|    igraph_vector_int_clear(bridges);
 1428|       |
 1429|  2.02k|    time = 0;
 1430|   351k|    for (igraph_integer_t start = 0; start < no_of_nodes; ++start) {
  ------------------
  |  Branch (1430:38): [True: 349k, False: 2.02k]
  ------------------
 1431|   349k|        if (! IGRAPH_BIT_TEST(visited, start)) {
  ------------------
  |  |  144|   349k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|   349k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   349k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|   349k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   349k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1431:13): [True: 302k, False: 46.9k]
  ------------------
 1432|       |            /* Perform a DFS from 'start'.
 1433|       |             * The top of the su stack is u, the vertex currently being visited.
 1434|       |             * The top of the si stack is i, the index of u's neighbour that will
 1435|       |             * be processed next. */
 1436|       |
 1437|   302k|            IGRAPH_CHECK(igraph_stack_int_push(&su, start));
  ------------------
  |  |  648|   302k|    do { \
  |  |  649|   302k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   302k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   302k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 302k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   302k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1438|   302k|            IGRAPH_CHECK(igraph_stack_int_push(&si, 0));
  ------------------
  |  |  648|   302k|    do { \
  |  |  649|   302k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   302k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   302k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 302k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   302k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1439|       |
 1440|   801k|            while (! igraph_stack_int_empty(&su)) {
  ------------------
  |  Branch (1440:20): [True: 499k, False: 302k]
  ------------------
 1441|   499k|                igraph_integer_t u = igraph_stack_int_pop(&su);
 1442|   499k|                igraph_integer_t i = igraph_stack_int_pop(&si);
 1443|       |
 1444|   499k|                if (i == 0) {
  ------------------
  |  Branch (1444:21): [True: 349k, False: 149k]
  ------------------
 1445|       |                    /* We are at the first step of visiting vertex u. */
 1446|       |
 1447|   349k|                    IGRAPH_BIT_SET(visited, u);
  ------------------
  |  |  105|   349k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|   349k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   349k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|   349k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   349k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1448|       |
 1449|   349k|                    time += 1;
 1450|       |
 1451|   349k|                    VECTOR(vis)[u] = time;
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1452|   349k|                    VECTOR(low)[u] = time;
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1453|   349k|                }
 1454|       |
 1455|   499k|                igraph_vector_int_t *incedges = igraph_inclist_get(&il, u);
  ------------------
  |  |  107|   499k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_integer_t)(no)])
  ------------------
 1456|       |
 1457|   499k|                if (i < igraph_vector_int_size(incedges)) {
  ------------------
  |  Branch (1457:21): [True: 149k, False: 349k]
  ------------------
 1458|   149k|                    IGRAPH_CHECK(igraph_stack_int_push(&su, u));
  ------------------
  |  |  648|   149k|    do { \
  |  |  649|   149k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   149k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   149k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 149k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   149k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1459|   149k|                    IGRAPH_CHECK(igraph_stack_int_push(&si, i+1));
  ------------------
  |  |  648|   149k|    do { \
  |  |  649|   149k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   149k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   149k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 149k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   149k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1460|       |
 1461|   149k|                    igraph_integer_t edge = VECTOR(*incedges)[i];
  ------------------
  |  |   65|   149k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1462|   149k|                    igraph_integer_t v = IGRAPH_OTHER(graph, edge, u);
  ------------------
  |  |  144|   149k|    ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|   149k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|   149k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  113|  90.1k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  90.1k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  59.7k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  59.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:25): [True: 90.1k, False: 59.7k]
  |  |  ------------------
  ------------------
 1463|       |
 1464|   149k|                    if (! IGRAPH_BIT_TEST(visited, v)) {
  ------------------
  |  |  144|   149k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|   149k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|   149k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   149k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|   149k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   149k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1464:25): [True: 46.9k, False: 103k]
  ------------------
 1465|  46.9k|                        VECTOR(incoming_edge)[v] = edge;
  ------------------
  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1466|       |
 1467|  46.9k|                        IGRAPH_CHECK(igraph_stack_int_push(&su, v));
  ------------------
  |  |  648|  46.9k|    do { \
  |  |  649|  46.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  46.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  46.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 46.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  46.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1468|  46.9k|                        IGRAPH_CHECK(igraph_stack_int_push(&si, 0));
  ------------------
  |  |  648|  46.9k|    do { \
  |  |  649|  46.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  46.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  46.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 46.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  46.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1469|   103k|                    } else if (edge != VECTOR(incoming_edge)[u]) {
  ------------------
  |  |   65|   103k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1469:32): [True: 56.0k, False: 46.9k]
  ------------------
 1470|  56.0k|                        VECTOR(low)[u] = VECTOR(low)[u] < VECTOR(vis)[v] ? VECTOR(low)[u] : VECTOR(vis)[v];
  ------------------
  |  |   65|  56.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      VECTOR(low)[u] = VECTOR(low)[u] < VECTOR(vis)[v] ? VECTOR(low)[u] : VECTOR(vis)[v];
  ------------------
  |  |   65|  56.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      VECTOR(low)[u] = VECTOR(low)[u] < VECTOR(vis)[v] ? VECTOR(low)[u] : VECTOR(vis)[v];
  ------------------
  |  |   65|  56.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      VECTOR(low)[u] = VECTOR(low)[u] < VECTOR(vis)[v] ? VECTOR(low)[u] : VECTOR(vis)[v];
  ------------------
  |  |   65|  19.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      VECTOR(low)[u] = VECTOR(low)[u] < VECTOR(vis)[v] ? VECTOR(low)[u] : VECTOR(vis)[v];
  ------------------
  |  |   65|  36.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1470:42): [True: 19.8k, False: 36.2k]
  ------------------
 1471|  56.0k|                    }
 1472|   349k|                } else {
 1473|       |                    /* We are done visiting vertex u, so it won't be put back on the stack.
 1474|       |                     * We are ready to update the 'low' value of its parent w, and decide
 1475|       |                     * whether its incoming edge is a bridge. */
 1476|       |
 1477|   349k|                    igraph_integer_t edge = VECTOR(incoming_edge)[u];
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1478|   349k|                    if (edge >= 0) {
  ------------------
  |  Branch (1478:25): [True: 46.9k, False: 302k]
  ------------------
 1479|  46.9k|                        igraph_integer_t w = IGRAPH_OTHER(graph, edge, u); /* parent of u in DFS tree */
  ------------------
  |  |  144|  46.9k|    ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  46.9k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  113|  13.0k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  13.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  33.8k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  33.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:25): [True: 13.0k, False: 33.8k]
  |  |  ------------------
  ------------------
 1480|  46.9k|                        VECTOR(low)[w] = VECTOR(low)[w] < VECTOR(low)[u] ? VECTOR(low)[w] : VECTOR(low)[u];
  ------------------
  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      VECTOR(low)[w] = VECTOR(low)[w] < VECTOR(low)[u] ? VECTOR(low)[w] : VECTOR(low)[u];
  ------------------
  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      VECTOR(low)[w] = VECTOR(low)[w] < VECTOR(low)[u] ? VECTOR(low)[w] : VECTOR(low)[u];
  ------------------
  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      VECTOR(low)[w] = VECTOR(low)[w] < VECTOR(low)[u] ? VECTOR(low)[w] : VECTOR(low)[u];
  ------------------
  |  |   65|  38.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      VECTOR(low)[w] = VECTOR(low)[w] < VECTOR(low)[u] ? VECTOR(low)[w] : VECTOR(low)[u];
  ------------------
  |  |   65|  7.99k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1480:42): [True: 38.9k, False: 7.99k]
  ------------------
 1481|  46.9k|                        if (VECTOR(low)[u] > VECTOR(vis)[w]) {
  ------------------
  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      if (VECTOR(low)[u] > VECTOR(vis)[w]) {
  ------------------
  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1481:29): [True: 38.2k, False: 8.68k]
  ------------------
 1482|  38.2k|                            IGRAPH_CHECK(igraph_vector_int_push_back(bridges, edge));
  ------------------
  |  |  648|  38.2k|    do { \
  |  |  649|  38.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  38.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  38.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 38.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  38.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1483|  38.2k|                        }
 1484|  46.9k|                    }
 1485|   349k|                }
 1486|   499k|            }
 1487|   302k|        }
 1488|   349k|    }
 1489|       |
 1490|  2.02k|    igraph_stack_int_destroy(&si);
 1491|  2.02k|    igraph_stack_int_destroy(&su);
 1492|  2.02k|    igraph_vector_int_destroy(&incoming_edge);
 1493|  2.02k|    igraph_vector_int_destroy(&low);
 1494|  2.02k|    igraph_vector_int_destroy(&vis);
 1495|  2.02k|    igraph_bitset_destroy(&visited);
 1496|  2.02k|    igraph_inclist_destroy(&il);
 1497|  2.02k|    IGRAPH_FINALLY_CLEAN(7);
 1498|       |
 1499|  2.02k|    return IGRAPH_SUCCESS;
 1500|  2.02k|}
igraph_subcomponent:
 1553|  2.02k|) {
 1554|       |
 1555|  2.02k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
 1556|  2.02k|    igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   61|  2.02k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
 1557|  2.02k|    igraph_bitset_t already_added;
 1558|  2.02k|    igraph_integer_t i, vsize;
 1559|  2.02k|    igraph_vector_int_t tmp = IGRAPH_VECTOR_NULL;
  ------------------
  |  |  104|  2.02k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
 1560|       |
 1561|  2.02k|    if (vertex < 0 || vertex >= no_of_nodes) {
  ------------------
  |  Branch (1561:9): [True: 0, False: 2.02k]
  |  Branch (1561:23): [True: 0, False: 2.02k]
  ------------------
 1562|      0|        IGRAPH_ERROR("Vertex id out of range.", IGRAPH_EINVVID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1563|      0|    }
 1564|  2.02k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (1564:9): [True: 2.02k, False: 0]
  |  Branch (1564:31): [True: 2.02k, False: 0]
  ------------------
 1565|  2.02k|        mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1565:9): [True: 0, False: 2.02k]
  ------------------
 1566|      0|        IGRAPH_ERROR("Invalid mode argument.", IGRAPH_EINVMODE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1567|      0|    }
 1568|       |
 1569|  2.02k|    igraph_vector_int_clear(res);
 1570|       |
 1571|  2.02k|    IGRAPH_BITSET_INIT_FINALLY(&already_added, no_of_nodes);
  ------------------
  |  |  261|  2.02k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  262|  2.02k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  263|  2.02k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (263:62): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1572|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&tmp, 0);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1573|  2.02k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   66|  2.02k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   67|  2.02k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (67:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1574|       |
 1575|  2.02k|    IGRAPH_CHECK(igraph_dqueue_int_push(&q, vertex));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1576|  2.02k|    IGRAPH_CHECK(igraph_vector_int_push_back(res, vertex));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1577|  2.02k|    IGRAPH_BIT_SET(already_added, vertex);
  ------------------
  |  |  105|  2.02k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  2.02k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  2.02k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  2.02k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  2.02k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  2.02k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1578|       |
 1579|  31.3k|    while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (1579:12): [True: 29.3k, False: 2.02k]
  ------------------
 1580|  29.3k|        igraph_integer_t actnode = igraph_dqueue_int_pop(&q);
 1581|       |
 1582|  29.3k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|  29.3k|    do { \
  |  |   48|  29.3k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 29.3k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|  29.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1583|       |
 1584|  29.3k|        IGRAPH_CHECK(igraph_neighbors(graph, &tmp, actnode, mode));
  ------------------
  |  |  648|  29.3k|    do { \
  |  |  649|  29.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  29.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  29.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 29.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  29.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1585|  29.3k|        vsize = igraph_vector_int_size(&tmp);
 1586|   122k|        for (i = 0; i < vsize; i++) {
  ------------------
  |  Branch (1586:21): [True: 93.4k, False: 29.3k]
  ------------------
 1587|  93.4k|            igraph_integer_t neighbor = VECTOR(tmp)[i];
  ------------------
  |  |   65|  93.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1588|       |
 1589|  93.4k|            if (IGRAPH_BIT_TEST(already_added, neighbor)) {
  ------------------
  |  |  144|  93.4k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  93.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  93.4k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  93.4k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  93.4k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  93.4k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:36): [True: 66.0k, False: 27.3k]
  |  |  ------------------
  ------------------
 1590|  66.0k|                continue;
 1591|  66.0k|            }
 1592|  27.3k|            IGRAPH_BIT_SET(already_added, neighbor);
  ------------------
  |  |  105|  27.3k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  27.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  27.3k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  27.3k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  27.3k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  27.3k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1593|  27.3k|            IGRAPH_CHECK(igraph_vector_int_push_back(res, neighbor));
  ------------------
  |  |  648|  27.3k|    do { \
  |  |  649|  27.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  27.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  27.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 27.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  27.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1594|  27.3k|            IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  648|  27.3k|    do { \
  |  |  649|  27.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  27.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  27.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 27.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  27.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1595|  27.3k|        }
 1596|  29.3k|    }
 1597|       |
 1598|  2.02k|    igraph_dqueue_int_destroy(&q);
 1599|  2.02k|    igraph_vector_int_destroy(&tmp);
 1600|  2.02k|    igraph_bitset_destroy(&already_added);
 1601|  2.02k|    IGRAPH_FINALLY_CLEAN(3);
 1602|       |
 1603|  2.02k|    return IGRAPH_SUCCESS;
 1604|  2.02k|}
components.c:igraph_i_connected_components_weak:
  100|  5.01k|) {
  101|       |
  102|  5.01k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  103|  5.01k|    igraph_integer_t no_of_components;
  104|  5.01k|    igraph_bitset_t already_added;
  105|  5.01k|    igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   61|  5.01k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
  106|  5.01k|    igraph_vector_int_t neis = IGRAPH_VECTOR_NULL;
  ------------------
  |  |  104|  5.01k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
  107|       |
  108|       |    /* Memory for result, csize is dynamically allocated */
  109|  5.01k|    if (membership) {
  ------------------
  |  Branch (109:9): [True: 2.02k, False: 2.98k]
  ------------------
  110|  2.02k|        IGRAPH_CHECK(igraph_vector_int_resize(membership, no_of_nodes));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  111|  2.02k|    }
  112|  5.01k|    if (csize) {
  ------------------
  |  Branch (112:9): [True: 5.01k, False: 0]
  ------------------
  113|  5.01k|        igraph_vector_int_clear(csize);
  114|  5.01k|    }
  115|       |
  116|       |    /* Try to make use of cached information. */
  117|  5.01k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED) &&
  ------------------
  |  Branch (117:9): [True: 4.65k, False: 362]
  ------------------
  118|  5.01k|        igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED)) {
  ------------------
  |  Branch (118:9): [True: 440, False: 4.21k]
  ------------------
  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|    440|        if (membership) {
  ------------------
  |  Branch (123:13): [True: 175, False: 265]
  ------------------
  124|       |            /* All vertices are members of the same component,
  125|       |             * component number 0. */
  126|    175|            igraph_vector_int_null(membership);
  127|    175|        }
  128|    440|        if (csize) {
  ------------------
  |  Branch (128:13): [True: 440, False: 0]
  ------------------
  129|       |            /* The size of the single component is the same as the vertex count. */
  130|    440|            IGRAPH_CHECK(igraph_vector_int_push_back(csize, no_of_nodes));
  ------------------
  |  |  648|    440|    do { \
  |  |  649|    440|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    440|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    440|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 440]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    440|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  131|    440|        }
  132|    440|        if (no) {
  ------------------
  |  Branch (132:13): [True: 175, False: 265]
  ------------------
  133|       |            /* There is one component. */
  134|    175|            *no = 1;
  135|    175|        }
  136|    440|        return IGRAPH_SUCCESS;
  137|    440|    }
  138|       |
  139|  4.57k|    IGRAPH_BITSET_INIT_FINALLY(&already_added, no_of_nodes);
  ------------------
  |  |  261|  4.57k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  262|  4.57k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  648|  4.57k|    do { \
  |  |  |  |  649|  4.57k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  4.57k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  4.57k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.57k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  4.57k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  263|  4.57k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  591|  4.57k|    do { \
  |  |  |  |  592|  4.57k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  4.57k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  4.57k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  4.57k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  4.57k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  4.57k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (263:62): [Folded - Ignored]
  |  |  ------------------
  ------------------
  140|  4.57k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, no_of_nodes > 100000 ? 10000 : no_of_nodes / 10);
  ------------------
  |  |   66|  4.57k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  648|  4.57k|    do { \
  |  |  |  |  649|  9.15k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (649:40): [True: 0, False: 4.57k]
  |  |  |  |  ------------------
  |  |  |  |  650|  4.57k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  4.57k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.57k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  4.57k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   67|  4.57k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  591|  4.57k|    do { \
  |  |  |  |  592|  4.57k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  4.57k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  4.57k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  4.57k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  4.57k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  4.57k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (67:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  141|  4.57k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  124|  4.57k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  4.57k|    do { \
  |  |  |  |  649|  4.57k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  4.57k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  4.57k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.57k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  4.57k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  4.57k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  4.57k|    do { \
  |  |  |  |  592|  4.57k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  4.57k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  4.57k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  4.57k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  4.57k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  4.57k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  142|       |
  143|       |    /* The algorithm */
  144|       |
  145|  4.57k|    no_of_components = 0;
  146|   831k|    for (igraph_integer_t first_node = 0; first_node < no_of_nodes; ++first_node) {
  ------------------
  |  Branch (146:43): [True: 826k, False: 4.57k]
  ------------------
  147|   826k|        igraph_integer_t act_component_size;
  148|       |
  149|   826k|        if (IGRAPH_BIT_TEST(already_added, first_node)) {
  ------------------
  |  |  144|   826k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|   826k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|   826k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   826k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|   826k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   826k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:36): [True: 92.3k, False: 734k]
  |  |  ------------------
  ------------------
  150|  92.3k|            continue;
  151|  92.3k|        }
  152|   734k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|   734k|    do { \
  |  |   48|   734k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 734k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|   734k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  153|       |
  154|   734k|        IGRAPH_BIT_SET(already_added, first_node);
  ------------------
  |  |  105|   734k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|   734k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|   734k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   734k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|   734k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   734k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|   734k|        act_component_size = 1;
  156|   734k|        if (membership) {
  ------------------
  |  Branch (156:13): [True: 302k, False: 431k]
  ------------------
  157|   302k|            VECTOR(*membership)[first_node] = no_of_components;
  ------------------
  |  |   65|   302k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  158|   302k|        }
  159|   734k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, first_node));
  ------------------
  |  |  648|   734k|    do { \
  |  |  649|   734k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   734k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   734k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 734k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   734k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  160|       |
  161|  1.56M|        while ( !igraph_dqueue_int_empty(&q) ) {
  ------------------
  |  Branch (161:17): [True: 826k, False: 734k]
  ------------------
  162|   826k|            igraph_integer_t act_node = igraph_dqueue_int_pop(&q);
  163|   826k|            IGRAPH_CHECK(igraph_neighbors(graph, &neis, act_node, IGRAPH_ALL));
  ------------------
  |  |  648|   826k|    do { \
  |  |  649|   826k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   826k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   826k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 826k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   826k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  164|   826k|            igraph_integer_t nei_count = igraph_vector_int_size(&neis);
  165|  1.14M|            for (igraph_integer_t i = 0; i < nei_count; i++) {
  ------------------
  |  Branch (165:42): [True: 322k, False: 826k]
  ------------------
  166|   322k|                igraph_integer_t neighbor = VECTOR(neis)[i];
  ------------------
  |  |   65|   322k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  167|   322k|                if (IGRAPH_BIT_TEST(already_added, neighbor)) {
  ------------------
  |  |  144|   322k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|   322k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|   322k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   322k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|   322k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   322k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:36): [True: 229k, False: 92.3k]
  |  |  ------------------
  ------------------
  168|   229k|                    continue;
  169|   229k|                }
  170|  92.3k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  648|  92.3k|    do { \
  |  |  649|  92.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  92.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  92.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 92.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  92.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  171|  92.3k|                IGRAPH_BIT_SET(already_added, neighbor);
  ------------------
  |  |  105|  92.3k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  92.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  92.3k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  92.3k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  92.3k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  92.3k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  172|  92.3k|                act_component_size++;
  173|  92.3k|                if (membership) {
  ------------------
  |  Branch (173:21): [True: 42.9k, False: 49.4k]
  ------------------
  174|  42.9k|                    VECTOR(*membership)[neighbor] = no_of_components;
  ------------------
  |  |   65|  42.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  175|  42.9k|                }
  176|  92.3k|            }
  177|   826k|        }
  178|       |
  179|   734k|        no_of_components++;
  180|   734k|        if (csize) {
  ------------------
  |  Branch (180:13): [True: 734k, False: 0]
  ------------------
  181|   734k|            IGRAPH_CHECK(igraph_vector_int_push_back(csize, act_component_size));
  ------------------
  |  |  648|   734k|    do { \
  |  |  649|   734k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   734k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   734k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 734k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   734k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  182|   734k|        }
  183|   734k|    }
  184|       |
  185|       |    /* Cleaning up */
  186|       |
  187|  4.57k|    if (no) {
  ------------------
  |  Branch (187:9): [True: 1.85k, False: 2.72k]
  ------------------
  188|  1.85k|        *no = no_of_components;
  189|  1.85k|    }
  190|       |
  191|       |    /* Clean up */
  192|  4.57k|    igraph_bitset_destroy(&already_added);
  193|  4.57k|    igraph_dqueue_int_destroy(&q);
  194|  4.57k|    igraph_vector_int_destroy(&neis);
  195|  4.57k|    IGRAPH_FINALLY_CLEAN(3);
  196|       |
  197|       |    /* Update cache */
  198|  4.57k|    igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED, no_of_components == 1);
  199|       |
  200|  4.57k|    return IGRAPH_SUCCESS;
  201|  4.57k|}
components.c:igraph_i_is_connected_weak:
  484|  1.66k|static igraph_error_t igraph_i_is_connected_weak(const igraph_t *graph, igraph_bool_t *res) {
  485|  1.66k|    const igraph_integer_t no_of_nodes = igraph_vcount(graph);
  486|  1.66k|    const igraph_integer_t no_of_edges = igraph_ecount(graph);
  487|  1.66k|    igraph_integer_t added_count;
  488|  1.66k|    igraph_bitset_t already_added;
  489|  1.66k|    igraph_vector_int_t neis;
  490|  1.66k|    igraph_dqueue_int_t q;
  491|       |
  492|       |    /* By convention, the null graph is not considered connected.
  493|       |     * See https://github.com/igraph/igraph/issues/1538 */
  494|  1.66k|    if (no_of_nodes == 0) {
  ------------------
  |  Branch (494:9): [True: 0, False: 1.66k]
  ------------------
  495|      0|        *res = false;
  496|      0|        goto exit;
  497|      0|    }
  498|       |
  499|       |    /* A connected graph has at least |V| - 1 edges. */
  500|  1.66k|    if (no_of_edges < no_of_nodes - 1) {
  ------------------
  |  Branch (500:9): [True: 1.40k, False: 263]
  ------------------
  501|  1.40k|        *res = false;
  502|  1.40k|        goto exit;
  503|  1.40k|    }
  504|       |
  505|    263|    IGRAPH_BITSET_INIT_FINALLY(&already_added, no_of_nodes);
  ------------------
  |  |  261|    263|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  262|    263|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  648|    263|    do { \
  |  |  |  |  649|    263|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    263|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    263|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 263]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    263|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  263|    263|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  591|    263|    do { \
  |  |  |  |  592|    263|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    263|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    263|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    263|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    263|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    263|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (263:62): [Folded - Ignored]
  |  |  ------------------
  ------------------
  506|    263|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 10);
  ------------------
  |  |   66|    263|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  648|    263|    do { \
  |  |  |  |  649|    263|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    263|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    263|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 263]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    263|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   67|    263|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  591|    263|    do { \
  |  |  |  |  592|    263|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    263|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    263|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    263|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    263|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    263|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (67:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  507|    263|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  124|    263|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    263|    do { \
  |  |  |  |  649|    263|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    263|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    263|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 263]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    263|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    263|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    263|    do { \
  |  |  |  |  592|    263|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    263|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    263|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    263|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    263|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    263|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  508|       |
  509|       |    /* Try to find at least two components */
  510|    263|    IGRAPH_BIT_SET(already_added, 0);
  ------------------
  |  |  105|    263|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|    263|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|    263|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|    263|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|    263|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|    263|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  511|    263|    IGRAPH_CHECK(igraph_dqueue_int_push(&q, 0));
  ------------------
  |  |  648|    263|    do { \
  |  |  649|    263|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    263|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    263|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 263]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    263|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  512|       |
  513|    263|    added_count = 1;
  514|  3.39k|    while (! igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (514:12): [True: 3.26k, False: 133]
  ------------------
  515|  3.26k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|  3.26k|    do { \
  |  |   48|  3.26k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 3.26k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|  3.26k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  516|       |
  517|  3.26k|        const igraph_integer_t actnode = igraph_dqueue_int_pop(&q);
  518|       |
  519|  3.26k|        IGRAPH_CHECK(igraph_neighbors(graph, &neis, actnode, IGRAPH_ALL));
  ------------------
  |  |  648|  3.26k|    do { \
  |  |  649|  3.26k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  3.26k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  3.26k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 3.26k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  3.26k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  520|  3.26k|        const igraph_integer_t nei_count = igraph_vector_int_size(&neis);
  521|       |
  522|  24.9k|        for (igraph_integer_t i = 0; i < nei_count; i++) {
  ------------------
  |  Branch (522:38): [True: 21.7k, False: 3.13k]
  ------------------
  523|  21.7k|            const igraph_integer_t neighbor = VECTOR(neis)[i];
  ------------------
  |  |   65|  21.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  524|  21.7k|            if (IGRAPH_BIT_TEST(already_added, neighbor)) {
  ------------------
  |  |  144|  21.7k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  21.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  21.7k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  21.7k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  21.7k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  21.7k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:36): [True: 18.3k, False: 3.41k]
  |  |  ------------------
  ------------------
  525|  18.3k|                continue;
  526|  18.3k|            }
  527|       |
  528|  3.41k|            IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  648|  3.41k|    do { \
  |  |  649|  3.41k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  3.41k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  3.41k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 3.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  3.41k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  529|  3.41k|            added_count++;
  530|  3.41k|            IGRAPH_BIT_SET(already_added, neighbor);
  ------------------
  |  |  105|  3.41k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  3.41k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  3.41k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  3.41k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  3.41k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  3.41k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  531|       |
  532|  3.41k|            if (added_count == no_of_nodes) {
  ------------------
  |  Branch (532:17): [True: 130, False: 3.28k]
  ------------------
  533|       |                /* We have already reached all nodes: the graph is connected.
  534|       |                 * We can stop the traversal now. */
  535|    130|                goto done;
  536|    130|            }
  537|  3.41k|        }
  538|  3.26k|    }
  539|       |
  540|    263|done:
  541|       |    /* Connected? */
  542|    263|    *res = (added_count == no_of_nodes);
  543|       |
  544|    263|    igraph_bitset_destroy(&already_added);
  545|    263|    igraph_dqueue_int_destroy(&q);
  546|    263|    igraph_vector_int_destroy(&neis);
  547|    263|    IGRAPH_FINALLY_CLEAN(3);
  548|       |
  549|  1.66k|exit:
  550|  1.66k|    igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED, *res);
  551|  1.66k|    if (igraph_is_directed(graph) && !(*res)) {
  ------------------
  |  Branch (551:9): [True: 0, False: 1.66k]
  |  Branch (551:38): [True: 0, False: 0]
  ------------------
  552|       |        /* If the graph is not weakly connected, it is not strongly connected
  553|       |         * either so we can also cache that */
  554|      0|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_STRONGLY_CONNECTED, *res);
  555|      0|    }
  556|       |
  557|  1.66k|    return IGRAPH_SUCCESS;
  558|    263|}
components.c:igraph_i_decompose_weak:
  620|  2.02k|                                   igraph_integer_t maxcompno, igraph_integer_t minelements) {
  621|       |
  622|  2.02k|    igraph_integer_t actstart;
  623|  2.02k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  624|  2.02k|    igraph_integer_t resco = 0;   /* number of graphs created so far */
  625|  2.02k|    igraph_bitset_t already_added;
  626|  2.02k|    igraph_dqueue_int_t q;
  627|  2.02k|    igraph_vector_int_t verts;
  628|  2.02k|    igraph_vector_int_t neis;
  629|  2.02k|    igraph_vector_int_t vids_old2new;
  630|  2.02k|    igraph_integer_t i;
  631|  2.02k|    igraph_t newg;
  632|       |
  633|       |
  634|  2.02k|    if (maxcompno < 0) {
  ------------------
  |  Branch (634:9): [True: 2.02k, False: 0]
  ------------------
  635|  2.02k|        maxcompno = IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|  2.02k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  636|  2.02k|    }
  637|       |
  638|  2.02k|    igraph_graph_list_clear(components);
  639|       |
  640|       |    /* already_added keeps track of what nodes made it into a graph already */
  641|  2.02k|    IGRAPH_BITSET_INIT_FINALLY(&already_added, no_of_nodes);
  ------------------
  |  |  261|  2.02k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  262|  2.02k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  263|  2.02k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (263:62): [Folded - Ignored]
  |  |  ------------------
  ------------------
  642|  2.02k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   66|  2.02k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   67|  2.02k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (67:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  643|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&verts, 0);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  644|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  645|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&vids_old2new, no_of_nodes);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  646|  2.02k|    igraph_vector_int_fill(&vids_old2new, -1);
  647|       |
  648|       |    /* vids_old2new would have been created internally in igraph_induced_subgraph(),
  649|       |       but it is slow if the graph is large and consists of many small components,
  650|       |       so we create it once here and then re-use it */
  651|       |
  652|       |    /* add a node and its neighbors at once, recursively
  653|       |       then switch to next node that has not been added already */
  654|   351k|    for (actstart = 0; resco < maxcompno && actstart < no_of_nodes; actstart++) {
  ------------------
  |  Branch (654:24): [True: 351k, False: 0]
  |  Branch (654:45): [True: 349k, False: 2.02k]
  ------------------
  655|       |
  656|   349k|        if (IGRAPH_BIT_TEST(already_added, actstart)) {
  ------------------
  |  |  144|   349k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|   349k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   349k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|   349k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   349k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:36): [True: 46.9k, False: 302k]
  |  |  ------------------
  ------------------
  657|  46.9k|            continue;
  658|  46.9k|        }
  659|   302k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|   302k|    do { \
  |  |   48|   302k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 302k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|   302k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  660|       |
  661|   302k|        igraph_vector_int_clear(&verts);
  662|       |
  663|       |        /* add the node itself */
  664|   302k|        IGRAPH_BIT_SET(already_added, actstart);
  ------------------
  |  |  105|   302k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|   302k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|   302k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   302k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|   302k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   302k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  665|   302k|        IGRAPH_CHECK(igraph_vector_int_push_back(&verts, actstart));
  ------------------
  |  |  648|   302k|    do { \
  |  |  649|   302k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   302k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   302k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 302k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   302k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  666|   302k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, actstart));
  ------------------
  |  |  648|   302k|    do { \
  |  |  649|   302k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   302k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   302k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 302k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   302k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  667|       |
  668|       |        /* add the neighbors, recursively */
  669|   651k|        while (!igraph_dqueue_int_empty(&q) ) {
  ------------------
  |  Branch (669:16): [True: 349k, False: 302k]
  ------------------
  670|       |            /* pop from the queue of this component */
  671|   349k|            igraph_integer_t actvert = igraph_dqueue_int_pop(&q);
  672|   349k|            IGRAPH_CHECK(igraph_neighbors(graph, &neis, actvert, IGRAPH_ALL));
  ------------------
  |  |  648|   349k|    do { \
  |  |  649|   349k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   349k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   349k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 349k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   349k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  673|   349k|            igraph_integer_t nei_count = igraph_vector_int_size(&neis);
  674|       |            /* iterate over the neighbors */
  675|   499k|            for (i = 0; i < nei_count; i++) {
  ------------------
  |  Branch (675:25): [True: 149k, False: 349k]
  ------------------
  676|   149k|                igraph_integer_t neighbor = VECTOR(neis)[i];
  ------------------
  |  |   65|   149k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  677|   149k|                if (IGRAPH_BIT_TEST(already_added, neighbor)) {
  ------------------
  |  |  144|   149k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|   149k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|   149k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   149k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|   149k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   149k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:36): [True: 103k, False: 46.9k]
  |  |  ------------------
  ------------------
  678|   103k|                    continue;
  679|   103k|                }
  680|       |                /* add neighbor */
  681|  46.9k|                IGRAPH_BIT_SET(already_added, neighbor);
  ------------------
  |  |  105|  46.9k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  46.9k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  46.9k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  46.9k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  46.9k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  682|       |
  683|       |                /* recursion: append neighbor to the queues */
  684|  46.9k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  648|  46.9k|    do { \
  |  |  649|  46.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  46.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  46.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 46.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  46.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  685|  46.9k|                IGRAPH_CHECK(igraph_vector_int_push_back(&verts, neighbor));
  ------------------
  |  |  648|  46.9k|    do { \
  |  |  649|  46.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  46.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  46.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 46.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  46.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  686|  46.9k|            }
  687|   349k|        }
  688|       |
  689|       |        /* ok, we have a component */
  690|   302k|        if (igraph_vector_int_size(&verts) < minelements) {
  ------------------
  |  Branch (690:13): [True: 300k, False: 2.16k]
  ------------------
  691|   300k|            continue;
  692|   300k|        }
  693|       |
  694|  2.16k|        IGRAPH_CHECK(igraph_i_induced_subgraph_map(
  ------------------
  |  |  648|  2.16k|    do { \
  |  |  649|  2.16k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.16k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.16k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.16k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.16k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  695|  2.16k|            graph, &newg, igraph_vss_vector(&verts),
  696|  2.16k|            IGRAPH_SUBGRAPH_AUTO, &vids_old2new,
  697|  2.16k|            /* invmap = */ 0, /* map_is_prepared = */ 1
  698|  2.16k|        ));
  699|  2.16k|        IGRAPH_FINALLY(igraph_destroy, &newg);
  ------------------
  |  |  591|  2.16k|    do { \
  |  |  592|  2.16k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.16k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.16k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.16k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.16k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.16k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  700|  2.16k|        IGRAPH_CHECK(igraph_graph_list_push_back(components, &newg));
  ------------------
  |  |  648|  2.16k|    do { \
  |  |  649|  2.16k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.16k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.16k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.16k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.16k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  701|  2.16k|        IGRAPH_FINALLY_CLEAN(1);  /* ownership of newg now taken by 'components' */
  702|  2.16k|        resco++;
  703|       |
  704|       |        /* vids_old2new does not have to be cleaned up here; since we are doing
  705|       |         * weak decomposition, each vertex will appear in only one of the
  706|       |         * connected components so we won't ever touch an item in vids_old2new
  707|       |         * if it was already set to a non-zero value in a previous component */
  708|       |
  709|  2.16k|    } /* for actstart++ */
  710|       |
  711|  2.02k|    igraph_vector_int_destroy(&vids_old2new);
  712|  2.02k|    igraph_vector_int_destroy(&neis);
  713|  2.02k|    igraph_vector_int_destroy(&verts);
  714|  2.02k|    igraph_dqueue_int_destroy(&q);
  715|  2.02k|    igraph_bitset_destroy(&already_added);
  716|  2.02k|    IGRAPH_FINALLY_CLEAN(5);
  717|       |
  718|  2.02k|    return IGRAPH_SUCCESS;
  719|  2.02k|}

igraph_create:
   65|  35.1k|                  igraph_integer_t n, igraph_bool_t directed) {
   66|  35.1k|    igraph_bool_t has_edges = igraph_vector_int_size(edges) > 0;
   67|  35.1k|    igraph_integer_t max;
   68|       |
   69|  35.1k|    if (igraph_vector_int_size(edges) % 2 != 0) {
  ------------------
  |  Branch (69:9): [True: 0, False: 35.1k]
  ------------------
   70|      0|        IGRAPH_ERROR("Invalid (odd) edges vector.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   71|      0|    }
   72|  35.1k|    if (!igraph_vector_int_isininterval(edges, 0, IGRAPH_VCOUNT_MAX-1)) {
  ------------------
  |  |  105|  35.1k|#define IGRAPH_VCOUNT_MAX (IGRAPH_INTEGER_MAX-1)
  |  |  ------------------
  |  |  |  |   77|  35.1k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  |  |  ------------------
  ------------------
  |  Branch (72:9): [True: 0, False: 35.1k]
  ------------------
   73|      0|        IGRAPH_ERROR("Invalid (negative or too large) vertex ID.", IGRAPH_EINVVID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   74|      0|    }
   75|       |
   76|       |    /* The + 1 here cannot overflow as above we have already
   77|       |     * checked that vertex IDs are within range. */
   78|  35.1k|    max = has_edges ? igraph_vector_int_max(edges) + 1 : 0;
  ------------------
  |  Branch (78:11): [True: 32.4k, False: 2.64k]
  ------------------
   79|       |
   80|  35.1k|    IGRAPH_CHECK(igraph_empty(graph, n, directed));
  ------------------
  |  |  648|  35.1k|    do { \
  |  |  649|  35.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  35.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  35.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 35.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  35.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   81|  35.1k|    IGRAPH_FINALLY(igraph_destroy, graph);
  ------------------
  |  |  591|  35.1k|    do { \
  |  |  592|  35.1k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  35.1k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  35.1k|         * incorrect destructor function with the pointer */ \
  |  |  595|  35.1k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  35.1k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  35.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   82|  35.1k|    if (has_edges) {
  ------------------
  |  Branch (82:9): [True: 32.4k, False: 2.64k]
  ------------------
   83|  32.4k|        n = igraph_vcount(graph);
   84|  32.4k|        if (n < max) {
  ------------------
  |  Branch (84:13): [True: 1.65k, False: 30.7k]
  ------------------
   85|  1.65k|            IGRAPH_CHECK(igraph_add_vertices(graph, (max - n), 0));
  ------------------
  |  |  648|  1.65k|    do { \
  |  |  649|  1.65k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.65k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   86|  1.65k|        }
   87|  32.4k|        IGRAPH_CHECK(igraph_add_edges(graph, edges, 0));
  ------------------
  |  |  648|  32.4k|    do { \
  |  |  649|  32.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  32.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  32.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 32.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  32.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   88|  32.4k|    }
   89|       |
   90|  35.1k|    IGRAPH_FINALLY_CLEAN(1);
   91|  35.1k|    return IGRAPH_SUCCESS;
   92|  35.1k|}

igraph_from_prufer:
   56|    175|igraph_error_t igraph_from_prufer(igraph_t *graph, const igraph_vector_int_t *prufer) {
   57|    175|    igraph_vector_int_t degree;
   58|    175|    igraph_vector_int_t edges;
   59|    175|    igraph_integer_t n;
   60|    175|    igraph_integer_t i, k;
   61|    175|    igraph_integer_t u, v; /* vertices */
   62|    175|    igraph_integer_t ec;
   63|       |
   64|    175|    IGRAPH_SAFE_ADD(igraph_vector_int_size(prufer), 2, &n);
  ------------------
  |  |   47|    175|    do { \
  |  |   48|    175|        igraph_integer_t _safe_a = (a), _safe_b = (b); \
  |  |   49|    175|        igraph_integer_t _safe_sum; \
  |  |   50|    175|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 175]
  |  |  ------------------
  |  |   51|      0|            IGRAPH_ERRORF("Overflow when adding %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  469|      0|    do { \
  |  |  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  472|      0|        return igraph_errno; \
  |  |  |  |  473|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|        } \
  |  |   53|    175|        *(res) = _safe_sum; \
  |  |   54|    175|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   65|       |
   66|    175|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degree, n); /* initializes vector to zeros */
  ------------------
  |  |  124|    175|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    175|    do { \
  |  |  |  |  649|    175|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    175|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    175|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 175]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    175|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    175|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    175|    do { \
  |  |  |  |  592|    175|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    175|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    175|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    175|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    175|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    175|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   67|    175|    {
   68|    175|        igraph_integer_t no_of_edges2;
   69|    175|        IGRAPH_SAFE_MULT(n - 1, 2, &no_of_edges2);
  ------------------
  |  |   57|    175|    do { \
  |  |   58|    175|        igraph_integer_t _safe_a = (a), _safe_b = (b); \
  |  |   59|    175|        igraph_integer_t _safe_prod; \
  |  |   60|    175|        if (__builtin_mul_overflow(_safe_a, _safe_b, &_safe_prod)) { \
  |  |  ------------------
  |  |  |  Branch (60:13): [True: 0, False: 175]
  |  |  ------------------
  |  |   61|      0|            IGRAPH_ERRORF("Overflow when multiplying %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  469|      0|    do { \
  |  |  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  472|      0|        return igraph_errno; \
  |  |  |  |  473|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|      0|        } \
  |  |   63|    175|        *(res) = _safe_prod; \
  |  |   64|    175|    } while (0)
  |  |  ------------------
  |  |  |  Branch (64:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   70|    175|        IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, no_of_edges2);
  ------------------
  |  |  124|    175|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    175|    do { \
  |  |  |  |  649|    175|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    175|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    175|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 175]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    175|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    175|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    175|    do { \
  |  |  |  |  592|    175|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    175|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    175|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    175|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    175|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    175|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   71|    175|    }
   72|       |
   73|       |    /* build out-degree vector (i.e. number of child vertices) and verify Prufer sequence */
   74|  3.99k|    for (i = 0; i < n - 2; ++i) {
  ------------------
  |  Branch (74:17): [True: 3.82k, False: 175]
  ------------------
   75|  3.82k|        igraph_integer_t w = VECTOR(*prufer)[i];
  ------------------
  |  |   65|  3.82k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   76|  3.82k|        if (w >= n || w < 0) {
  ------------------
  |  Branch (76:13): [True: 0, False: 3.82k]
  |  Branch (76:23): [True: 0, False: 3.82k]
  ------------------
   77|      0|            IGRAPH_ERROR("Invalid Prufer sequence.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   78|      0|        }
   79|  3.82k|        VECTOR(degree)[w] += 1;
  ------------------
  |  |   65|  3.82k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   80|  3.82k|    }
   81|       |
   82|    175|    v = 0;  /* initialize v now, in case Prufer sequence is empty */
   83|    175|    k = 0;  /* index into the Prufer vector */
   84|    175|    ec = 0; /* index into the edges vector */
   85|  3.98k|    for (i = 0; i < n; ++i) {
  ------------------
  |  Branch (85:17): [True: 3.98k, False: 0]
  ------------------
   86|  3.98k|        u = i;
   87|       |
   88|  7.80k|        while (k < n - 2 && u <= i && (VECTOR(degree)[u] == 0)) {
  ------------------
  |  |   65|  6.71k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (88:16): [True: 7.62k, False: 175]
  |  Branch (88:29): [True: 6.71k, False: 910]
  |  Branch (88:39): [True: 3.82k, False: 2.89k]
  ------------------
   89|       |            /* u is a leaf here */
   90|       |
   91|  3.82k|            v = VECTOR(*prufer)[k]; /* parent of u */
  ------------------
  |  |   65|  3.82k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   92|       |
   93|       |            /* add edge */
   94|  3.82k|            VECTOR(edges)[ec++] = v;
  ------------------
  |  |   65|  3.82k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   95|  3.82k|            VECTOR(edges)[ec++] = u;
  ------------------
  |  |   65|  3.82k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   96|       |
   97|  3.82k|            k += 1;
   98|       |
   99|  3.82k|            VECTOR(degree)[v] -= 1;
  ------------------
  |  |   65|  3.82k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  100|       |
  101|  3.82k|            u = v;
  102|  3.82k|        }
  103|       |
  104|  3.98k|        if (k == n - 2) {
  ------------------
  |  Branch (104:13): [True: 175, False: 3.80k]
  ------------------
  105|    175|            break;
  106|    175|        }
  107|  3.98k|    }
  108|       |
  109|       |    /* find u for last edge, v is already set */
  110|    184|    for (u = i + 1; u < n; ++u)
  ------------------
  |  Branch (110:21): [True: 184, False: 0]
  ------------------
  111|    184|        if ((VECTOR(degree)[u] == 0) && u != v) {
  ------------------
  |  |   65|    184|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (111:13): [True: 184, False: 0]
  |  Branch (111:41): [True: 175, False: 9]
  ------------------
  112|    175|            break;
  113|    175|        }
  114|       |
  115|       |    /* add last edge */
  116|    175|    VECTOR(edges)[ec++] = v;
  ------------------
  |  |   65|    175|#define VECTOR(v) ((v).stor_begin)
  ------------------
  117|    175|    VECTOR(edges)[ec++] = u;
  ------------------
  |  |   65|    175|#define VECTOR(v) ((v).stor_begin)
  ------------------
  118|       |
  119|    175|    IGRAPH_CHECK(igraph_create(graph, &edges, n, IGRAPH_UNDIRECTED));
  ------------------
  |  |  648|    175|    do { \
  |  |  649|    175|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    175|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    175|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 175]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    175|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  120|       |
  121|    175|    igraph_vector_int_destroy(&edges);
  122|    175|    igraph_vector_int_destroy(&degree);
  123|    175|    IGRAPH_FINALLY_CLEAN(2);
  124|       |
  125|    175|    return IGRAPH_SUCCESS;
  126|    175|}

igraph_bitset_init:
  175|  32.7k|igraph_error_t igraph_bitset_init(igraph_bitset_t *bitset, igraph_integer_t size) {
  176|  32.7k|    igraph_integer_t alloc_size = IGRAPH_BIT_NSLOTS(size);
  ------------------
  |  |  163|  32.7k|#define IGRAPH_BIT_NSLOTS(nbits) ((nbits + IGRAPH_INTEGER_SIZE - (igraph_integer_t)(1)) / IGRAPH_INTEGER_SIZE)
  |  |  ------------------
  |  |  |  |   36|  32.7k|#define IGRAPH_INTEGER_SIZE 64
  |  |  ------------------
  |  |               #define IGRAPH_BIT_NSLOTS(nbits) ((nbits + IGRAPH_INTEGER_SIZE - (igraph_integer_t)(1)) / IGRAPH_INTEGER_SIZE)
  |  |  ------------------
  |  |  |  |   36|  32.7k|#define IGRAPH_INTEGER_SIZE 64
  |  |  ------------------
  ------------------
  177|  32.7k|    bitset->stor_begin = IGRAPH_CALLOC(alloc_size, igraph_uint_t);
  ------------------
  |  |   38|  32.7k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  65.4k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 32.7k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 32.7k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 32.4k, False: 287]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  178|  32.7k|    IGRAPH_CHECK_OOM(bitset->stor_begin, "Cannot initialize bitset.");
  ------------------
  |  |  701|  32.7k|    do { \
  |  |  702|  32.7k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  32.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 32.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  32.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  179|  32.7k|    bitset->size = size;
  180|  32.7k|    bitset->stor_end = bitset->stor_begin + alloc_size;
  181|  32.7k|    return IGRAPH_SUCCESS;
  182|  32.7k|}
igraph_bitset_destroy:
  202|  32.7k|void igraph_bitset_destroy(igraph_bitset_t *bitset) {
  203|  32.7k|    IGRAPH_ASSERT(bitset != NULL);
  ------------------
  |  |  916|  32.7k|    do { \
  |  |  917|  32.7k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  32.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 32.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  32.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  204|  32.7k|    IGRAPH_FREE(bitset->stor_begin);
  ------------------
  |  |   41|  32.7k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  205|  32.7k|    bitset->size = 0;
  206|  32.7k|}

igraph_dqueue_int_init:
   76|  29.8k|igraph_error_t FUNCTION(igraph_dqueue, init)(TYPE(igraph_dqueue)* q, igraph_integer_t capacity) {
   77|  29.8k|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  916|  29.8k|    do { \
  |  |  917|  29.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  29.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 29.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  29.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   78|  29.8k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  916|  29.8k|    do { \
  |  |  917|  29.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  29.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 29.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  29.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   79|       |
   80|  29.8k|    if (capacity == 0) capacity = 1;
  ------------------
  |  Branch (80:9): [True: 459, False: 29.3k]
  ------------------
   81|       |
   82|  29.8k|    q->stor_begin = IGRAPH_CALLOC(capacity, BASE);
  ------------------
  |  |   38|  29.8k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  59.6k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 29.8k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 29.8k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 29.8k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   83|  29.8k|    IGRAPH_CHECK_OOM(q->stor_begin, "Cannot initialize dqueue.");
  ------------------
  |  |  701|  29.8k|    do { \
  |  |  702|  29.8k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  29.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 29.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  29.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   84|  29.8k|    q->stor_end = q->stor_begin + capacity;
   85|  29.8k|    q->begin = q->stor_begin;
   86|  29.8k|    q->end = NULL;
   87|       |
   88|  29.8k|    return IGRAPH_SUCCESS;
   89|  29.8k|}
igraph_dqueue_int_destroy:
  101|  29.8k|void FUNCTION(igraph_dqueue, destroy)(TYPE(igraph_dqueue)* q) {
  102|  29.8k|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  916|  29.8k|    do { \
  |  |  917|  29.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  29.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 29.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  29.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  103|  29.8k|    IGRAPH_FREE(q->stor_begin); /* sets to NULL */
  ------------------
  |  |   41|  29.8k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  104|  29.8k|}
igraph_dqueue_int_empty:
  118|  6.39M|igraph_bool_t FUNCTION(igraph_dqueue, empty)(const TYPE(igraph_dqueue)* q) {
  119|  6.39M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  916|  6.39M|    do { \
  |  |  917|  6.39M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  6.39M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.39M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  6.39M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  120|  6.39M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  916|  6.39M|    do { \
  |  |  917|  6.39M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  6.39M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.39M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  6.39M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  121|  6.39M|    return q->end == NULL;
  122|  6.39M|}
igraph_dqueue_int_clear:
  134|   300k|void FUNCTION(igraph_dqueue, clear)(TYPE(igraph_dqueue)* q) {
  135|   300k|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  916|   300k|    do { \
  |  |  917|   300k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   300k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 300k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   300k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  136|   300k|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  916|   300k|    do { \
  |  |  917|   300k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   300k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 300k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   300k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  137|   300k|    q->begin = q->stor_begin;
  138|   300k|    q->end = NULL;
  139|   300k|}
igraph_dqueue_int_head:
  197|  46.9k|BASE FUNCTION(igraph_dqueue, head)(const TYPE(igraph_dqueue)* q) {
  198|  46.9k|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  916|  46.9k|    do { \
  |  |  917|  46.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  46.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 46.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  46.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  199|  46.9k|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  916|  46.9k|    do { \
  |  |  917|  46.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  46.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 46.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  46.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  200|  46.9k|    IGRAPH_ASSERT(q->stor_end != NULL); /* queue is not empty */
  ------------------
  |  |  916|  46.9k|    do { \
  |  |  917|  46.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  46.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 46.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  46.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  201|  46.9k|    return *(q->begin);
  202|  46.9k|}
igraph_dqueue_int_pop:
  241|  4.62M|BASE FUNCTION(igraph_dqueue, pop)(TYPE(igraph_dqueue)* q) {
  242|  4.62M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  916|  4.62M|    do { \
  |  |  917|  4.62M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.62M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.62M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.62M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  243|  4.62M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  916|  4.62M|    do { \
  |  |  917|  4.62M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.62M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.62M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.62M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  244|  4.62M|    IGRAPH_ASSERT(q->stor_end != NULL); /* queue is not empty */
  ------------------
  |  |  916|  4.62M|    do { \
  |  |  917|  4.62M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.62M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.62M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.62M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  245|  4.62M|    BASE tmp = *(q->begin);
  ------------------
  |  |   71|  4.62M|    #define BASE igraph_integer_t
  ------------------
  246|  4.62M|    (q->begin)++;
  247|  4.62M|    if (q->begin == q->stor_end) {
  ------------------
  |  Branch (247:9): [True: 54.0k, False: 4.57M]
  ------------------
  248|  54.0k|        q->begin = q->stor_begin;
  249|  54.0k|    }
  250|  4.62M|    if (q->begin == q->end) {
  ------------------
  |  Branch (250:9): [True: 2.21M, False: 2.41M]
  ------------------
  251|  2.21M|        q->end = NULL;
  252|  2.21M|    }
  253|       |
  254|  4.62M|    return tmp;
  255|  4.62M|}
igraph_dqueue_int_push:
  308|  4.78M|igraph_error_t FUNCTION(igraph_dqueue, push)(TYPE(igraph_dqueue)* q, BASE elem) {
  309|  4.78M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  916|  4.78M|    do { \
  |  |  917|  4.78M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.78M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.78M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.78M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  310|  4.78M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  916|  4.78M|    do { \
  |  |  917|  4.78M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.78M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.78M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.78M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  311|  4.78M|    if (q->begin != q->end) {
  ------------------
  |  Branch (311:9): [True: 4.77M, False: 2.74k]
  ------------------
  312|       |        /* not full */
  313|  4.77M|        if (q->end == NULL) {
  ------------------
  |  Branch (313:13): [True: 2.22M, False: 2.55M]
  ------------------
  314|  2.22M|            q->end = q->begin;
  315|  2.22M|        }
  316|  4.77M|        *(q->end) = elem;
  317|  4.77M|        (q->end)++;
  318|  4.77M|        if (q->end == q->stor_end) {
  ------------------
  |  Branch (318:13): [True: 56.5k, False: 4.72M]
  ------------------
  319|  56.5k|            q->end = q->stor_begin;
  320|  56.5k|        }
  321|  4.77M|    } else {
  322|       |        /* full, allocate more storage */
  323|       |
  324|  2.74k|        BASE *bigger = NULL, *old = q->stor_begin;
  ------------------
  |  |   71|  2.74k|    #define BASE igraph_integer_t
  ------------------
  325|  2.74k|        igraph_integer_t old_size = q->stor_end - q->stor_begin;
  326|  2.74k|        igraph_integer_t new_capacity = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|  2.74k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_integer_t new_capacity = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|  2.74k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (326:41): [True: 2.74k, False: 0]
  ------------------
  327|       |
  328|  2.74k|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   77|  2.74k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (328:13): [True: 0, False: 2.74k]
  ------------------
  329|      0|            IGRAPH_ERROR("Cannot push to dqueue, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  330|      0|        }
  331|  2.74k|        if (new_capacity == 0) {
  ------------------
  |  Branch (331:13): [True: 0, False: 2.74k]
  ------------------
  332|      0|            new_capacity = 1;
  333|      0|        }
  334|       |
  335|  2.74k|        bigger = IGRAPH_CALLOC(new_capacity, BASE);
  ------------------
  |  |   38|  2.74k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  5.49k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 2.74k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 2.74k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 2.74k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  336|  2.74k|        IGRAPH_CHECK_OOM(bigger, "Cannot push to dqueue.");
  ------------------
  |  |  701|  2.74k|    do { \
  |  |  702|  2.74k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  2.74k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.74k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  2.74k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  337|       |
  338|  2.74k|        if (q->stor_end - q->begin > 0) {
  ------------------
  |  Branch (338:13): [True: 2.74k, False: 0]
  ------------------
  339|  2.74k|            memcpy(bigger, q->begin,
  340|  2.74k|                   (size_t)(q->stor_end - q->begin) * sizeof(BASE));
  341|  2.74k|        }
  342|  2.74k|        if (q->end - q->stor_begin > 0) {
  ------------------
  |  Branch (342:13): [True: 1.62k, False: 1.12k]
  ------------------
  343|  1.62k|            memcpy(bigger + (q->stor_end - q->begin), q->stor_begin,
  344|  1.62k|                   (size_t)(q->end - q->stor_begin) * sizeof(BASE));
  345|  1.62k|        }
  346|       |
  347|  2.74k|        q->end        = bigger + old_size;
  348|  2.74k|        q->stor_end   = bigger + new_capacity;
  349|  2.74k|        q->stor_begin = bigger;
  350|  2.74k|        q->begin      = bigger;
  351|       |
  352|  2.74k|        *(q->end) = elem;
  353|  2.74k|        (q->end)++;
  354|  2.74k|        if (q->end == q->stor_end) {
  ------------------
  |  Branch (354:13): [True: 229, False: 2.51k]
  ------------------
  355|    229|            q->end = q->stor_begin;
  356|    229|        }
  357|       |
  358|  2.74k|        IGRAPH_FREE(old);
  ------------------
  |  |   41|  2.74k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  359|  2.74k|    }
  360|       |
  361|  4.78M|    return IGRAPH_SUCCESS;
  362|  4.78M|}

igraph_error:
  211|  6.18k|                            igraph_error_t igraph_errno) {
  212|       |
  213|  6.18k|    if (igraph_i_error_handler) {
  ------------------
  |  Branch (213:9): [True: 6.18k, False: 0]
  ------------------
  214|  6.18k|        igraph_i_error_handler(reason, file, line, igraph_errno);
  215|  6.18k|#ifndef USING_R
  216|  6.18k|    }  else {
  217|      0|        igraph_error_handler_abort(reason, file, line, igraph_errno);
  218|      0|#endif
  219|      0|    }
  220|  6.18k|    return igraph_errno;
  221|  6.18k|}
igraph_error_handler_ignore:
  266|  6.18k|                                 int line, igraph_error_t igraph_errno) {
  267|  6.18k|    IGRAPH_UNUSED(reason);
  ------------------
  |  |   32|  6.18k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  268|  6.18k|    IGRAPH_UNUSED(file);
  ------------------
  |  |   32|  6.18k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  269|  6.18k|    IGRAPH_UNUSED(line);
  ------------------
  |  |   32|  6.18k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  270|  6.18k|    IGRAPH_UNUSED(igraph_errno);
  ------------------
  |  |   32|  6.18k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  271|       |
  272|  6.18k|    IGRAPH_FINALLY_FREE();
  273|  6.18k|}
igraph_set_error_handler:
  298|  6.18k|igraph_error_handler_t *igraph_set_error_handler(igraph_error_handler_t *new_handler) {
  299|  6.18k|    igraph_error_handler_t *previous_handler = igraph_i_error_handler;
  300|  6.18k|    igraph_i_error_handler = new_handler;
  301|  6.18k|    return previous_handler;
  302|  6.18k|}
IGRAPH_FINALLY_REAL:
  320|  1.14M|void IGRAPH_FINALLY_REAL(void (*func)(void*), void* ptr) {
  321|  1.14M|    int no = igraph_i_finally_stack_size;
  322|  1.14M|    if (no < 0) {
  ------------------
  |  Branch (322:9): [True: 0, False: 1.14M]
  ------------------
  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);
  ------------------
  |  |  867|      0|    do { \
  |  |  868|      0|        igraph_fatalf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  869|      0|                      __VA_ARGS__); \
  |  |  870|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (870:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  326|      0|    }
  327|  1.14M|    if (no >= (int) (sizeof(igraph_i_finally_stack) / sizeof(igraph_i_finally_stack[0]))) {
  ------------------
  |  Branch (327:9): [True: 0, False: 1.14M]
  ------------------
  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);
  ------------------
  |  |  867|      0|    do { \
  |  |  868|      0|        igraph_fatalf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  869|      0|                      __VA_ARGS__); \
  |  |  870|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (870:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  331|      0|    }
  332|  1.14M|    igraph_i_finally_stack[no].ptr = ptr;
  333|  1.14M|    igraph_i_finally_stack[no].func = func;
  334|  1.14M|    igraph_i_finally_stack[no].level = igraph_i_finally_stack_level;
  335|  1.14M|    igraph_i_finally_stack_size++;
  336|  1.14M|}
IGRAPH_FINALLY_CLEAN:
  338|   480k|void IGRAPH_FINALLY_CLEAN(int minus) {
  339|   480k|    igraph_i_finally_stack_size -= minus;
  340|   480k|    if (igraph_i_finally_stack_size < 0) {
  ------------------
  |  Branch (340:9): [True: 0, False: 480k]
  ------------------
  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);
  ------------------
  |  |  867|      0|    do { \
  |  |  868|      0|        igraph_fatalf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  869|      0|                      __VA_ARGS__); \
  |  |  870|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (870:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  345|      0|    }
  346|   480k|}
IGRAPH_FINALLY_FREE:
  348|  6.18k|void IGRAPH_FINALLY_FREE(void) {
  349|  9.27k|    for (; igraph_i_finally_stack_size > 0; igraph_i_finally_stack_size--) {
  ------------------
  |  Branch (349:12): [True: 3.09k, False: 6.18k]
  ------------------
  350|  3.09k|        int p = igraph_i_finally_stack_size - 1;
  351|       |        /* Call destructors only up to the current level */
  352|  3.09k|        if (igraph_i_finally_stack[p].level < igraph_i_finally_stack_level) {
  ------------------
  |  Branch (352:13): [True: 0, False: 3.09k]
  ------------------
  353|      0|            break;
  354|      0|        }
  355|  3.09k|        igraph_i_finally_stack[p].func(igraph_i_finally_stack[p].ptr);
  356|  3.09k|    }
  357|  6.18k|}
IGRAPH_FINALLY_STACK_SIZE:
  359|  2.02k|int IGRAPH_FINALLY_STACK_SIZE(void) {
  360|  2.02k|    return igraph_i_finally_stack_size;
  361|  2.02k|}
IGRAPH_FINALLY_ENTER:
  377|  36.7k|void IGRAPH_FINALLY_ENTER(void) {
  378|  36.7k|    int no = igraph_i_finally_stack_size;
  379|       |    /* Level indices must always be in increasing order in the finally stack */
  380|  36.7k|    if (no > 0 && igraph_i_finally_stack[no-1].level > igraph_i_finally_stack_level) {
  ------------------
  |  Branch (380:9): [True: 36.7k, False: 0]
  |  Branch (380:19): [True: 0, False: 36.7k]
  ------------------
  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.");
  ------------------
  |  |  887|      0|    do { \
  |  |  888|      0|        igraph_fatal(reason, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  889|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (889:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  384|      0|    }
  385|  36.7k|    igraph_i_finally_stack_level++;
  386|  36.7k|}
IGRAPH_FINALLY_EXIT:
  399|  36.7k|void IGRAPH_FINALLY_EXIT(void) {
  400|  36.7k|    igraph_i_finally_stack_level--;
  401|  36.7k|    if (igraph_i_finally_stack_level < 0) {
  ------------------
  |  Branch (401:9): [True: 0, False: 36.7k]
  ------------------
  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.");
  ------------------
  |  |  887|      0|    do { \
  |  |  888|      0|        igraph_fatal(reason, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  889|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (889:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  405|      0|    }
  406|  36.7k|}
igraph_warning_handler_ignore:
  426|  1.83k|void igraph_warning_handler_ignore(const char *reason, const char *file, int line) {
  427|  1.83k|    IGRAPH_UNUSED(reason);
  ------------------
  |  |   32|  1.83k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  428|  1.83k|    IGRAPH_UNUSED(file);
  ------------------
  |  |   32|  1.83k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  429|  1.83k|    IGRAPH_UNUSED(line);
  ------------------
  |  |   32|  1.83k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  430|  1.83k|}
igraph_warning:
  470|  1.83k|void igraph_warning(const char *reason, const char *file, int line) {
  471|       |
  472|  1.83k|    if (igraph_i_warning_handler) {
  ------------------
  |  Branch (472:9): [True: 1.83k, False: 0]
  ------------------
  473|  1.83k|        igraph_i_warning_handler(reason, file, line);
  474|  1.83k|#ifndef USING_R
  475|  1.83k|    }  else {
  476|      0|        igraph_warning_handler_print(reason, file, line);
  477|      0|#endif
  478|      0|    }
  479|  1.83k|}
igraph_set_warning_handler:
  523|  2.04k|igraph_warning_handler_t *igraph_set_warning_handler(igraph_warning_handler_t *new_handler) {
  524|  2.04k|    igraph_warning_handler_t *previous_handler = igraph_i_warning_handler;
  525|  2.04k|    igraph_i_warning_handler = new_handler;
  526|  2.04k|    return previous_handler;
  527|  2.04k|}

igraph_gen2wheap_init:
  113|  2.01k|) {
  114|       |    /* TODO: Currently, storage is allocated for the maximum number of elements
  115|       |     * right from the start. This is sufficient for the only use case as of this
  116|       |     * writing, the D-SATUR graph colouring algorithm, but it may not be efficcient
  117|       |     * for other use cases. Consider improving this in the future.
  118|       |     */
  119|  2.01k|    h->max_size = max_size;
  120|       |    /* We start with the biggest */
  121|  2.01k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&h->index2, max_size);
  ------------------
  |  |  124|  2.01k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.01k|    do { \
  |  |  |  |  649|  2.01k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.01k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.01k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.01k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.01k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.01k|    do { \
  |  |  |  |  592|  2.01k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.01k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.01k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.01k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.01k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.01k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  122|  2.01k|    h->cmp = cmp;
  123|  2.01k|    h->item_size = item_size;
  124|  2.01k|    h->data = igraph_calloc(max_size, item_size);
  125|  2.01k|    IGRAPH_CHECK_OOM(h->data, "Cannot initialize generic heap.");
  ------------------
  |  |  701|  2.01k|    do { \
  |  |  702|  2.01k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  2.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  2.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  126|  2.01k|    IGRAPH_FINALLY(igraph_free, h->data);
  ------------------
  |  |  591|  2.01k|    do { \
  |  |  592|  2.01k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.01k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.01k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.01k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.01k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  127|  2.01k|    IGRAPH_CHECK(igraph_vector_int_init(&h->index, 0));
  ------------------
  |  |  648|  2.01k|    do { \
  |  |  649|  2.01k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.01k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  128|       |
  129|  2.01k|    IGRAPH_FINALLY_CLEAN(2);
  130|  2.01k|    return IGRAPH_SUCCESS;
  131|  2.01k|}
igraph_gen2wheap_destroy:
  136|  2.01k|void igraph_gen2wheap_destroy(igraph_gen2wheap_t *h) {
  137|  2.01k|    IGRAPH_FREE(h->data);
  ------------------
  |  |   41|  2.01k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  138|  2.01k|    igraph_vector_int_destroy(&h->index);
  139|  2.01k|    igraph_vector_int_destroy(&h->index2);
  140|  2.01k|}
igraph_gen2wheap_size:
  145|   945k|igraph_integer_t igraph_gen2wheap_size(const igraph_gen2wheap_t *h) {
  146|   945k|    return igraph_vector_int_size(&h->index);
  147|   945k|}
igraph_gen2wheap_empty:
  160|   351k|igraph_bool_t igraph_gen2wheap_empty(const igraph_gen2wheap_t *h) {
  161|   351k|    return igraph_vector_int_empty(&h->index);
  162|   351k|}
igraph_gen2wheap_push_with_index:
  171|   349k|                                                igraph_integer_t idx, const void *elem) {
  172|       |
  173|   349k|    igraph_integer_t size = igraph_vector_int_size(&h->index);
  174|       |
  175|   349k|    if (size > IGRAPH_INTEGER_MAX - 2) {
  ------------------
  |  |   77|   349k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (175:9): [True: 0, False: 349k]
  ------------------
  176|       |        /* to allow size+2 below */
  177|      0|        IGRAPH_ERROR("Cannot push to gen2wheap, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  178|      0|    }
  179|       |
  180|   349k|    memcpy(ELEM(h, size), elem, h->item_size);
  ------------------
  |  |   34|   349k|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
  181|   349k|    IGRAPH_CHECK(igraph_vector_int_push_back(&h->index, idx));
  ------------------
  |  |  648|   349k|    do { \
  |  |  649|   349k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   349k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   349k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 349k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   349k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  182|   349k|    VECTOR(h->index2)[idx] = size + 2;
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  183|       |
  184|       |    /* maintain heap */
  185|   349k|    igraph_i_gen2wheap_shift_up(h, size);
  186|       |
  187|   349k|    return IGRAPH_SUCCESS;
  188|   349k|}
igraph_gen2wheap_max_index:
  210|   349k|igraph_integer_t igraph_gen2wheap_max_index(const igraph_gen2wheap_t *h) {
  211|   349k|    return VECTOR(h->index)[0];
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  212|   349k|}
igraph_gen2wheap_has_elem:
  218|   101k|igraph_bool_t igraph_gen2wheap_has_elem(const igraph_gen2wheap_t *h, igraph_integer_t idx) {
  219|   101k|    return VECTOR(h->index2)[idx] != 0;
  ------------------
  |  |   65|   101k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  220|   101k|}
igraph_gen2wheap_get:
  233|  50.9k|const void *igraph_gen2wheap_get(const igraph_gen2wheap_t *h, igraph_integer_t idx) {
  234|  50.9k|    igraph_integer_t i = VECTOR(h->index2)[idx] - 2;
  ------------------
  |  |   65|  50.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  235|  50.9k|    return ELEM(h, i);
  ------------------
  |  |   34|  50.9k|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
  236|  50.9k|}
igraph_gen2wheap_delete_max:
  244|   349k|void igraph_gen2wheap_delete_max(igraph_gen2wheap_t *h) {
  245|   349k|    igraph_integer_t tmpidx = VECTOR(h->index)[0];
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  246|   349k|    igraph_i_gen2wheap_switch(h, 0, igraph_gen2wheap_size(h) - 1);
  247|   349k|    igraph_vector_int_pop_back(&h->index);
  248|   349k|    VECTOR(h->index2)[tmpidx] = 0;
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  249|   349k|    igraph_i_gen2wheap_sink(h, 0);
  250|   349k|}
igraph_gen2wheap_modify:
  269|  50.9k|void igraph_gen2wheap_modify(igraph_gen2wheap_t *h, igraph_integer_t idx, const void *elem) {
  270|       |
  271|  50.9k|    igraph_integer_t pos = VECTOR(h->index2)[idx] - 2;
  ------------------
  |  |   65|  50.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  272|       |
  273|  50.9k|    memcpy(ELEM(h, pos), elem, h->item_size);
  ------------------
  |  |   34|  50.9k|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
  274|  50.9k|    igraph_i_gen2wheap_sink(h, pos);
  275|  50.9k|    igraph_i_gen2wheap_shift_up(h, pos);
  276|  50.9k|}
genheap.c:igraph_i_gen2wheap_shift_up:
   71|  1.84M|                                        igraph_integer_t elem) {
   72|  1.84M|    if (elem == 0 || h->cmp(ELEM(h, elem), ELEM(h, PARENT(elem))) < 0) {
  ------------------
  |  |   34|  1.76M|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
                  if (elem == 0 || h->cmp(ELEM(h, elem), ELEM(h, PARENT(elem))) < 0) {
  ------------------
  |  |   34|  1.76M|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
  |  Branch (72:9): [True: 86.8k, False: 1.76M]
  |  Branch (72:22): [True: 313k, False: 1.44M]
  ------------------
   73|       |        /* at the top */
   74|  1.44M|    } else {
   75|  1.44M|        igraph_i_gen2wheap_switch(h, elem, PARENT(elem));
  ------------------
  |  |   30|  1.44M|#define PARENT(x)     (((x)+1)/2-1)
  ------------------
   76|  1.44M|        igraph_i_gen2wheap_shift_up(h, PARENT(elem));
  ------------------
  |  |   30|  1.44M|#define PARENT(x)     (((x)+1)/2-1)
  ------------------
   77|  1.44M|    }
   78|  1.84M|}
genheap.c:igraph_i_gen2wheap_switch:
   53|  1.99M|                                      igraph_integer_t e1, igraph_integer_t e2) {
   54|  1.99M|    if (e1 != e2) {
  ------------------
  |  Branch (54:9): [True: 1.99M, False: 2.01k]
  ------------------
   55|  1.99M|        igraph_integer_t tmp1, tmp2;
   56|       |
   57|  1.99M|        swapfunc(ELEM(h, e1), ELEM(h, e2), h->item_size);
  ------------------
  |  |   34|  1.99M|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
                      swapfunc(ELEM(h, e1), ELEM(h, e2), h->item_size);
  ------------------
  |  |   34|  1.99M|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
   58|       |
   59|  1.99M|        tmp1 = VECTOR(h->index)[e1];
  ------------------
  |  |   65|  1.99M|#define VECTOR(v) ((v).stor_begin)
  ------------------
   60|  1.99M|        tmp2 = VECTOR(h->index)[e2];
  ------------------
  |  |   65|  1.99M|#define VECTOR(v) ((v).stor_begin)
  ------------------
   61|       |
   62|  1.99M|        VECTOR(h->index2)[tmp1] = e2 + 2;
  ------------------
  |  |   65|  1.99M|#define VECTOR(v) ((v).stor_begin)
  ------------------
   63|  1.99M|        VECTOR(h->index2)[tmp2] = e1 + 2;
  ------------------
  |  |   65|  1.99M|#define VECTOR(v) ((v).stor_begin)
  ------------------
   64|       |
   65|  1.99M|        VECTOR(h->index)[e1] = tmp2;
  ------------------
  |  |   65|  1.99M|#define VECTOR(v) ((v).stor_begin)
  ------------------
   66|  1.99M|        VECTOR(h->index)[e2] = tmp1;
  ------------------
  |  |   65|  1.99M|#define VECTOR(v) ((v).stor_begin)
  ------------------
   67|  1.99M|    }
   68|  1.99M|}
genheap.c:swapfunc:
   42|  1.99M|static void swapfunc(char * restrict a, char * restrict b, size_t es) {
   43|  1.99M|    char t;
   44|       |
   45|  31.8M|    do {
   46|  31.8M|        t = *a;
   47|  31.8M|        *a++ = *b;
   48|  31.8M|        *b++ = t;
   49|  31.8M|    } while (--es > 0);
  ------------------
  |  Branch (49:14): [True: 29.8M, False: 1.99M]
  ------------------
   50|  1.99M|}
genheap.c:igraph_i_gen2wheap_sink:
   81|   596k|                                    igraph_integer_t head) {
   82|   596k|    igraph_integer_t size = igraph_gen2wheap_size(h);
   83|   596k|    if (LEFTCHILD(head) >= size) {
  ------------------
  |  |   31|   596k|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
  |  Branch (83:9): [True: 28.2k, False: 567k]
  ------------------
   84|       |        /* no subtrees */
   85|   567k|    } else if (RIGHTCHILD(head) == size ||
  ------------------
  |  |   32|   567k|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
  |  Branch (85:16): [True: 2.47k, False: 565k]
  ------------------
   86|   567k|               h->cmp(ELEM(h, LEFTCHILD(head)), ELEM(h, RIGHTCHILD(head))) >= 0) {
  ------------------
  |  |   34|   565k|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
                             h->cmp(ELEM(h, LEFTCHILD(head)), ELEM(h, RIGHTCHILD(head))) >= 0) {
  ------------------
  |  |   34|   565k|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
  |  Branch (86:16): [True: 460k, False: 105k]
  ------------------
   87|       |        /* sink to the left if needed */
   88|   462k|        if (h->cmp(ELEM(h, head), ELEM(h, LEFTCHILD(head))) < 0) {
  ------------------
  |  |   34|   462k|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
                      if (h->cmp(ELEM(h, head), ELEM(h, LEFTCHILD(head))) < 0) {
  ------------------
  |  |   34|   462k|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
  |  Branch (88:13): [True: 100k, False: 362k]
  ------------------
   89|   100k|            igraph_i_gen2wheap_switch(h, head, LEFTCHILD(head));
  ------------------
  |  |   31|   100k|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
   90|   100k|            igraph_i_gen2wheap_sink(h, LEFTCHILD(head));
  ------------------
  |  |   31|   100k|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
   91|   100k|        }
   92|   462k|    } else {
   93|       |        /* sink to the right */
   94|   105k|        if (h->cmp(ELEM(h, head), ELEM(h, RIGHTCHILD(head))) < 0) {
  ------------------
  |  |   34|   105k|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
                      if (h->cmp(ELEM(h, head), ELEM(h, RIGHTCHILD(head))) < 0) {
  ------------------
  |  |   34|   105k|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
  |  Branch (94:13): [True: 95.7k, False: 9.45k]
  ------------------
   95|  95.7k|            igraph_i_gen2wheap_switch(h, head, RIGHTCHILD(head));
  ------------------
  |  |   32|  95.7k|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
   96|  95.7k|            igraph_i_gen2wheap_sink(h, RIGHTCHILD(head));
  ------------------
  |  |   32|  95.7k|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
   97|  95.7k|        }
   98|   105k|    }
   99|   596k|}

igraph_2wheap_init:
  806|  2.01k|igraph_error_t igraph_2wheap_init(igraph_2wheap_t *h, igraph_integer_t max_size) {
  807|  2.01k|    h->max_size = max_size;
  808|       |    /* We start with the biggest */
  809|  2.01k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&h->index2, max_size);
  ------------------
  |  |  124|  2.01k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.01k|    do { \
  |  |  |  |  649|  2.01k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.01k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.01k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.01k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.01k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.01k|    do { \
  |  |  |  |  592|  2.01k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.01k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.01k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.01k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.01k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.01k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  810|  2.01k|    IGRAPH_VECTOR_INIT_FINALLY(&h->data, 0);
  ------------------
  |  |  109|  2.01k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.01k|    do { \
  |  |  |  |  649|  2.01k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.01k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.01k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.01k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|  2.01k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.01k|    do { \
  |  |  |  |  592|  2.01k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.01k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.01k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.01k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.01k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.01k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (110:60): [Folded - Ignored]
  |  |  ------------------
  ------------------
  811|  2.01k|    IGRAPH_CHECK(igraph_vector_int_init(&h->index, 0));
  ------------------
  |  |  648|  2.01k|    do { \
  |  |  649|  2.01k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.01k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  812|       |    /* IGRAPH_FINALLY(igraph_vector_int_destroy, &h->index); */
  813|       |
  814|  2.01k|    IGRAPH_FINALLY_CLEAN(2);
  815|  2.01k|    return IGRAPH_SUCCESS;
  816|  2.01k|}
igraph_2wheap_destroy:
  821|  2.01k|void igraph_2wheap_destroy(igraph_2wheap_t *h) {
  822|  2.01k|    igraph_vector_destroy(&h->data);
  823|  2.01k|    igraph_vector_int_destroy(&h->index);
  824|  2.01k|    igraph_vector_int_destroy(&h->index2);
  825|  2.01k|}
igraph_2wheap_empty:
  839|   349k|igraph_bool_t igraph_2wheap_empty(const igraph_2wheap_t *h) {
  840|   349k|    return igraph_vector_empty(&h->data);
  841|   349k|}
igraph_2wheap_push_with_index:
  850|   347k|                                  igraph_integer_t idx, igraph_real_t elem) {
  851|       |
  852|       |    /*   printf("-> %.2g [%li]\n", elem, idx); */
  853|       |
  854|   347k|    igraph_integer_t size = igraph_vector_size(&h->data);
  855|       |
  856|   347k|    if (size > IGRAPH_INTEGER_MAX - 2) {
  ------------------
  |  |   77|   347k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (856:9): [True: 0, False: 347k]
  ------------------
  857|       |        /* to allow size+2 below */
  858|      0|        IGRAPH_ERROR("Cannot push to 2wheap, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  859|      0|    }
  860|       |
  861|   347k|    IGRAPH_CHECK(igraph_vector_push_back(&h->data, elem));
  ------------------
  |  |  648|   347k|    do { \
  |  |  649|   347k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   347k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   347k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 347k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   347k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  862|   347k|    IGRAPH_CHECK(igraph_vector_int_push_back(&h->index, idx));
  ------------------
  |  |  648|   347k|    do { \
  |  |  649|   347k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   347k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   347k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 347k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   347k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  863|   347k|    VECTOR(h->index2)[idx] = size + 2;
  ------------------
  |  |   65|   347k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  864|       |
  865|       |    /* maintain heap */
  866|   347k|    igraph_i_2wheap_shift_up(h, size);
  867|   347k|    return IGRAPH_SUCCESS;
  868|   347k|}
igraph_2wheap_size:
  873|   856k|igraph_integer_t igraph_2wheap_size(const igraph_2wheap_t *h) {
  874|   856k|    return igraph_vector_size(&h->data);
  875|   856k|}
igraph_2wheap_has_elem:
  905|   149k|igraph_bool_t igraph_2wheap_has_elem(const igraph_2wheap_t *h, igraph_integer_t idx) {
  906|   149k|    return VECTOR(h->index2)[idx] != 0;
  ------------------
  |  |   65|   149k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  907|   149k|}
igraph_2wheap_get:
  920|  59.7k|igraph_real_t igraph_2wheap_get(const igraph_2wheap_t *h, igraph_integer_t idx) {
  921|  59.7k|    igraph_integer_t i = VECTOR(h->index2)[idx] - 2;
  ------------------
  |  |   65|  59.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  922|  59.7k|    return VECTOR(h->data)[i];
  ------------------
  |  |   65|  59.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  923|  59.7k|}
igraph_2wheap_delete_max_index:
  972|   347k|igraph_real_t igraph_2wheap_delete_max_index(igraph_2wheap_t *h, igraph_integer_t *idx) {
  973|       |
  974|   347k|    igraph_real_t tmp = VECTOR(h->data)[0];
  ------------------
  |  |   65|   347k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  975|   347k|    igraph_integer_t tmpidx = VECTOR(h->index)[0];
  ------------------
  |  |   65|   347k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  976|   347k|    igraph_i_2wheap_switch(h, 0, igraph_2wheap_size(h) - 1);
  977|   347k|    igraph_vector_pop_back(&h->data);
  978|   347k|    igraph_vector_int_pop_back(&h->index);
  979|   347k|    VECTOR(h->index2)[tmpidx] = 0;
  ------------------
  |  |   65|   347k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  980|   347k|    igraph_i_2wheap_sink(h, 0);
  981|       |
  982|   347k|    if (idx) {
  ------------------
  |  Branch (982:9): [True: 347k, False: 0]
  ------------------
  983|   347k|        *idx = tmpidx;
  984|   347k|    }
  985|   347k|    return tmp;
  986|   347k|}
igraph_2wheap_modify:
  991|  59.7k|void igraph_2wheap_modify(igraph_2wheap_t *h, igraph_integer_t idx, igraph_real_t elem) {
  992|       |
  993|  59.7k|    igraph_integer_t pos = VECTOR(h->index2)[idx] - 2;
  ------------------
  |  |   65|  59.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  994|       |
  995|       |    /*   printf("-- %.2g -> %.2g\n", VECTOR(h->data)[pos], elem); */
  996|       |
  997|  59.7k|    VECTOR(h->data)[pos] = elem;
  ------------------
  |  |   65|  59.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  998|  59.7k|    igraph_i_2wheap_sink(h, pos);
  999|  59.7k|    igraph_i_2wheap_shift_up(h, pos);
 1000|  59.7k|}
indheap.c:igraph_i_2wheap_shift_up:
  768|  2.70M|                                     igraph_integer_t elem) {
  769|  2.70M|    if (elem == 0 || VECTOR(h->data)[elem] < VECTOR(h->data)[PARENT(elem)]) {
  ------------------
  |  |   65|  2.30M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                  if (elem == 0 || VECTOR(h->data)[elem] < VECTOR(h->data)[PARENT(elem)]) {
  ------------------
  |  |   65|  2.30M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                  if (elem == 0 || VECTOR(h->data)[elem] < VECTOR(h->data)[PARENT(elem)]) {
  ------------------
  |  |  739|  2.30M|#define PARENT(x)     (((x)+1)/2-1)
  ------------------
  |  Branch (769:9): [True: 400k, False: 2.30M]
  |  Branch (769:22): [True: 6.95k, False: 2.30M]
  ------------------
  770|       |        /* at the top */
  771|  2.30M|    } else {
  772|  2.30M|        igraph_i_2wheap_switch(h, elem, PARENT(elem));
  ------------------
  |  |  739|  2.30M|#define PARENT(x)     (((x)+1)/2-1)
  ------------------
  773|  2.30M|        igraph_i_2wheap_shift_up(h, PARENT(elem));
  ------------------
  |  |  739|  2.30M|#define PARENT(x)     (((x)+1)/2-1)
  ------------------
  774|  2.30M|    }
  775|  2.70M|}
indheap.c:igraph_i_2wheap_switch:
  749|  2.75M|                                   igraph_integer_t e1, igraph_integer_t e2) {
  750|  2.75M|    if (e1 != e2) {
  ------------------
  |  Branch (750:9): [True: 2.74M, False: 2.01k]
  ------------------
  751|  2.74M|        igraph_integer_t tmp1, tmp2;
  752|  2.74M|        igraph_real_t tmp3 = VECTOR(h->data)[e1];
  ------------------
  |  |   65|  2.74M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  753|  2.74M|        VECTOR(h->data)[e1] = VECTOR(h->data)[e2];
  ------------------
  |  |   65|  2.74M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(h->data)[e1] = VECTOR(h->data)[e2];
  ------------------
  |  |   65|  2.74M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  754|  2.74M|        VECTOR(h->data)[e2] = tmp3;
  ------------------
  |  |   65|  2.74M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  755|       |
  756|  2.74M|        tmp1 = VECTOR(h->index)[e1];
  ------------------
  |  |   65|  2.74M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  757|  2.74M|        tmp2 = VECTOR(h->index)[e2];
  ------------------
  |  |   65|  2.74M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  758|       |
  759|  2.74M|        VECTOR(h->index2)[tmp1] = e2 + 2;
  ------------------
  |  |   65|  2.74M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  760|  2.74M|        VECTOR(h->index2)[tmp2] = e1 + 2;
  ------------------
  |  |   65|  2.74M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  761|       |
  762|  2.74M|        VECTOR(h->index)[e1] = tmp2;
  ------------------
  |  |   65|  2.74M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  763|  2.74M|        VECTOR(h->index)[e2] = tmp1;
  ------------------
  |  |   65|  2.74M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  764|  2.74M|    }
  765|  2.75M|}
indheap.c:igraph_i_2wheap_sink:
  778|   509k|                                 igraph_integer_t head) {
  779|   509k|    igraph_integer_t size = igraph_2wheap_size(h);
  780|   509k|    if (LEFTCHILD(head) >= size) {
  ------------------
  |  |  740|   509k|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
  |  Branch (780:9): [True: 38.4k, False: 470k]
  ------------------
  781|       |        /* no subtrees */
  782|   470k|    } else if (RIGHTCHILD(head) == size ||
  ------------------
  |  |  741|   470k|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
  |  Branch (782:16): [True: 3.17k, False: 467k]
  ------------------
  783|   470k|               VECTOR(h->data)[LEFTCHILD(head)] >= VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |   65|   467k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                             VECTOR(h->data)[LEFTCHILD(head)] >= VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |  740|   467k|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
                             VECTOR(h->data)[LEFTCHILD(head)] >= VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |   65|   467k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                             VECTOR(h->data)[LEFTCHILD(head)] >= VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |  741|   467k|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
  |  Branch (783:16): [True: 418k, False: 49.5k]
  ------------------
  784|       |        /* sink to the left if needed */
  785|   421k|        if (VECTOR(h->data)[head] < VECTOR(h->data)[LEFTCHILD(head)]) {
  ------------------
  |  |   65|   421k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (VECTOR(h->data)[head] < VECTOR(h->data)[LEFTCHILD(head)]) {
  ------------------
  |  |   65|   421k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (VECTOR(h->data)[head] < VECTOR(h->data)[LEFTCHILD(head)]) {
  ------------------
  |  |  740|   421k|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
  |  Branch (785:13): [True: 55.0k, False: 366k]
  ------------------
  786|  55.0k|            igraph_i_2wheap_switch(h, head, LEFTCHILD(head));
  ------------------
  |  |  740|  55.0k|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
  787|  55.0k|            igraph_i_2wheap_sink(h, LEFTCHILD(head));
  ------------------
  |  |  740|  55.0k|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
  788|  55.0k|        }
  789|   421k|    } else {
  790|       |        /* sink to the right */
  791|  49.5k|        if (VECTOR(h->data)[head] < VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |   65|  49.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (VECTOR(h->data)[head] < VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |   65|  49.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (VECTOR(h->data)[head] < VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |  741|  49.5k|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
  |  Branch (791:13): [True: 47.1k, False: 2.37k]
  ------------------
  792|  47.1k|            igraph_i_2wheap_switch(h, head, RIGHTCHILD(head));
  ------------------
  |  |  741|  47.1k|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
  793|  47.1k|            igraph_i_2wheap_sink(h, RIGHTCHILD(head));
  ------------------
  |  |  741|  47.1k|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
  794|  47.1k|        }
  795|  49.5k|    }
  796|   509k|}

igraph_matrix_init:
   65|  2.02k|        TYPE(igraph_matrix) *m, igraph_integer_t nrow, igraph_integer_t ncol) {
   66|  2.02k|    igraph_integer_t size;
   67|  2.02k|    IGRAPH_ASSERT(nrow >= 0 && ncol >= 0);
  ------------------
  |  |  916|  2.02k|    do { \
  |  |  917|  2.02k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.05k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  Branch (604:50): [True: 2.02k, False: 0]
  |  |  |  |  |  Branch (604:50): [True: 2.02k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   68|  2.02k|    IGRAPH_SAFE_MULT(nrow, ncol, &size);
  ------------------
  |  |   57|  2.02k|    do { \
  |  |   58|  2.02k|        igraph_integer_t _safe_a = (a), _safe_b = (b); \
  |  |   59|  2.02k|        igraph_integer_t _safe_prod; \
  |  |   60|  2.02k|        if (__builtin_mul_overflow(_safe_a, _safe_b, &_safe_prod)) { \
  |  |  ------------------
  |  |  |  Branch (60:13): [True: 0, False: 2.02k]
  |  |  ------------------
  |  |   61|      0|            IGRAPH_ERRORF("Overflow when multiplying %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  469|      0|    do { \
  |  |  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  472|      0|        return igraph_errno; \
  |  |  |  |  473|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|      0|        } \
  |  |   63|  2.02k|        *(res) = _safe_prod; \
  |  |   64|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (64:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   69|  2.02k|    IGRAPH_CHECK(FUNCTION(igraph_vector, init)(&m->data, size));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   70|  2.02k|    m->nrow = nrow;
   71|  2.02k|    m->ncol = ncol;
   72|  2.02k|    return IGRAPH_SUCCESS;
   73|  2.02k|}
igraph_matrix_destroy:
  188|  2.02k|void FUNCTION(igraph_matrix, destroy)(TYPE(igraph_matrix) *m) {
  189|  2.02k|    FUNCTION(igraph_vector, destroy)(&m->data);
  ------------------
  |  |  175|  2.02k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   25|  2.02k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   24|  2.02k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  190|  2.02k|}
igraph_matrix_resize:
  241|  2.02k|igraph_error_t FUNCTION(igraph_matrix, resize)(TYPE(igraph_matrix) *m, igraph_integer_t nrow, igraph_integer_t ncol) {
  242|  2.02k|    igraph_integer_t size;
  243|  2.02k|    IGRAPH_ASSERT(nrow >= 0 && ncol >= 0);
  ------------------
  |  |  916|  2.02k|    do { \
  |  |  917|  2.02k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.05k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  Branch (604:50): [True: 2.02k, False: 0]
  |  |  |  |  |  Branch (604:50): [True: 2.02k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  244|  2.02k|    IGRAPH_SAFE_MULT(nrow, ncol, &size);
  ------------------
  |  |   57|  2.02k|    do { \
  |  |   58|  2.02k|        igraph_integer_t _safe_a = (a), _safe_b = (b); \
  |  |   59|  2.02k|        igraph_integer_t _safe_prod; \
  |  |   60|  2.02k|        if (__builtin_mul_overflow(_safe_a, _safe_b, &_safe_prod)) { \
  |  |  ------------------
  |  |  |  Branch (60:13): [True: 0, False: 2.02k]
  |  |  ------------------
  |  |   61|      0|            IGRAPH_ERRORF("Overflow when multiplying %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  469|      0|    do { \
  |  |  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  472|      0|        return igraph_errno; \
  |  |  |  |  473|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|      0|        } \
  |  |   63|  2.02k|        *(res) = _safe_prod; \
  |  |   64|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (64:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  245|  2.02k|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(&m->data, size));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  246|  2.02k|    m->nrow = nrow;
  247|  2.02k|    m->ncol = ncol;
  248|  2.02k|    return IGRAPH_SUCCESS;
  249|  2.02k|}
igraph_matrix_fill:
  970|  2.02k|void FUNCTION(igraph_matrix, fill)(TYPE(igraph_matrix) *m, BASE e) {
  971|  2.02k|    FUNCTION(igraph_vector, fill)(&m->data, e);
  ------------------
  |  |  175|  2.02k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   25|  2.02k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   24|  2.02k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  972|  2.02k|}

igraph_free:
   62|  12.8k|void igraph_free(void *ptr) {
   63|  12.8k|    IGRAPH_FREE(ptr);
  ------------------
  |  |   41|  12.8k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
   64|  12.8k|}
igraph_calloc:
   82|  2.01k|void *igraph_calloc(size_t count, size_t size) {
   83|  2.01k|    return (void *) IGRAPH_CALLOC(count * size, char);
  ------------------
  |  |   38|  2.01k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  4.02k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 2.01k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 2.01k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 2.01k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   84|  2.01k|}

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

igraph_stack_int_init:
   45|  16.6k|igraph_error_t FUNCTION(igraph_stack, init)(TYPE(igraph_stack)* s, igraph_integer_t capacity) {
   46|  16.6k|    igraph_integer_t alloc_size;
   47|  16.6k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  916|  16.6k|    do { \
  |  |  917|  16.6k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  16.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 16.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  16.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   48|  16.6k|    alloc_size = capacity > 0 ? capacity : 1;
  ------------------
  |  Branch (48:18): [True: 12.3k, False: 4.23k]
  ------------------
   49|  16.6k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  916|  16.6k|    do { \
  |  |  917|  16.6k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  16.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 16.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  16.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   50|  16.6k|    s->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   38|  16.6k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  33.2k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 16.6k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 16.6k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 16.6k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   51|  16.6k|    if (s->stor_begin == NULL) {
  ------------------
  |  Branch (51:9): [True: 0, False: 16.6k]
  ------------------
   52|      0|        IGRAPH_ERROR("Cannot initialize stack.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   53|      0|    }
   54|  16.6k|    s->stor_end = s->stor_begin + alloc_size;
   55|  16.6k|    s->end = s->stor_begin;
   56|       |
   57|  16.6k|    return IGRAPH_SUCCESS;
   58|  16.6k|}
igraph_stack_int_destroy:
   73|  16.6k|void FUNCTION(igraph_stack, destroy)    (TYPE(igraph_stack)* s) {
   74|  16.6k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  916|  16.6k|    do { \
  |  |  917|  16.6k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  16.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 16.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  16.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   75|  16.6k|    if (s->stor_begin != NULL) {
  ------------------
  |  Branch (75:9): [True: 16.6k, False: 0]
  ------------------
   76|  16.6k|        IGRAPH_FREE(s->stor_begin);
  ------------------
  |  |   41|  16.6k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
   77|  16.6k|        s->stor_begin = NULL;
   78|  16.6k|    }
   79|  16.6k|}
igraph_stack_int_capacity:
   99|  12.2k|igraph_integer_t FUNCTION(igraph_stack, capacity)(const TYPE(igraph_stack) *s) {
  100|  12.2k|    return s->stor_end - s->stor_begin;
  101|  12.2k|}
igraph_stack_int_reserve:
  119|  12.2k|igraph_error_t FUNCTION(igraph_stack, reserve)(TYPE(igraph_stack)* s, igraph_integer_t capacity) {
  120|  12.2k|    igraph_integer_t current_capacity;
  121|  12.2k|    BASE *tmp;
  ------------------
  |  |   71|  12.2k|    #define BASE igraph_integer_t
  ------------------
  122|       |
  123|  12.2k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  916|  12.2k|    do { \
  |  |  917|  12.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  12.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 12.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  12.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  124|  12.2k|    IGRAPH_ASSERT(s->stor_begin != NULL);
  ------------------
  |  |  916|  12.2k|    do { \
  |  |  917|  12.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  12.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 12.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  12.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  125|  12.2k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  916|  12.2k|    do { \
  |  |  917|  12.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  12.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 12.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  12.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  126|       |
  127|  12.2k|    current_capacity = FUNCTION(igraph_stack, capacity)(s);
  ------------------
  |  |  183|  12.2k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|  12.2k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  12.2k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  128|       |
  129|  12.2k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (129:9): [True: 0, False: 12.2k]
  ------------------
  130|      0|        return IGRAPH_SUCCESS;
  131|      0|    }
  132|       |
  133|  12.2k|    tmp = IGRAPH_REALLOC(s->stor_begin, capacity, BASE);
  ------------------
  |  |   40|  12.2k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   36|  24.4k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 12.2k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 12.2k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 12.2k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  134|  12.2k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for stack.");
  ------------------
  |  |  701|  12.2k|    do { \
  |  |  702|  12.2k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  12.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 12.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  12.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  135|       |
  136|  12.2k|    s->end = tmp + (s->end - s->stor_begin);
  137|  12.2k|    s->stor_begin = tmp;
  138|  12.2k|    s->stor_end = s->stor_begin + capacity;
  139|       |
  140|  12.2k|    return IGRAPH_SUCCESS;
  141|  12.2k|}
igraph_stack_int_empty:
  155|  3.64M|igraph_bool_t FUNCTION(igraph_stack, empty)(TYPE(igraph_stack)* s) {
  156|  3.64M|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  916|  3.64M|    do { \
  |  |  917|  3.64M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  3.64M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 3.64M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  3.64M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  157|  3.64M|    IGRAPH_ASSERT(s->stor_begin != NULL);
  ------------------
  |  |  916|  3.64M|    do { \
  |  |  917|  3.64M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  3.64M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 3.64M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  3.64M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  158|  3.64M|    return s->stor_begin == s->end;
  159|  3.64M|}
igraph_stack_int_size:
  172|  12.2k|igraph_integer_t FUNCTION(igraph_stack, size)(const TYPE(igraph_stack)* s) {
  173|  12.2k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  916|  12.2k|    do { \
  |  |  917|  12.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  12.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 12.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  12.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  174|  12.2k|    IGRAPH_ASSERT(s->stor_begin != NULL);
  ------------------
  |  |  916|  12.2k|    do { \
  |  |  917|  12.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  12.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 12.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  12.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  175|  12.2k|    return s->end - s->stor_begin;
  176|  12.2k|}
igraph_stack_int_push:
  209|  2.44M|igraph_error_t FUNCTION(igraph_stack, push)(TYPE(igraph_stack)* s, BASE elem) {
  210|  2.44M|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  916|  2.44M|    do { \
  |  |  917|  2.44M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.44M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.44M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.44M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  211|  2.44M|    IGRAPH_ASSERT(s->stor_begin != NULL);
  ------------------
  |  |  916|  2.44M|    do { \
  |  |  917|  2.44M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.44M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.44M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.44M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  212|       |
  213|  2.44M|    if (s->stor_end == s->end) {
  ------------------
  |  Branch (213:9): [True: 12.2k, False: 2.43M]
  ------------------
  214|       |        /* full, allocate more storage */
  215|  12.2k|        igraph_integer_t old_size = FUNCTION(igraph_stack, size)(s);
  ------------------
  |  |  183|  12.2k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|  12.2k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  12.2k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  216|  12.2k|        igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|  12.2k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|  12.2k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (216:37): [True: 12.2k, False: 0]
  ------------------
  217|  12.2k|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   77|  12.2k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (217:13): [True: 0, False: 12.2k]
  ------------------
  218|      0|            IGRAPH_ERROR("Cannot push to stack, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  219|      0|        }
  220|  12.2k|        if (new_size == 0) {
  ------------------
  |  Branch (220:13): [True: 0, False: 12.2k]
  ------------------
  221|      0|            new_size = 1;
  222|      0|        }
  223|  12.2k|        IGRAPH_CHECK(FUNCTION(igraph_stack, reserve)(s, new_size));
  ------------------
  |  |  648|  12.2k|    do { \
  |  |  649|  12.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  12.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  12.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 12.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  12.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  224|  12.2k|    }
  225|       |
  226|  2.44M|    *(s->end) = elem;
  227|  2.44M|    s->end += 1;
  228|       |
  229|  2.44M|    return IGRAPH_SUCCESS;
  230|  2.44M|}
igraph_stack_int_pop:
  245|  2.34M|BASE FUNCTION(igraph_stack, pop)(TYPE(igraph_stack)* s) {
  246|  2.34M|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  916|  2.34M|    do { \
  |  |  917|  2.34M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.34M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.34M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.34M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  247|  2.34M|    IGRAPH_ASSERT(s->stor_begin != NULL);
  ------------------
  |  |  916|  2.34M|    do { \
  |  |  917|  2.34M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.34M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.34M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.34M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  248|  2.34M|    IGRAPH_ASSERT(s->end != NULL);
  ------------------
  |  |  916|  2.34M|    do { \
  |  |  917|  2.34M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.34M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.34M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.34M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  249|  2.34M|    IGRAPH_ASSERT(s->end != s->stor_begin);
  ------------------
  |  |  916|  2.34M|    do { \
  |  |  917|  2.34M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.34M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.34M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.34M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  250|       |
  251|  2.34M|    (s->end)--;
  252|       |
  253|  2.34M|    return *(s->end);
  254|  2.34M|}
igraph_stack_int_top:
  269|   942k|BASE FUNCTION(igraph_stack, top)(const TYPE(igraph_stack)* s) {
  270|   942k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  916|   942k|    do { \
  |  |  917|   942k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   942k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 942k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   942k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  271|   942k|    IGRAPH_ASSERT(s->stor_begin != NULL);
  ------------------
  |  |  916|   942k|    do { \
  |  |  917|   942k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   942k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 942k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   942k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  272|   942k|    IGRAPH_ASSERT(s->end != NULL);
  ------------------
  |  |  916|   942k|    do { \
  |  |  917|   942k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   942k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 942k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   942k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  273|   942k|    IGRAPH_ASSERT(s->end != s->stor_begin);
  ------------------
  |  |  916|   942k|    do { \
  |  |  917|   942k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   942k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 942k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   942k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  274|       |
  275|   942k|    return *(s->end - 1);
  276|   942k|}

igraph_vector_int_list_init:
  110|  8.11k|igraph_error_t FUNCTION(init)(TYPE *v, igraph_integer_t size) {
  111|  8.11k|    igraph_integer_t alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (111:35): [True: 0, False: 8.11k]
  ------------------
  112|  8.11k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  916|  8.11k|    do { \
  |  |  917|  8.11k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  8.11k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 8.11k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  8.11k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  113|  8.11k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, ITEM_TYPE);
  ------------------
  |  |   38|  8.11k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  16.2k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 8.11k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 8.11k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 8.11k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  114|  8.11k|    if (v->stor_begin == 0) {
  ------------------
  |  Branch (114:9): [True: 0, False: 8.11k]
  ------------------
  115|      0|        IGRAPH_ERROR("Cannot initialize list.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  116|      0|    }
  117|  8.11k|    v->stor_end = v->stor_begin + alloc_size;
  118|  8.11k|    v->end = v->stor_begin + size;
  119|       |
  120|  8.11k|    IGRAPH_CHECK(INTERNAL_FUNCTION(init_slice)(v, v->stor_begin, v->end));
  ------------------
  |  |  648|  8.11k|    do { \
  |  |  649|  8.11k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  8.11k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  8.11k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 8.11k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  8.11k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  121|       |
  122|  8.11k|    return IGRAPH_SUCCESS;
  123|  8.11k|}
igraph_vector_int_list_destroy:
  177|  8.11k|void FUNCTION(destroy)(TYPE *v) {
  178|  8.11k|    IGRAPH_ASSERT(v != 0);
  ------------------
  |  |  916|  8.11k|    do { \
  |  |  917|  8.11k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  8.11k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 8.11k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  8.11k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  179|       |
  180|  8.11k|    if (v->stor_begin != 0) {
  ------------------
  |  Branch (180:9): [True: 8.11k, False: 0]
  ------------------
  181|  8.11k|        FUNCTION(clear)(v);
  ------------------
  |  |  141|  8.11k|        #define FUNCTION(c) CONCAT4(igraph_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   29|  8.11k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|  8.11k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  182|  8.11k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   41|  8.11k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  183|  8.11k|        v->stor_begin = NULL;
  184|  8.11k|    }
  185|  8.11k|}
igraph_vector_int_list_capacity:
  204|  23.1k|igraph_integer_t FUNCTION(capacity)(const TYPE *v) {
  205|  23.1k|    return v->stor_end - v->stor_begin;
  206|  23.1k|}
igraph_vector_int_list_reserve:
  234|  23.1k|igraph_error_t FUNCTION(reserve)(TYPE *v, igraph_integer_t capacity) {
  235|  23.1k|    igraph_integer_t current_capacity;
  236|  23.1k|    ITEM_TYPE *tmp;
  ------------------
  |  |   32|  23.1k|    #define ITEM_TYPE BASE_VECTOR
  |  |  ------------------
  |  |  |  |   72|  23.1k|    #define BASE_VECTOR igraph_vector_int_t
  |  |  ------------------
  ------------------
  237|       |
  238|  23.1k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  23.1k|    do { \
  |  |  917|  23.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  23.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 23.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  23.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  239|  23.1k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  23.1k|    do { \
  |  |  917|  23.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  23.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 23.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  23.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  240|  23.1k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  916|  23.1k|    do { \
  |  |  917|  23.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  23.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 23.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  23.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  241|       |
  242|  23.1k|    current_capacity = FUNCTION(capacity)(v);
  ------------------
  |  |  141|  23.1k|        #define FUNCTION(c) CONCAT4(igraph_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   29|  23.1k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|  23.1k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  243|       |
  244|  23.1k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (244:9): [True: 284, False: 22.8k]
  ------------------
  245|    284|        return IGRAPH_SUCCESS;
  246|    284|    }
  247|       |
  248|  22.8k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, ITEM_TYPE);
  ------------------
  |  |   40|  22.8k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   36|  45.7k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 22.8k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 22.8k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 22.8k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|  22.8k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for list.");
  ------------------
  |  |  701|  22.8k|    do { \
  |  |  702|  22.8k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  22.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 22.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  22.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  250|       |
  251|  22.8k|    v->end = tmp + (v->end - v->stor_begin);
  252|  22.8k|    v->stor_begin = tmp;
  253|  22.8k|    v->stor_end = v->stor_begin + capacity;
  254|       |
  255|  22.8k|    return IGRAPH_SUCCESS;
  256|  22.8k|}
igraph_vector_int_list_size:
  288|  23.1k|igraph_integer_t FUNCTION(size)(const TYPE *v) {
  289|  23.1k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  23.1k|    do { \
  |  |  917|  23.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  23.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 23.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  23.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  290|  23.1k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  23.1k|    do { \
  |  |  917|  23.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  23.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 23.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  23.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  291|  23.1k|    return v->end - v->stor_begin;
  292|  23.1k|}
igraph_vector_int_list_resize:
  325|  4.05k|igraph_error_t FUNCTION(resize)(TYPE *v, igraph_integer_t new_size) {
  326|  4.05k|    igraph_integer_t old_size;
  327|       |
  328|  4.05k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  4.05k|    do { \
  |  |  917|  4.05k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.05k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.05k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  329|  4.05k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  4.05k|    do { \
  |  |  917|  4.05k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.05k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.05k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  330|       |
  331|  4.05k|    IGRAPH_CHECK(FUNCTION(reserve)(v, new_size));
  ------------------
  |  |  648|  4.05k|    do { \
  |  |  649|  4.05k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  4.05k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  4.05k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  4.05k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  332|       |
  333|  4.05k|    old_size = FUNCTION(size)(v);
  ------------------
  |  |  141|  4.05k|        #define FUNCTION(c) CONCAT4(igraph_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   29|  4.05k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|  4.05k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  334|       |
  335|  4.05k|    if (old_size < new_size) {
  ------------------
  |  Branch (335:9): [True: 4.05k, False: 0]
  ------------------
  336|  4.05k|        IGRAPH_CHECK(INTERNAL_FUNCTION(init_slice)(v, v->stor_begin + old_size, v->stor_begin + new_size));
  ------------------
  |  |  648|  4.05k|    do { \
  |  |  649|  4.05k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  4.05k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  4.05k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  4.05k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  337|  4.05k|    } else if (old_size > new_size) {
  ------------------
  |  Branch (337:16): [True: 0, False: 0]
  ------------------
  338|      0|        INTERNAL_FUNCTION(destroy_slice)(v, v->stor_begin + new_size, v->stor_begin + old_size);
  ------------------
  |  |  142|      0|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   29|      0|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  339|      0|    }
  340|       |
  341|  4.05k|    v->end = v->stor_begin + new_size;
  342|       |
  343|  4.05k|    return IGRAPH_SUCCESS;
  344|  4.05k|}
igraph_vector_int_list_clear:
  358|  16.2k|void FUNCTION(clear)(TYPE *v) {
  359|  16.2k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  16.2k|    do { \
  |  |  917|  16.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  16.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 16.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  16.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  360|  16.2k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  16.2k|    do { \
  |  |  917|  16.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  16.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 16.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  16.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  361|  16.2k|    INTERNAL_FUNCTION(destroy_slice)(v, v->stor_begin, v->end);
  ------------------
  |  |  142|  16.2k|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   29|  16.2k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|  16.2k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  362|  16.2k|    v->end = v->stor_begin;
  363|  16.2k|}
igraph_vector_int_list_get_ptr:
  378|  2.08M|ITEM_TYPE *FUNCTION(get_ptr)(const TYPE *v, igraph_integer_t pos) {
  379|  2.08M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  2.08M|    do { \
  |  |  917|  2.08M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.08M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.08M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.08M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  380|  2.08M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  2.08M|    do { \
  |  |  917|  2.08M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.08M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.08M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.08M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  381|  2.08M|    return v->stor_begin + pos;
  382|  2.08M|}
igraph_vector_int_list_push_back_new:
  641|  1.43M|igraph_error_t FUNCTION(push_back_new)(TYPE *v, ITEM_TYPE** e) {
  642|  1.43M|    IGRAPH_CHECK(INTERNAL_FUNCTION(expand_if_full)(v));
  ------------------
  |  |  648|  1.43M|    do { \
  |  |  649|  1.43M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.43M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.43M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.43M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.43M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  643|  1.43M|    IGRAPH_CHECK(INTERNAL_FUNCTION(init_item)(v, v->end));
  ------------------
  |  |  648|  1.43M|    do { \
  |  |  649|  1.43M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.43M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.43M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.43M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.43M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  644|  1.43M|    if (e) {
  ------------------
  |  Branch (644:9): [True: 1.43M, False: 0]
  ------------------
  645|  1.43M|        *e = v->end;
  646|  1.43M|    }
  647|  1.43M|    v->end += 1;
  648|  1.43M|    return IGRAPH_SUCCESS;
  649|  1.43M|}
vector_list.c:igraph_i_vector_int_list_init_item:
 1052|  2.05M|static igraph_error_t INTERNAL_FUNCTION(init_item)(const TYPE *list, ITEM_TYPE *item) {
 1053|  2.05M|    IGRAPH_UNUSED(list);
  ------------------
  |  |   32|  2.05M|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
 1054|  2.05M|    return ITEM_FUNCTION(init)(item, 0);
  ------------------
  |  |   43|  2.05M|        #define ITEM_FUNCTION(f) CONCAT3(igraph_vector,SHORT,f)
  |  |  ------------------
  |  |  |  |   27|  2.05M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  2.05M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1055|  2.05M|}
vector_list.c:igraph_i_vector_int_list_destroy_item:
 1061|  2.05M|static void INTERNAL_FUNCTION(destroy_item)(ITEM_TYPE *item) {
 1062|  2.05M|    ITEM_FUNCTION(destroy)(item);
  ------------------
  |  |   43|  2.05M|        #define ITEM_FUNCTION(f) CONCAT3(igraph_vector,SHORT,f)
  |  |  ------------------
  |  |  |  |   27|  2.05M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  2.05M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1063|  2.05M|}
vector_list.c:igraph_i_vector_int_list_init_slice:
 1069|  12.1k|static igraph_error_t INTERNAL_FUNCTION(init_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1070|  12.1k|    ITEM_TYPE *current;
  ------------------
  |  |   32|  12.1k|    #define ITEM_TYPE BASE_VECTOR
  |  |  ------------------
  |  |  |  |   72|  12.1k|    #define BASE_VECTOR igraph_vector_int_t
  |  |  ------------------
  ------------------
 1071|  12.1k|    igraph_error_t retval;
 1072|       |
 1073|   631k|    for (current = start; current < end; current++) {
  ------------------
  |  Branch (1073:27): [True: 619k, False: 12.1k]
  ------------------
 1074|   619k|        retval = INTERNAL_FUNCTION(init_item)(list, current);
  ------------------
  |  |  142|   619k|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   29|   619k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|   619k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1075|   619k|        if (retval) {
  ------------------
  |  Branch (1075:13): [True: 0, False: 619k]
  ------------------
 1076|      0|            INTERNAL_FUNCTION(destroy_slice)(list, start, current);
  ------------------
  |  |  142|      0|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   29|      0|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1077|      0|            IGRAPH_CHECK(retval);
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1078|      0|        }
 1079|   619k|    }
 1080|       |
 1081|  12.1k|    return IGRAPH_SUCCESS;
 1082|  12.1k|}
vector_list.c:igraph_i_vector_int_list_destroy_slice:
 1084|  16.2k|static void INTERNAL_FUNCTION(destroy_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1085|  16.2k|    IGRAPH_UNUSED(list);
  ------------------
  |  |   32|  16.2k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
 1086|  2.06M|    for (; start < end; start++) {
  ------------------
  |  Branch (1086:12): [True: 2.05M, False: 16.2k]
  ------------------
 1087|  2.05M|        INTERNAL_FUNCTION(destroy_item)(start);
  ------------------
  |  |  142|  2.05M|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   29|  2.05M|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|  2.05M|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1088|  2.05M|    }
 1089|  16.2k|}
vector_list.c:igraph_i_vector_int_list_expand_if_full:
 1095|  1.43M|static igraph_error_t INTERNAL_FUNCTION(expand_if_full)(TYPE *v) {
 1096|  1.43M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  1.43M|    do { \
  |  |  917|  1.43M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.43M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.43M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.43M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1097|  1.43M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  1.43M|    do { \
  |  |  917|  1.43M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.43M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.43M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.43M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1098|       |
 1099|  1.43M|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (1099:9): [True: 19.1k, False: 1.41M]
  ------------------
 1100|  19.1k|        igraph_integer_t old_size = FUNCTION(size)(v);
  ------------------
  |  |  141|  19.1k|        #define FUNCTION(c) CONCAT4(igraph_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   29|  19.1k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|  19.1k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1101|  19.1k|        igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|  19.1k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|  19.1k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (1101:37): [True: 19.1k, False: 0]
  ------------------
 1102|  19.1k|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   77|  19.1k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (1102:13): [True: 0, False: 19.1k]
  ------------------
 1103|      0|            IGRAPH_ERROR("Cannot add new item to list, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1104|      0|        }
 1105|  19.1k|        if (new_size == 0) {
  ------------------
  |  Branch (1105:13): [True: 0, False: 19.1k]
  ------------------
 1106|      0|            new_size = 1;
 1107|      0|        }
 1108|  19.1k|        IGRAPH_CHECK(FUNCTION(reserve)(v, new_size));
  ------------------
  |  |  648|  19.1k|    do { \
  |  |  649|  19.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  19.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  19.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 19.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  19.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1109|  19.1k|    }
 1110|       |
 1111|  1.43M|    return IGRAPH_SUCCESS;
 1112|  1.43M|}
igraph_graph_list_init:
  110|  2.02k|igraph_error_t FUNCTION(init)(TYPE *v, igraph_integer_t size) {
  111|  2.02k|    igraph_integer_t alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (111:35): [True: 0, False: 2.02k]
  ------------------
  112|  2.02k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  916|  2.02k|    do { \
  |  |  917|  2.02k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  113|  2.02k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, ITEM_TYPE);
  ------------------
  |  |   38|  2.02k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  4.05k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 2.02k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 2.02k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 2.02k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  114|  2.02k|    if (v->stor_begin == 0) {
  ------------------
  |  Branch (114:9): [True: 0, False: 2.02k]
  ------------------
  115|      0|        IGRAPH_ERROR("Cannot initialize list.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  116|      0|    }
  117|  2.02k|    v->stor_end = v->stor_begin + alloc_size;
  118|  2.02k|    v->end = v->stor_begin + size;
  119|       |
  120|  2.02k|    IGRAPH_CHECK(INTERNAL_FUNCTION(init_slice)(v, v->stor_begin, v->end));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  121|       |
  122|  2.02k|    return IGRAPH_SUCCESS;
  123|  2.02k|}
igraph_graph_list_destroy:
  177|  2.02k|void FUNCTION(destroy)(TYPE *v) {
  178|  2.02k|    IGRAPH_ASSERT(v != 0);
  ------------------
  |  |  916|  2.02k|    do { \
  |  |  917|  2.02k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  179|       |
  180|  2.02k|    if (v->stor_begin != 0) {
  ------------------
  |  Branch (180:9): [True: 2.02k, False: 0]
  ------------------
  181|  2.02k|        FUNCTION(clear)(v);
  ------------------
  |  |  162|  2.02k|    #define FUNCTION(c) CONCAT2x(igraph_graph_list,c)
  |  |  ------------------
  |  |  |  |   24|  2.02k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  182|  2.02k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   41|  2.02k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  183|  2.02k|        v->stor_begin = NULL;
  184|  2.02k|    }
  185|  2.02k|}
igraph_graph_list_capacity:
  204|    284|igraph_integer_t FUNCTION(capacity)(const TYPE *v) {
  205|    284|    return v->stor_end - v->stor_begin;
  206|    284|}
igraph_graph_list_reserve:
  234|    284|igraph_error_t FUNCTION(reserve)(TYPE *v, igraph_integer_t capacity) {
  235|    284|    igraph_integer_t current_capacity;
  236|    284|    ITEM_TYPE *tmp;
  ------------------
  |  |   62|    284|    #define ITEM_TYPE BASE
  |  |  ------------------
  |  |  |  |  117|    284|    #define BASE igraph_t
  |  |  ------------------
  ------------------
  237|       |
  238|    284|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|    284|    do { \
  |  |  917|    284|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    284|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 284]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    284|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  239|    284|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|    284|    do { \
  |  |  917|    284|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    284|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 284]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    284|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  240|    284|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  916|    284|    do { \
  |  |  917|    284|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    284|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 284]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    284|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  241|       |
  242|    284|    current_capacity = FUNCTION(capacity)(v);
  ------------------
  |  |  162|    284|    #define FUNCTION(c) CONCAT2x(igraph_graph_list,c)
  |  |  ------------------
  |  |  |  |   24|    284|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  243|       |
  244|    284|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (244:9): [True: 0, False: 284]
  ------------------
  245|      0|        return IGRAPH_SUCCESS;
  246|      0|    }
  247|       |
  248|    284|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, ITEM_TYPE);
  ------------------
  |  |   40|    284|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   36|    568|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 284, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 284, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 284, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|    284|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for list.");
  ------------------
  |  |  701|    284|    do { \
  |  |  702|    284|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|    284|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 284]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|    284|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  250|       |
  251|    284|    v->end = tmp + (v->end - v->stor_begin);
  252|    284|    v->stor_begin = tmp;
  253|    284|    v->stor_end = v->stor_begin + capacity;
  254|       |
  255|    284|    return IGRAPH_SUCCESS;
  256|    284|}
igraph_graph_list_size:
  288|    284|igraph_integer_t FUNCTION(size)(const TYPE *v) {
  289|    284|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|    284|    do { \
  |  |  917|    284|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    284|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 284]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    284|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  290|    284|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|    284|    do { \
  |  |  917|    284|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    284|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 284]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    284|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  291|    284|    return v->end - v->stor_begin;
  292|    284|}
igraph_graph_list_clear:
  358|  4.05k|void FUNCTION(clear)(TYPE *v) {
  359|  4.05k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  4.05k|    do { \
  |  |  917|  4.05k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.05k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.05k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  360|  4.05k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  4.05k|    do { \
  |  |  917|  4.05k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.05k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.05k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  361|  4.05k|    INTERNAL_FUNCTION(destroy_slice)(v, v->stor_begin, v->end);
  ------------------
  |  |  163|  4.05k|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_graph_list,c)
  |  |  ------------------
  |  |  |  |   24|  4.05k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  362|  4.05k|    v->end = v->stor_begin;
  363|  4.05k|}
igraph_graph_list_push_back:
  588|  2.16k|igraph_error_t FUNCTION(push_back)(TYPE *v, ITEM_TYPE *e) {
  589|  2.16k|    IGRAPH_CHECK(INTERNAL_FUNCTION(expand_if_full)(v));
  ------------------
  |  |  648|  2.16k|    do { \
  |  |  649|  2.16k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.16k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.16k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.16k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.16k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  590|  2.16k|    *(v->end) = *e;
  591|  2.16k|    v->end += 1;
  592|  2.16k|    return IGRAPH_SUCCESS;
  593|  2.16k|}
graph_list.c:igraph_i_graph_list_init_slice:
 1069|  2.02k|static igraph_error_t INTERNAL_FUNCTION(init_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1070|  2.02k|    ITEM_TYPE *current;
  ------------------
  |  |   62|  2.02k|    #define ITEM_TYPE BASE
  |  |  ------------------
  |  |  |  |  117|  2.02k|    #define BASE igraph_t
  |  |  ------------------
  ------------------
 1071|  2.02k|    igraph_error_t retval;
 1072|       |
 1073|  2.02k|    for (current = start; current < end; current++) {
  ------------------
  |  Branch (1073:27): [True: 0, False: 2.02k]
  ------------------
 1074|      0|        retval = INTERNAL_FUNCTION(init_item)(list, current);
  ------------------
  |  |  163|      0|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_graph_list,c)
  |  |  ------------------
  |  |  |  |   24|      0|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1075|      0|        if (retval) {
  ------------------
  |  Branch (1075:13): [True: 0, False: 0]
  ------------------
 1076|      0|            INTERNAL_FUNCTION(destroy_slice)(list, start, current);
  ------------------
  |  |  163|      0|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_graph_list,c)
  |  |  ------------------
  |  |  |  |   24|      0|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1077|      0|            IGRAPH_CHECK(retval);
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1078|      0|        }
 1079|      0|    }
 1080|       |
 1081|  2.02k|    return IGRAPH_SUCCESS;
 1082|  2.02k|}
graph_list.c:igraph_i_graph_list_destroy_slice:
 1084|  4.05k|static void INTERNAL_FUNCTION(destroy_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1085|  4.05k|    IGRAPH_UNUSED(list);
  ------------------
  |  |   32|  4.05k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
 1086|  6.22k|    for (; start < end; start++) {
  ------------------
  |  Branch (1086:12): [True: 2.16k, False: 4.05k]
  ------------------
 1087|  2.16k|        INTERNAL_FUNCTION(destroy_item)(start);
  ------------------
  |  |  163|  2.16k|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_graph_list,c)
  |  |  ------------------
  |  |  |  |   24|  2.16k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1088|  2.16k|    }
 1089|  4.05k|}
graph_list.c:igraph_i_graph_list_expand_if_full:
 1095|  2.16k|static igraph_error_t INTERNAL_FUNCTION(expand_if_full)(TYPE *v) {
 1096|  2.16k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  2.16k|    do { \
  |  |  917|  2.16k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.16k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.16k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.16k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1097|  2.16k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  2.16k|    do { \
  |  |  917|  2.16k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.16k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.16k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.16k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1098|       |
 1099|  2.16k|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (1099:9): [True: 284, False: 1.88k]
  ------------------
 1100|    284|        igraph_integer_t old_size = FUNCTION(size)(v);
  ------------------
  |  |  162|    284|    #define FUNCTION(c) CONCAT2x(igraph_graph_list,c)
  |  |  ------------------
  |  |  |  |   24|    284|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1101|    284|        igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|    284|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|    284|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (1101:37): [True: 284, False: 0]
  ------------------
 1102|    284|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   77|    284|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (1102:13): [True: 0, False: 284]
  ------------------
 1103|      0|            IGRAPH_ERROR("Cannot add new item to list, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1104|      0|        }
 1105|    284|        if (new_size == 0) {
  ------------------
  |  Branch (1105:13): [True: 0, False: 284]
  ------------------
 1106|      0|            new_size = 1;
 1107|      0|        }
 1108|    284|        IGRAPH_CHECK(FUNCTION(reserve)(v, new_size));
  ------------------
  |  |  648|    284|    do { \
  |  |  649|    284|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    284|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    284|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 284]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    284|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1109|    284|    }
 1110|       |
 1111|  2.16k|    return IGRAPH_SUCCESS;
 1112|  2.16k|}

igraph_vector_int_pair_order:
  120|  91.3k|                                       igraph_vector_int_t* res, igraph_integer_t nodes) {
  121|  91.3k|    igraph_integer_t edges = igraph_vector_int_size(v);
  122|  91.3k|    igraph_vector_int_t ptr;
  123|  91.3k|    igraph_vector_int_t rad;
  124|  91.3k|    igraph_integer_t i, j;
  125|       |
  126|  91.3k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  91.3k|    do { \
  |  |  917|  91.3k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  91.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 91.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  91.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  127|  91.3k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  91.3k|    do { \
  |  |  917|  91.3k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  91.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 91.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  91.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  128|       |
  129|  91.3k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&ptr, nodes + 1);
  ------------------
  |  |  124|  91.3k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  91.3k|    do { \
  |  |  |  |  649|  91.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  91.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  91.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 91.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  91.3k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  91.3k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  91.3k|    do { \
  |  |  |  |  592|  91.3k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  91.3k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  91.3k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  91.3k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  91.3k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  91.3k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  130|  91.3k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&rad, edges);
  ------------------
  |  |  124|  91.3k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  91.3k|    do { \
  |  |  |  |  649|  91.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  91.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  91.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 91.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  91.3k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  91.3k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  91.3k|    do { \
  |  |  |  |  592|  91.3k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  91.3k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  91.3k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  91.3k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  91.3k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  91.3k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  131|  91.3k|    IGRAPH_CHECK(igraph_vector_int_resize(res, edges));
  ------------------
  |  |  648|  91.3k|    do { \
  |  |  649|  91.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  91.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  91.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 91.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  91.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  132|       |
  133|  2.94M|    for (i = 0; i < edges; i++) {
  ------------------
  |  Branch (133:17): [True: 2.85M, False: 91.3k]
  ------------------
  134|  2.85M|        igraph_integer_t radix = VECTOR(*v2)[i];
  ------------------
  |  |   65|  2.85M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  135|  2.85M|        if (VECTOR(ptr)[radix] != 0) {
  ------------------
  |  |   65|  2.85M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (135:13): [True: 1.33M, False: 1.51M]
  ------------------
  136|  1.33M|            VECTOR(rad)[i] = VECTOR(ptr)[radix];
  ------------------
  |  |   65|  1.33M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(rad)[i] = VECTOR(ptr)[radix];
  ------------------
  |  |   65|  1.33M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  137|  1.33M|        }
  138|  2.85M|        VECTOR(ptr)[radix] = i + 1;
  ------------------
  |  |   65|  2.85M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  139|  2.85M|    }
  140|       |
  141|  91.3k|    j = 0;
  142|  16.1M|    for (i = 0; i < nodes + 1; i++) {
  ------------------
  |  Branch (142:17): [True: 16.0M, False: 91.3k]
  ------------------
  143|  16.0M|        if (VECTOR(ptr)[i] != 0) {
  ------------------
  |  |   65|  16.0M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (143:13): [True: 1.51M, False: 14.5M]
  ------------------
  144|  1.51M|            igraph_integer_t next = VECTOR(ptr)[i] - 1;
  ------------------
  |  |   65|  1.51M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  145|  1.51M|            VECTOR(*res)[j++] = next;
  ------------------
  |  |   65|  1.51M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  146|  2.85M|            while (VECTOR(rad)[next] != 0) {
  ------------------
  |  |   65|  2.85M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (146:20): [True: 1.33M, False: 1.51M]
  ------------------
  147|  1.33M|                next = VECTOR(rad)[next] - 1;
  ------------------
  |  |   65|  1.33M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  148|  1.33M|                VECTOR(*res)[j++] = next;
  ------------------
  |  |   65|  1.33M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  149|  1.33M|            }
  150|  1.51M|        }
  151|  16.0M|    }
  152|       |
  153|  91.3k|    igraph_vector_int_null(&ptr);
  154|  91.3k|    igraph_vector_int_null(&rad);
  155|       |
  156|  2.94M|    for (i = 0; i < edges; i++) {
  ------------------
  |  Branch (156:17): [True: 2.85M, False: 91.3k]
  ------------------
  157|  2.85M|        igraph_integer_t edge = VECTOR(*res)[edges - i - 1];
  ------------------
  |  |   65|  2.85M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  158|  2.85M|        igraph_integer_t radix = VECTOR(*v)[edge];
  ------------------
  |  |   65|  2.85M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  159|  2.85M|        if (VECTOR(ptr)[radix] != 0) {
  ------------------
  |  |   65|  2.85M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (159:13): [True: 1.33M, False: 1.51M]
  ------------------
  160|  1.33M|            VECTOR(rad)[edge] = VECTOR(ptr)[radix];
  ------------------
  |  |   65|  1.33M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(rad)[edge] = VECTOR(ptr)[radix];
  ------------------
  |  |   65|  1.33M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  161|  1.33M|        }
  162|  2.85M|        VECTOR(ptr)[radix] = edge + 1;
  ------------------
  |  |   65|  2.85M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  163|  2.85M|    }
  164|       |
  165|  91.3k|    j = 0;
  166|  16.1M|    for (i = 0; i < nodes + 1; i++) {
  ------------------
  |  Branch (166:17): [True: 16.0M, False: 91.3k]
  ------------------
  167|  16.0M|        if (VECTOR(ptr)[i] != 0) {
  ------------------
  |  |   65|  16.0M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (167:13): [True: 1.51M, False: 14.5M]
  ------------------
  168|  1.51M|            igraph_integer_t next = VECTOR(ptr)[i] - 1;
  ------------------
  |  |   65|  1.51M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  169|  1.51M|            VECTOR(*res)[j++] = next;
  ------------------
  |  |   65|  1.51M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  170|  2.85M|            while (VECTOR(rad)[next] != 0) {
  ------------------
  |  |   65|  2.85M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (170:20): [True: 1.33M, False: 1.51M]
  ------------------
  171|  1.33M|                next = VECTOR(rad)[next] - 1;
  ------------------
  |  |   65|  1.33M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  172|  1.33M|                VECTOR(*res)[j++] = next;
  ------------------
  |  |   65|  1.33M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  173|  1.33M|            }
  174|  1.51M|        }
  175|  16.0M|    }
  176|       |
  177|  91.3k|    igraph_vector_int_destroy(&ptr);
  178|  91.3k|    igraph_vector_int_destroy(&rad);
  179|  91.3k|    IGRAPH_FINALLY_CLEAN(2);
  180|       |
  181|  91.3k|    return IGRAPH_SUCCESS;
  182|  91.3k|}

igraph_vector_init:
  135|  8.09k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_integer_t size) {
  136|  8.09k|    igraph_integer_t alloc_size;
  137|  8.09k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  916|  8.09k|    do { \
  |  |  917|  8.09k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  8.09k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 8.09k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  8.09k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  138|  8.09k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (138:18): [True: 4.05k, False: 4.04k]
  ------------------
  139|       |
  140|       |    /* When this function fails, it should leave stor_begin set to NULL,
  141|       |     * so that vector_destroy() is still safe to call on the vector.
  142|       |     * This simplifies freeing partially initialized data structures,
  143|       |     * such as adjacency lists, when an error occurs mid-initialization. */
  144|  8.09k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   38|  8.09k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  16.1k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 8.09k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 8.09k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 8.09k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  145|  8.09k|    if (v->stor_begin == NULL) {
  ------------------
  |  Branch (145:9): [True: 0, False: 8.09k]
  ------------------
  146|      0|        IGRAPH_ERROR("Cannot initialize vector.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  147|      0|    }
  148|  8.09k|    v->stor_end = v->stor_begin + alloc_size;
  149|  8.09k|    v->end = v->stor_begin + size;
  150|       |
  151|  8.09k|    return IGRAPH_SUCCESS;
  152|  8.09k|}
igraph_vector_destroy:
  400|  8.09k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  401|  8.09k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  8.09k|    do { \
  |  |  917|  8.09k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  8.09k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 8.09k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  8.09k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  402|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  403|       |     * We handle these cases gracefully. */
  404|  8.09k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (404:9): [True: 8.09k, False: 0]
  ------------------
  405|  8.09k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   41|  8.09k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  406|  8.09k|        v->stor_begin = NULL;
  407|  8.09k|    }
  408|  8.09k|}
igraph_vector_capacity:
  428|  22.4k|igraph_integer_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  429|  22.4k|    return v->stor_end - v->stor_begin;
  430|  22.4k|}
igraph_vector_reserve:
  460|  22.4k|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_integer_t capacity) {
  461|  22.4k|    igraph_integer_t current_capacity;
  462|  22.4k|    BASE *tmp;
  ------------------
  |  |   34|  22.4k|    #define BASE igraph_real_t
  ------------------
  463|       |
  464|  22.4k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  22.4k|    do { \
  |  |  917|  22.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  22.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 22.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  22.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  465|  22.4k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  22.4k|    do { \
  |  |  917|  22.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  22.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 22.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  22.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  466|  22.4k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  916|  22.4k|    do { \
  |  |  917|  22.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  22.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 22.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  22.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  467|       |
  468|  22.4k|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  175|  22.4k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   25|  22.4k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   24|  22.4k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  469|       |
  470|  22.4k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (470:9): [True: 6.75k, False: 15.6k]
  ------------------
  471|  6.75k|        return IGRAPH_SUCCESS;
  472|  6.75k|    }
  473|       |
  474|  15.6k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   40|  15.6k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   36|  31.3k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 15.6k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 15.6k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 15.6k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  475|  15.6k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  701|  15.6k|    do { \
  |  |  702|  15.6k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  15.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 15.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  15.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  476|       |
  477|  15.6k|    v->end = tmp + (v->end - v->stor_begin);
  478|  15.6k|    v->stor_begin = tmp;
  479|  15.6k|    v->stor_end = v->stor_begin + capacity;
  480|       |
  481|  15.6k|    return IGRAPH_SUCCESS;
  482|  15.6k|}
igraph_vector_empty:
  495|   349k|igraph_bool_t FUNCTION(igraph_vector, empty)(const TYPE(igraph_vector) *v) {
  496|   349k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|   349k|    do { \
  |  |  917|   349k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   349k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 349k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   349k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  497|   349k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|   349k|    do { \
  |  |  917|   349k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   349k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 349k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   349k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  498|   349k|    return v->stor_begin == v->end;
  499|   349k|}
igraph_vector_size:
  514|  1.21M|igraph_integer_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  515|  1.21M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  1.21M|    do { \
  |  |  917|  1.21M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.21M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.21M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.21M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  516|  1.21M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  1.21M|    do { \
  |  |  917|  1.21M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.21M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.21M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.21M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  517|  1.21M|    return v->end - v->stor_begin;
  518|  1.21M|}
igraph_vector_push_back:
  565|   347k|igraph_error_t FUNCTION(igraph_vector, push_back)(TYPE(igraph_vector) *v, BASE e) {
  566|   347k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|   347k|    do { \
  |  |  917|   347k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   347k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 347k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   347k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  567|   347k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|   347k|    do { \
  |  |  917|   347k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   347k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 347k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   347k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  568|       |
  569|   347k|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (569:9): [True: 13.6k, False: 333k]
  ------------------
  570|       |        /* full, allocate more storage */
  571|  13.6k|        igraph_integer_t old_size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  175|  13.6k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   25|  13.6k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   24|  13.6k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  572|  13.6k|        igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|  13.6k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|  13.6k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (572:37): [True: 13.6k, False: 0]
  ------------------
  573|  13.6k|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   77|  13.6k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (573:13): [True: 0, False: 13.6k]
  ------------------
  574|      0|            IGRAPH_ERROR("Cannot push to vector, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  575|      0|        }
  576|  13.6k|        if (new_size == 0) {
  ------------------
  |  Branch (576:13): [True: 0, False: 13.6k]
  ------------------
  577|      0|            new_size = 1;
  578|      0|        }
  579|  13.6k|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  648|  13.6k|    do { \
  |  |  649|  13.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  13.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  13.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 13.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  13.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  580|  13.6k|    }
  581|       |
  582|   347k|    *(v->end) = e;
  583|   347k|    v->end += 1;
  584|       |
  585|   347k|    return IGRAPH_SUCCESS;
  586|   347k|}
igraph_vector_fill:
  737|  6.73k|void FUNCTION(igraph_vector, fill)(TYPE(igraph_vector) *v, BASE e) {
  738|  6.73k|    BASE *ptr;
  ------------------
  |  |   34|  6.73k|    #define BASE igraph_real_t
  ------------------
  739|  6.73k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  6.73k|    do { \
  |  |  917|  6.73k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  6.73k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.73k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  6.73k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  740|  6.73k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  6.73k|    do { \
  |  |  917|  6.73k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  6.73k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.73k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  6.73k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  741|   360k|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (741:31): [True: 354k, False: 6.73k]
  ------------------
  742|   354k|        *ptr = e;
  743|   354k|    }
  744|  6.73k|}
igraph_vector_pop_back:
  813|   347k|BASE FUNCTION(igraph_vector, pop_back)(TYPE(igraph_vector) *v) {
  814|   347k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|   347k|    do { \
  |  |  917|   347k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   347k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 347k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   347k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  815|   347k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|   347k|    do { \
  |  |  917|   347k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   347k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 347k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   347k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  816|   347k|    IGRAPH_ASSERT(v->end != NULL);
  ------------------
  |  |  916|   347k|    do { \
  |  |  917|   347k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   347k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 347k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   347k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  817|   347k|    IGRAPH_ASSERT(v->end != v->stor_begin);
  ------------------
  |  |  916|   347k|    do { \
  |  |  917|   347k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   347k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 347k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   347k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  818|       |
  819|   347k|    (v->end)--;
  820|       |
  821|   347k|    return *(v->end);
  822|   347k|}
igraph_vector_resize:
 1241|  8.76k|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_integer_t new_size) {
 1242|  8.76k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  8.76k|    do { \
  |  |  917|  8.76k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  8.76k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 8.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  8.76k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1243|  8.76k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  8.76k|    do { \
  |  |  917|  8.76k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  8.76k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 8.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  8.76k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1244|  8.76k|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  648|  8.76k|    do { \
  |  |  649|  8.76k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  8.76k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  8.76k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 8.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  8.76k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1245|  8.76k|    v->end = v->stor_begin + new_size;
 1246|  8.76k|    return IGRAPH_SUCCESS;
 1247|  8.76k|}
igraph_vector_char_init:
  135|  1.93k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_integer_t size) {
  136|  1.93k|    igraph_integer_t alloc_size;
  137|  1.93k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  916|  1.93k|    do { \
  |  |  917|  1.93k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.93k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.93k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.93k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  138|  1.93k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (138:18): [True: 1.93k, False: 0]
  ------------------
  139|       |
  140|       |    /* When this function fails, it should leave stor_begin set to NULL,
  141|       |     * so that vector_destroy() is still safe to call on the vector.
  142|       |     * This simplifies freeing partially initialized data structures,
  143|       |     * such as adjacency lists, when an error occurs mid-initialization. */
  144|  1.93k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   38|  1.93k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  3.86k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 1.93k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 1.93k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 1.93k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  145|  1.93k|    if (v->stor_begin == NULL) {
  ------------------
  |  Branch (145:9): [True: 0, False: 1.93k]
  ------------------
  146|      0|        IGRAPH_ERROR("Cannot initialize vector.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  147|      0|    }
  148|  1.93k|    v->stor_end = v->stor_begin + alloc_size;
  149|  1.93k|    v->end = v->stor_begin + size;
  150|       |
  151|  1.93k|    return IGRAPH_SUCCESS;
  152|  1.93k|}
igraph_vector_char_destroy:
  400|  1.93k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  401|  1.93k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  1.93k|    do { \
  |  |  917|  1.93k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.93k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.93k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.93k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  402|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  403|       |     * We handle these cases gracefully. */
  404|  1.93k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (404:9): [True: 1.93k, False: 0]
  ------------------
  405|  1.93k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   41|  1.93k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  406|  1.93k|        v->stor_begin = NULL;
  407|  1.93k|    }
  408|  1.93k|}
igraph_vector_bool_init:
  135|  2.02k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_integer_t size) {
  136|  2.02k|    igraph_integer_t alloc_size;
  137|  2.02k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  916|  2.02k|    do { \
  |  |  917|  2.02k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  138|  2.02k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (138:18): [True: 0, False: 2.02k]
  ------------------
  139|       |
  140|       |    /* When this function fails, it should leave stor_begin set to NULL,
  141|       |     * so that vector_destroy() is still safe to call on the vector.
  142|       |     * This simplifies freeing partially initialized data structures,
  143|       |     * such as adjacency lists, when an error occurs mid-initialization. */
  144|  2.02k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   38|  2.02k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  4.05k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 2.02k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 2.02k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 2.02k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  145|  2.02k|    if (v->stor_begin == NULL) {
  ------------------
  |  Branch (145:9): [True: 0, False: 2.02k]
  ------------------
  146|      0|        IGRAPH_ERROR("Cannot initialize vector.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  147|      0|    }
  148|  2.02k|    v->stor_end = v->stor_begin + alloc_size;
  149|  2.02k|    v->end = v->stor_begin + size;
  150|       |
  151|  2.02k|    return IGRAPH_SUCCESS;
  152|  2.02k|}
igraph_vector_bool_destroy:
  400|  2.02k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  401|  2.02k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  2.02k|    do { \
  |  |  917|  2.02k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  402|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  403|       |     * We handle these cases gracefully. */
  404|  2.02k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (404:9): [True: 2.02k, False: 0]
  ------------------
  405|  2.02k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   41|  2.02k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  406|  2.02k|        v->stor_begin = NULL;
  407|  2.02k|    }
  408|  2.02k|}
igraph_vector_bool_capacity:
  428|  4.05k|igraph_integer_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  429|  4.05k|    return v->stor_end - v->stor_begin;
  430|  4.05k|}
igraph_vector_bool_reserve:
  460|  4.05k|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_integer_t capacity) {
  461|  4.05k|    igraph_integer_t current_capacity;
  462|  4.05k|    BASE *tmp;
  ------------------
  |  |   58|  4.05k|    #define BASE igraph_bool_t
  ------------------
  463|       |
  464|  4.05k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  4.05k|    do { \
  |  |  917|  4.05k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.05k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.05k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  465|  4.05k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  4.05k|    do { \
  |  |  917|  4.05k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.05k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.05k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  466|  4.05k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  916|  4.05k|    do { \
  |  |  917|  4.05k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.05k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.05k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  467|       |
  468|  4.05k|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  180|  4.05k|        #define FUNCTION(a,c) CONCAT3x(a,bool,c)
  |  |  ------------------
  |  |  |  |   26|  4.05k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  ------------------
  ------------------
  469|       |
  470|  4.05k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (470:9): [True: 2.23k, False: 1.81k]
  ------------------
  471|  2.23k|        return IGRAPH_SUCCESS;
  472|  2.23k|    }
  473|       |
  474|  1.81k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   40|  1.81k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   36|  3.63k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 1.81k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 1.81k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 1.81k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  475|  1.81k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  701|  1.81k|    do { \
  |  |  702|  1.81k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  1.81k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.81k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  1.81k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  476|       |
  477|  1.81k|    v->end = tmp + (v->end - v->stor_begin);
  478|  1.81k|    v->stor_begin = tmp;
  479|  1.81k|    v->stor_end = v->stor_begin + capacity;
  480|       |
  481|  1.81k|    return IGRAPH_SUCCESS;
  482|  1.81k|}
igraph_vector_bool_size:
  514|  2.47k|igraph_integer_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  515|  2.47k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  2.47k|    do { \
  |  |  917|  2.47k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.47k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.47k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  516|  2.47k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  2.47k|    do { \
  |  |  917|  2.47k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.47k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.47k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  517|  2.47k|    return v->end - v->stor_begin;
  518|  2.47k|}
igraph_vector_bool_null:
  717|  1.28k|void FUNCTION(igraph_vector, null)(TYPE(igraph_vector) *v) {
  718|  1.28k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  1.28k|    do { \
  |  |  917|  1.28k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.28k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  719|  1.28k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  1.28k|    do { \
  |  |  917|  1.28k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.28k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  720|  1.28k|    if (FUNCTION(igraph_vector, size)(v) > 0) {
  ------------------
  |  |  180|  1.28k|        #define FUNCTION(a,c) CONCAT3x(a,bool,c)
  |  |  ------------------
  |  |  |  |   26|  1.28k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  ------------------
  ------------------
  |  Branch (720:9): [True: 1.19k, False: 93]
  ------------------
  721|  1.19k|        memset(v->stor_begin, 0, sizeof(BASE) * FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  180|  1.19k|        #define FUNCTION(a,c) CONCAT3x(a,bool,c)
  |  |  ------------------
  |  |  |  |   26|  1.19k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  ------------------
  ------------------
  722|  1.19k|    }
  723|  1.28k|}
igraph_vector_bool_resize:
 1241|  4.05k|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_integer_t new_size) {
 1242|  4.05k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  4.05k|    do { \
  |  |  917|  4.05k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.05k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.05k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1243|  4.05k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  4.05k|    do { \
  |  |  917|  4.05k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.05k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.05k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1244|  4.05k|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  648|  4.05k|    do { \
  |  |  649|  4.05k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  4.05k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  4.05k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  4.05k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1245|  4.05k|    v->end = v->stor_begin + new_size;
 1246|  4.05k|    return IGRAPH_SUCCESS;
 1247|  4.05k|}
igraph_vector_int_init:
  135|  5.99M|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_integer_t size) {
  136|  5.99M|    igraph_integer_t alloc_size;
  137|  5.99M|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  916|  5.99M|    do { \
  |  |  917|  5.99M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  5.99M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 5.99M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  5.99M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  138|  5.99M|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (138:18): [True: 733k, False: 5.25M]
  ------------------
  139|       |
  140|       |    /* When this function fails, it should leave stor_begin set to NULL,
  141|       |     * so that vector_destroy() is still safe to call on the vector.
  142|       |     * This simplifies freeing partially initialized data structures,
  143|       |     * such as adjacency lists, when an error occurs mid-initialization. */
  144|  5.99M|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   38|  5.99M|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  11.9M|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 5.99M, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 5.99M, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 5.99M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  145|  5.99M|    if (v->stor_begin == NULL) {
  ------------------
  |  Branch (145:9): [True: 0, False: 5.99M]
  ------------------
  146|      0|        IGRAPH_ERROR("Cannot initialize vector.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  147|      0|    }
  148|  5.99M|    v->stor_end = v->stor_begin + alloc_size;
  149|  5.99M|    v->end = v->stor_begin + size;
  150|       |
  151|  5.99M|    return IGRAPH_SUCCESS;
  152|  5.99M|}
igraph_vector_int_destroy:
  400|  5.99M|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  401|  5.99M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  5.99M|    do { \
  |  |  917|  5.99M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  5.99M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 5.99M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  5.99M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  402|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  403|       |     * We handle these cases gracefully. */
  404|  5.99M|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (404:9): [True: 5.99M, False: 0]
  ------------------
  405|  5.99M|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   41|  5.99M|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  406|  5.99M|        v->stor_begin = NULL;
  407|  5.99M|    }
  408|  5.99M|}
igraph_vector_int_capacity:
  428|  17.1M|igraph_integer_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  429|  17.1M|    return v->stor_end - v->stor_begin;
  430|  17.1M|}
igraph_vector_int_reserve:
  460|  17.1M|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_integer_t capacity) {
  461|  17.1M|    igraph_integer_t current_capacity;
  462|  17.1M|    BASE *tmp;
  ------------------
  |  |   71|  17.1M|    #define BASE igraph_integer_t
  ------------------
  463|       |
  464|  17.1M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  17.1M|    do { \
  |  |  917|  17.1M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  17.1M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 17.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  17.1M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  465|  17.1M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  17.1M|    do { \
  |  |  917|  17.1M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  17.1M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 17.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  17.1M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  466|  17.1M|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  916|  17.1M|    do { \
  |  |  917|  17.1M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  17.1M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 17.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  17.1M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  467|       |
  468|  17.1M|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  183|  17.1M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|  17.1M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  17.1M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  469|       |
  470|  17.1M|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (470:9): [True: 15.2M, False: 1.91M]
  ------------------
  471|  15.2M|        return IGRAPH_SUCCESS;
  472|  15.2M|    }
  473|       |
  474|  1.91M|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   40|  1.91M|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   36|  3.82M|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 1.91M, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 1.91M, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 1.91M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  475|  1.91M|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  701|  1.91M|    do { \
  |  |  702|  1.91M|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  1.91M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.91M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  1.91M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  476|       |
  477|  1.91M|    v->end = tmp + (v->end - v->stor_begin);
  478|  1.91M|    v->stor_begin = tmp;
  479|  1.91M|    v->stor_end = v->stor_begin + capacity;
  480|       |
  481|  1.91M|    return IGRAPH_SUCCESS;
  482|  1.91M|}
igraph_vector_int_empty:
  495|   421k|igraph_bool_t FUNCTION(igraph_vector, empty)(const TYPE(igraph_vector) *v) {
  496|   421k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|   421k|    do { \
  |  |  917|   421k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   421k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 421k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   421k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  497|   421k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|   421k|    do { \
  |  |  917|   421k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   421k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 421k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   421k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  498|   421k|    return v->stor_begin == v->end;
  499|   421k|}
igraph_vector_int_size:
  514|  18.1M|igraph_integer_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  515|  18.1M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  18.1M|    do { \
  |  |  917|  18.1M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  18.1M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 18.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  18.1M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  516|  18.1M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  18.1M|    do { \
  |  |  917|  18.1M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  18.1M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 18.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  18.1M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  517|  18.1M|    return v->end - v->stor_begin;
  518|  18.1M|}
igraph_vector_int_clear:
  534|  1.38M|void FUNCTION(igraph_vector, clear)(TYPE(igraph_vector)* v) {
  535|  1.38M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  1.38M|    do { \
  |  |  917|  1.38M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.38M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.38M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.38M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  536|  1.38M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  1.38M|    do { \
  |  |  917|  1.38M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.38M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.38M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.38M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  537|  1.38M|    v->end = v->stor_begin;
  538|  1.38M|}
igraph_vector_int_push_back:
  565|  6.59M|igraph_error_t FUNCTION(igraph_vector, push_back)(TYPE(igraph_vector) *v, BASE e) {
  566|  6.59M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  6.59M|    do { \
  |  |  917|  6.59M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  6.59M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.59M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  6.59M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  567|  6.59M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  6.59M|    do { \
  |  |  917|  6.59M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  6.59M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.59M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  6.59M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  568|       |
  569|  6.59M|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (569:9): [True: 801k, False: 5.79M]
  ------------------
  570|       |        /* full, allocate more storage */
  571|   801k|        igraph_integer_t old_size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  183|   801k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|   801k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|   801k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  572|   801k|        igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|   801k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|   801k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (572:37): [True: 801k, False: 0]
  ------------------
  573|   801k|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   77|   801k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (573:13): [True: 0, False: 801k]
  ------------------
  574|      0|            IGRAPH_ERROR("Cannot push to vector, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  575|      0|        }
  576|   801k|        if (new_size == 0) {
  ------------------
  |  Branch (576:13): [True: 0, False: 801k]
  ------------------
  577|      0|            new_size = 1;
  578|      0|        }
  579|   801k|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  648|   801k|    do { \
  |  |  649|   801k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   801k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   801k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 801k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   801k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  580|   801k|    }
  581|       |
  582|  6.59M|    *(v->end) = e;
  583|  6.59M|    v->end += 1;
  584|       |
  585|  6.59M|    return IGRAPH_SUCCESS;
  586|  6.59M|}
igraph_vector_int_insert:
  603|  51.1k|        TYPE(igraph_vector) *v, igraph_integer_t pos, BASE value) {
  604|  51.1k|    igraph_integer_t size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  183|  51.1k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|  51.1k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  51.1k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  605|  51.1k|    IGRAPH_ASSERT(0 <= pos && pos <= size);
  ------------------
  |  |  916|  51.1k|    do { \
  |  |  917|  51.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   102k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 51.1k]
  |  |  |  |  |  Branch (604:50): [True: 51.1k, False: 0]
  |  |  |  |  |  Branch (604:50): [True: 51.1k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  51.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  606|  51.1k|    if (size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   77|  51.1k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (606:9): [True: 0, False: 51.1k]
  ------------------
  607|      0|        IGRAPH_ERROR("Cannot insert to vector, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  608|      0|    }
  609|  51.1k|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(v, size + 1));
  ------------------
  |  |  648|  51.1k|    do { \
  |  |  649|  51.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  51.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  51.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 51.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  51.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  610|  51.1k|    if (pos < size) {
  ------------------
  |  Branch (610:9): [True: 33.7k, False: 17.3k]
  ------------------
  611|  33.7k|        memmove(v->stor_begin + pos + 1, v->stor_begin + pos,
  612|  33.7k|                sizeof(BASE) * (size - pos));
  613|  33.7k|    }
  614|  51.1k|    v->stor_begin[pos] = value;
  615|  51.1k|    return IGRAPH_SUCCESS;
  616|  51.1k|}
igraph_vector_int_get_ptr:
  674|   396k|BASE* FUNCTION(igraph_vector, get_ptr)(const TYPE(igraph_vector) *v, igraph_integer_t pos) {
  675|   396k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|   396k|    do { \
  |  |  917|   396k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   396k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 396k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   396k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  676|   396k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|   396k|    do { \
  |  |  917|   396k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   396k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 396k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   396k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  677|   396k|    return v->stor_begin + pos;
  678|   396k|}
igraph_vector_int_null:
  717|   522k|void FUNCTION(igraph_vector, null)(TYPE(igraph_vector) *v) {
  718|   522k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|   522k|    do { \
  |  |  917|   522k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   522k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 522k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   522k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  719|   522k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|   522k|    do { \
  |  |  917|   522k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   522k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 522k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   522k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  720|   522k|    if (FUNCTION(igraph_vector, size)(v) > 0) {
  ------------------
  |  |  183|   522k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|   522k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|   522k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (720:9): [True: 517k, False: 4.59k]
  ------------------
  721|   517k|        memset(v->stor_begin, 0, sizeof(BASE) * FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  183|   517k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|   517k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|   517k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  722|   517k|    }
  723|   522k|}
igraph_vector_int_fill:
  737|  26.3k|void FUNCTION(igraph_vector, fill)(TYPE(igraph_vector) *v, BASE e) {
  738|  26.3k|    BASE *ptr;
  ------------------
  |  |   71|  26.3k|    #define BASE igraph_integer_t
  ------------------
  739|  26.3k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  26.3k|    do { \
  |  |  917|  26.3k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  26.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 26.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  26.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  740|  26.3k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  26.3k|    do { \
  |  |  917|  26.3k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  26.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 26.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  26.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  741|  4.56M|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (741:31): [True: 4.54M, False: 26.3k]
  ------------------
  742|  4.54M|        *ptr = e;
  743|  4.54M|    }
  744|  26.3k|}
igraph_vector_int_range:
  766|  2.02k|igraph_error_t FUNCTION(igraph_vector, range)(TYPE(igraph_vector) *v, BASE start, BASE end) {
  767|  2.02k|    BASE *p;
  ------------------
  |  |   71|  2.02k|    #define BASE igraph_integer_t
  ------------------
  768|  2.02k|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(v, (end - start)));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  769|       |
  770|   351k|    for (p = v->stor_begin; p < v->end; p++) {
  ------------------
  |  Branch (770:29): [True: 349k, False: 2.02k]
  ------------------
  771|   349k|        *p = start;
  772|   349k|        start = start + ONE;
  ------------------
  |  |   77|   349k|    #define ONE 1
  ------------------
  773|   349k|    }
  774|       |
  775|  2.02k|    return IGRAPH_SUCCESS;
  776|  2.02k|}
igraph_vector_int_pop_back:
  813|  1.00M|BASE FUNCTION(igraph_vector, pop_back)(TYPE(igraph_vector) *v) {
  814|  1.00M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  1.00M|    do { \
  |  |  917|  1.00M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.00M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.00M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.00M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  815|  1.00M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  1.00M|    do { \
  |  |  917|  1.00M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.00M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.00M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.00M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  816|  1.00M|    IGRAPH_ASSERT(v->end != NULL);
  ------------------
  |  |  916|  1.00M|    do { \
  |  |  917|  1.00M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.00M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.00M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.00M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  817|  1.00M|    IGRAPH_ASSERT(v->end != v->stor_begin);
  ------------------
  |  |  916|  1.00M|    do { \
  |  |  917|  1.00M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.00M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.00M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.00M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  818|       |
  819|  1.00M|    (v->end)--;
  820|       |
  821|  1.00M|    return *(v->end);
  822|  1.00M|}
igraph_vector_int_sort:
  933|   700k|void FUNCTION(igraph_vector, sort)(TYPE(igraph_vector) *v) {
  934|   700k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|   700k|    do { \
  |  |  917|   700k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   700k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 700k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   700k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  935|   700k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|   700k|    do { \
  |  |  917|   700k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   700k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 700k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   700k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  936|   700k|    igraph_qsort(v->stor_begin, FUNCTION(igraph_vector, size)(v),
  ------------------
  |  |  183|   700k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|   700k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|   700k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  937|   700k|                 sizeof(BASE), FUNCTION(igraph_vector, sort_cmp));
  ------------------
  |  |  183|   700k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|   700k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|   700k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  938|   700k|}
igraph_vector_int_resize:
 1241|  16.1M|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_integer_t new_size) {
 1242|  16.1M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  16.1M|    do { \
  |  |  917|  16.1M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  16.1M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 16.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  16.1M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1243|  16.1M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  16.1M|    do { \
  |  |  917|  16.1M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  16.1M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 16.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  16.1M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1244|  16.1M|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  648|  16.1M|    do { \
  |  |  649|  16.1M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  16.1M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  16.1M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 16.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  16.1M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1245|  16.1M|    v->end = v->stor_begin + new_size;
 1246|  16.1M|    return IGRAPH_SUCCESS;
 1247|  16.1M|}
igraph_vector_int_max:
 1304|  36.5k|BASE FUNCTION(igraph_vector, max)(const TYPE(igraph_vector) *v) {
 1305|  36.5k|    BASE max;
  ------------------
  |  |   71|  36.5k|    #define BASE igraph_integer_t
  ------------------
 1306|  36.5k|    BASE *ptr;
  ------------------
  |  |   71|  36.5k|    #define BASE igraph_integer_t
  ------------------
 1307|  36.5k|    IGRAPH_ASSERT(!FUNCTION(igraph_vector, empty)(v));
  ------------------
  |  |  916|  36.5k|    do { \
  |  |  917|  36.5k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  36.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 36.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  36.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1308|  36.5k|    max = *(v->stor_begin);
 1309|       |#if defined(BASE_IGRAPH_REAL)
 1310|       |    if (isnan(max)) { return max; }; /* Result is NaN */
 1311|       |#endif
 1312|  36.5k|    ptr = v->stor_begin + 1;
 1313|  3.00M|    while (ptr < v->end) {
  ------------------
  |  Branch (1313:12): [True: 2.97M, False: 36.5k]
  ------------------
 1314|  2.97M|        if ((*ptr) > max) {
  ------------------
  |  Branch (1314:13): [True: 239k, False: 2.73M]
  ------------------
 1315|   239k|            max = *ptr;
 1316|   239k|        }
 1317|       |#if defined(BASE_IGRAPH_REAL)
 1318|       |        else if (isnan(*ptr))
 1319|       |            return *ptr; /* Result is NaN */
 1320|       |#endif
 1321|  2.97M|        ptr++;
 1322|  2.97M|    }
 1323|  36.5k|    return max;
 1324|  36.5k|}
igraph_vector_int_which_max:
 1342|  2.01k|igraph_integer_t FUNCTION(igraph_vector, which_max)(const TYPE(igraph_vector) *v) {
 1343|  2.01k|    BASE *max;
  ------------------
  |  |   71|  2.01k|    #define BASE igraph_integer_t
  ------------------
 1344|  2.01k|    BASE *ptr;
  ------------------
  |  |   71|  2.01k|    #define BASE igraph_integer_t
  ------------------
 1345|  2.01k|    IGRAPH_ASSERT(!FUNCTION(igraph_vector, empty)(v));
  ------------------
  |  |  916|  2.01k|    do { \
  |  |  917|  2.01k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1346|  2.01k|    max = ptr = v->stor_begin;
 1347|       |#if defined(BASE_IGRAPH_REAL)
 1348|       |    if (isnan(*ptr)) { return ptr - v->stor_begin; } /* Result is NaN */
 1349|       |#endif
 1350|  2.01k|    ptr++;
 1351|   349k|    while (ptr < v->end) {
  ------------------
  |  Branch (1351:12): [True: 347k, False: 2.01k]
  ------------------
 1352|   347k|        if (*ptr > *max) {
  ------------------
  |  Branch (1352:13): [True: 1.87k, False: 345k]
  ------------------
 1353|  1.87k|            max = ptr;
 1354|  1.87k|        }
 1355|       |#if defined(BASE_IGRAPH_REAL)
 1356|       |        else if (isnan(*ptr)) {
 1357|       |            return ptr - v->stor_begin; /* Result is NaN */
 1358|       |        }
 1359|       |#endif
 1360|   347k|        ptr++;
 1361|   347k|    }
 1362|  2.01k|    return max - v->stor_begin;
 1363|  2.01k|}
igraph_vector_int_min:
 1378|  31.2k|BASE FUNCTION(igraph_vector, min)(const TYPE(igraph_vector) *v) {
 1379|  31.2k|    BASE min;
  ------------------
  |  |   71|  31.2k|    #define BASE igraph_integer_t
  ------------------
 1380|  31.2k|    BASE *ptr;
  ------------------
  |  |   71|  31.2k|    #define BASE igraph_integer_t
  ------------------
 1381|  31.2k|    IGRAPH_ASSERT(!FUNCTION(igraph_vector, empty)(v));
  ------------------
  |  |  916|  31.2k|    do { \
  |  |  917|  31.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  31.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 31.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  31.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1382|  31.2k|    min = *(v->stor_begin);
 1383|       |#if defined(BASE_IGRAPH_REAL)
 1384|       |    if (isnan(min)) { return min; }; /* Result is NaN */
 1385|       |#endif
 1386|  31.2k|    ptr = v->stor_begin + 1;
 1387|  5.46M|    while (ptr < v->end) {
  ------------------
  |  Branch (1387:12): [True: 5.43M, False: 31.2k]
  ------------------
 1388|  5.43M|        if ((*ptr) < min) {
  ------------------
  |  Branch (1388:13): [True: 23.3k, False: 5.41M]
  ------------------
 1389|  23.3k|            min = *ptr;
 1390|  23.3k|        }
 1391|       |#if defined(BASE_IGRAPH_REAL)
 1392|       |        else if (isnan(*ptr)) {
 1393|       |            return *ptr; /* Result is NaN */
 1394|       |        }
 1395|       |#endif
 1396|  5.43M|        ptr++;
 1397|  5.43M|    }
 1398|  31.2k|    return min;
 1399|  31.2k|}
igraph_vector_int_init_copy:
 1515|  13.6k|) {
 1516|  13.6k|    igraph_integer_t from_size;
 1517|       |
 1518|  13.6k|    IGRAPH_ASSERT(from != NULL);
  ------------------
  |  |  916|  13.6k|    do { \
  |  |  917|  13.6k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  13.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 13.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  13.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1519|  13.6k|    IGRAPH_ASSERT(from->stor_begin != NULL);
  ------------------
  |  |  916|  13.6k|    do { \
  |  |  917|  13.6k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  13.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 13.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  13.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1520|       |
 1521|  13.6k|    from_size = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  183|  13.6k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|  13.6k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  13.6k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1522|  13.6k|    IGRAPH_CHECK(FUNCTION(igraph_vector, init)(to, from_size));
  ------------------
  |  |  648|  13.6k|    do { \
  |  |  649|  13.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  13.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  13.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 13.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  13.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1523|       |
 1524|  13.6k|    memcpy(to->stor_begin, from->stor_begin, from_size * sizeof(BASE));
 1525|       |
 1526|  13.6k|    return IGRAPH_SUCCESS;
 1527|  13.6k|}
igraph_vector_int_remove_section:
 1693|  51.1k|        TYPE(igraph_vector) *v, igraph_integer_t from, igraph_integer_t to) {
 1694|  51.1k|    igraph_integer_t size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  183|  51.1k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|  51.1k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  51.1k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1695|       |
 1696|  51.1k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  51.1k|    do { \
  |  |  917|  51.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  51.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 51.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  51.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1697|  51.1k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  51.1k|    do { \
  |  |  917|  51.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  51.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 51.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  51.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1698|       |
 1699|  51.1k|    if (from < 0) {
  ------------------
  |  Branch (1699:9): [True: 0, False: 51.1k]
  ------------------
 1700|      0|        from = 0;
 1701|      0|    }
 1702|       |
 1703|  51.1k|    if (to > size) {
  ------------------
  |  Branch (1703:9): [True: 0, False: 51.1k]
  ------------------
 1704|      0|        to = size;
 1705|      0|    }
 1706|       |
 1707|  51.1k|    if (to > from) {
  ------------------
  |  Branch (1707:9): [True: 51.1k, False: 0]
  ------------------
 1708|  51.1k|        memmove(v->stor_begin + from, v->stor_begin + to,
 1709|  51.1k|                sizeof(BASE) * (v->end - v->stor_begin - to));
 1710|  51.1k|        v->end -= (to - from);
 1711|  51.1k|    }
 1712|  51.1k|}
igraph_vector_int_remove:
 1728|  51.1k|void FUNCTION(igraph_vector, remove)(TYPE(igraph_vector) *v, igraph_integer_t elem) {
 1729|  51.1k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  51.1k|    do { \
  |  |  917|  51.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  51.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 51.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  51.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1730|  51.1k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  51.1k|    do { \
  |  |  917|  51.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  51.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 51.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  51.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1731|  51.1k|    FUNCTION(igraph_vector, remove_section)(v, elem, elem + 1);
  ------------------
  |  |  183|  51.1k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|  51.1k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  51.1k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1732|  51.1k|}
igraph_vector_int_isininterval:
 1809|  84.1k|        BASE high) {
 1810|  84.1k|    BASE *ptr;
  ------------------
  |  |   71|  84.1k|    #define BASE igraph_integer_t
  ------------------
 1811|  84.1k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  84.1k|    do { \
  |  |  917|  84.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  84.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 84.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  84.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1812|  84.1k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  84.1k|    do { \
  |  |  917|  84.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  84.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 84.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  84.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1813|  5.09M|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (1813:31): [True: 5.00M, False: 84.1k]
  ------------------
 1814|       |        /* Note that the following is not equivalent to *ptr < low || *ptr > high
 1815|       |         * when *ptr is NaN! */
 1816|  5.00M|        if (!(*ptr >= low && *ptr <= high)) {
  ------------------
  |  Branch (1816:15): [True: 5.00M, False: 0]
  |  Branch (1816:30): [True: 5.00M, False: 0]
  ------------------
 1817|      0|            return 0;
 1818|      0|        }
 1819|  5.00M|    }
 1820|  84.1k|    return 1;
 1821|  84.1k|}
igraph_vector_int_binsearch:
 2107|   102k|        BASE what, igraph_integer_t *pos) {
 2108|   102k|    return FUNCTION(igraph_i_vector, binsearch_slice)(v, what, pos,
  ------------------
  |  |  183|   102k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|   102k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|   102k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2109|   102k|            0, FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  183|   102k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|   102k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|   102k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2110|   102k|}
igraph_vector_int_contains_sorted:
 2201|  57.3k|igraph_bool_t FUNCTION(igraph_vector, contains_sorted)(const TYPE(igraph_vector) *v, BASE what) {
 2202|  57.3k|    igraph_integer_t left = 0;
 2203|  57.3k|    igraph_integer_t right = FUNCTION(igraph_vector, size)(v) - 1;
  ------------------
  |  |  183|  57.3k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|  57.3k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  57.3k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2204|       |
 2205|   148k|    while (left <= right) {
  ------------------
  |  Branch (2205:12): [True: 96.0k, False: 52.6k]
  ------------------
 2206|       |        /* (right + left) / 2 could theoretically overflow for long vectors */
 2207|  96.0k|        igraph_integer_t middle = left + ((right - left) >> 1);
 2208|  96.0k|        if (what < VECTOR(*v)[middle]) {
  ------------------
  |  |   65|  96.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2208:13): [True: 56.7k, False: 39.2k]
  ------------------
 2209|  56.7k|            right = middle - 1;
 2210|  56.7k|        } else if (what > VECTOR(*v)[middle]) {
  ------------------
  |  |   65|  39.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2210:20): [True: 34.6k, False: 4.65k]
  ------------------
 2211|  34.6k|            left = middle + 1;
 2212|  34.6k|        } else {
 2213|  4.65k|            return true;
 2214|  4.65k|        }
 2215|  96.0k|    }
 2216|       |
 2217|  52.6k|    return false;
 2218|  57.3k|}
igraph_vector_int_add_constant:
 2258|  2.01k|void FUNCTION(igraph_vector, add_constant)(TYPE(igraph_vector) *v, BASE plus) {
 2259|  2.01k|    igraph_integer_t i, n = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  183|  2.01k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|  2.01k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  2.01k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2260|   351k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (2260:17): [True: 349k, False: 2.01k]
  ------------------
 2261|       |#ifdef SUM
 2262|       |        SUM(VECTOR(*v)[i], VECTOR(*v)[i], plus);
 2263|       |#else
 2264|   349k|        VECTOR(*v)[i] += plus;
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 2265|   349k|#endif
 2266|   349k|    }
 2267|  2.01k|}
igraph_vector_int_contains:
 2284|  62.4k|        BASE what) {
 2285|  62.4k|    const BASE *p = v->stor_begin;
 2286|  3.78M|    while (p < v->end) {
  ------------------
  |  Branch (2286:12): [True: 3.75M, False: 31.2k]
  ------------------
 2287|       |#ifdef EQ
 2288|       |        if (EQ(*p, what)) {
 2289|       |#else
 2290|  3.75M|        if (*p == what) {
  ------------------
  |  Branch (2290:13): [True: 31.2k, False: 3.71M]
  ------------------
 2291|  31.2k|#endif
 2292|  31.2k|            return true;
 2293|  31.2k|        }
 2294|  3.71M|        p++;
 2295|  3.71M|    }
 2296|  31.2k|    return false;
 2297|  62.4k|}
igraph_vector_int_update:
 2481|   669k|                                    const TYPE(igraph_vector) *from) {
 2482|   669k|    igraph_integer_t n = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  183|   669k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|   669k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|   669k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2483|   669k|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(to, n));
  ------------------
  |  |  648|   669k|    do { \
  |  |  649|   669k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   669k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   669k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 669k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   669k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2484|   669k|    memcpy(to->stor_begin, from->stor_begin, sizeof(BASE)*n);
 2485|   669k|    return IGRAPH_SUCCESS;
 2486|   669k|}
igraph_vector_int_swap:
 2498|   677k|void FUNCTION(igraph_vector, swap)(TYPE(igraph_vector) *v1, TYPE(igraph_vector) *v2) {
 2499|       |
 2500|   677k|    TYPE(igraph_vector) tmp;
  ------------------
  |  |  184|   677k|        #define TYPE(a) CONCAT3(a,SHORT,t)
  |  |  ------------------
  |  |  |  |   27|   677k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|   677k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2501|       |
 2502|   677k|    tmp = *v1;
 2503|   677k|    *v1 = *v2;
 2504|   677k|    *v2 = tmp;
 2505|   677k|}
vector.c:igraph_vector_int_sort_cmp:
  899|   256k|static int FUNCTION(igraph_vector, sort_cmp)(const void *a, const void *b) {
  900|   256k|    const BASE *da = (const BASE *) a;
  901|   256k|    const BASE *db = (const BASE *) b;
  902|       |
  903|   256k|    return (*da > *db) - (*da < *db);
  904|   256k|}
vector.c:igraph_i_vector_int_binsearch_slice:
 2160|   102k|        BASE what, igraph_integer_t *pos, igraph_integer_t start, igraph_integer_t end) {
 2161|   102k|    igraph_integer_t left  = start;
 2162|   102k|    igraph_integer_t right = end - 1;
 2163|       |
 2164|   195k|    while (left <= right) {
  ------------------
  |  Branch (2164:12): [True: 144k, False: 51.1k]
  ------------------
 2165|       |        /* (right + left) / 2 could theoretically overflow for long vectors */
 2166|   144k|        igraph_integer_t middle = left + ((right - left) >> 1);
 2167|   144k|        if (VECTOR(*v)[middle] > what) {
  ------------------
  |  |   65|   144k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2167:13): [True: 55.4k, False: 88.5k]
  ------------------
 2168|  55.4k|            right = middle - 1;
 2169|  88.5k|        } else if (VECTOR(*v)[middle] < what) {
  ------------------
  |  |   65|  88.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2169:20): [True: 37.4k, False: 51.1k]
  ------------------
 2170|  37.4k|            left = middle + 1;
 2171|  51.1k|        } else {
 2172|  51.1k|            if (pos != 0) {
  ------------------
  |  Branch (2172:17): [True: 51.1k, False: 0]
  ------------------
 2173|  51.1k|                *pos = middle;
 2174|  51.1k|            }
 2175|  51.1k|            return true;
 2176|  51.1k|        }
 2177|   144k|    }
 2178|       |
 2179|       |    /* if we are here, the element was not found */
 2180|  51.1k|    if (pos != 0) {
  ------------------
  |  Branch (2180:9): [True: 51.1k, False: 0]
  ------------------
 2181|  51.1k|        *pos = left;
 2182|  51.1k|    }
 2183|       |
 2184|  51.1k|    return false;
 2185|   102k|}

igraph_adjlist_init:
  158|  6.83k|                        igraph_multiple_t multiple) {
  159|  6.83k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  160|  6.83k|    igraph_vector_int_t degrees;
  161|       |
  162|  6.83k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (162:9): [True: 6.83k, False: 0]
  |  Branch (162:30): [True: 6.06k, False: 769]
  |  Branch (162:52): [True: 0, False: 6.06k]
  ------------------
  163|      0|        IGRAPH_ERROR("Cannot create adjacency list view.", IGRAPH_EINVMODE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  164|      0|    }
  165|       |
  166|  6.83k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (166:9): [True: 6.83k, False: 0]
  ------------------
  167|  6.83k|        mode = IGRAPH_ALL;
  168|  6.83k|    }
  169|       |
  170|  6.83k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  124|  6.83k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  6.83k|    do { \
  |  |  |  |  649|  6.83k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  6.83k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  6.83k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.83k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  6.83k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  6.83k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  6.83k|    do { \
  |  |  |  |  592|  6.83k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  6.83k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  6.83k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  6.83k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  6.83k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  6.83k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  171|       |    /* igraph_degree() is fast when loops=true */
  172|  6.83k|    IGRAPH_CHECK(igraph_degree(graph, &degrees, igraph_vss_all(), mode, /* loops= */ true));
  ------------------
  |  |  648|  6.83k|    do { \
  |  |  649|  6.83k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  6.83k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  6.83k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.83k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  6.83k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  173|       |
  174|  6.83k|    al->length = no_of_nodes;
  175|  6.83k|    al->adjs = IGRAPH_CALLOC(al->length, igraph_vector_int_t);
  ------------------
  |  |   38|  6.83k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  13.6k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 6.83k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 6.83k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 6.83k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  176|  6.83k|    IGRAPH_CHECK_OOM(al->adjs, "Insufficient memory for creating adjacency list view.");
  ------------------
  |  |  701|  6.83k|    do { \
  |  |  702|  6.83k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  6.83k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.83k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  6.83k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  177|  6.83k|    IGRAPH_FINALLY(igraph_adjlist_destroy, al);
  ------------------
  |  |  591|  6.83k|    do { \
  |  |  592|  6.83k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  6.83k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  6.83k|         * incorrect destructor function with the pointer */ \
  |  |  595|  6.83k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  6.83k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  6.83k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  178|       |
  179|       |    /* if we already know there are no multi-edges, they don't need to be removed */
  180|  6.83k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MULTI) &&
  ------------------
  |  Branch (180:9): [True: 4.04k, False: 2.79k]
  ------------------
  181|  6.83k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_MULTI)) {
  ------------------
  |  Branch (181:9): [True: 2.57k, False: 1.47k]
  ------------------
  182|  2.57k|        multiple = IGRAPH_MULTIPLE;
  183|  2.57k|    }
  184|       |
  185|       |    /* if we already know there are no loops, they don't need to be removed */
  186|  6.83k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (186:9): [True: 4.04k, False: 2.79k]
  ------------------
  187|  6.83k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (187:9): [True: 2.56k, False: 1.47k]
  ------------------
  188|  2.56k|        if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (188:13): [True: 2.56k, False: 0]
  ------------------
  189|  2.56k|            loops = IGRAPH_LOOPS_TWICE;
  190|  2.56k|        } else {
  191|      0|            loops = IGRAPH_LOOPS_ONCE;
  192|      0|        }
  193|  2.56k|    }
  194|       |
  195|  6.83k|    igraph_bool_t has_loops = false;
  196|  6.83k|    igraph_bool_t has_multiple = false;
  197|  1.22M|    for (igraph_integer_t i = 0; i < al->length; i++) {
  ------------------
  |  Branch (197:34): [True: 1.21M, False: 6.83k]
  ------------------
  198|  1.21M|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|  1.21M|    do { \
  |  |   48|  1.21M|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 1.21M]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|  1.21M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  199|       |
  200|  1.21M|        IGRAPH_CHECK(igraph_vector_int_init(&al->adjs[i], VECTOR(degrees)[i]));
  ------------------
  |  |  648|  1.21M|    do { \
  |  |  649|  1.21M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.21M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.21M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.21M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.21M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  201|  1.21M|        IGRAPH_CHECK(igraph_neighbors(graph, &al->adjs[i], i, mode));
  ------------------
  |  |  648|  1.21M|    do { \
  |  |  649|  1.21M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.21M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.21M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.21M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.21M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  202|       |
  203|       |        /* Attention: This function will only set values for has_loops and has_multiple
  204|       |         * if it finds loops/multi-edges. Otherwise they are left at their original value. */
  205|  1.21M|        IGRAPH_CHECK(igraph_i_simplify_sorted_int_adjacency_vector_in_place(
  ------------------
  |  |  648|  1.21M|    do { \
  |  |  649|  1.21M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.21M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.21M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.21M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.21M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  206|  1.21M|            &al->adjs[i], i, mode, loops, multiple, &has_loops, &has_multiple
  207|  1.21M|        ));
  208|  1.21M|    }
  209|  6.83k|    if (has_loops) {
  ------------------
  |  Branch (209:9): [True: 1.47k, False: 5.36k]
  ------------------
  210|       |        /* If we have found at least one loop above, set the cache to true */
  211|  1.47k|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, true);
  212|  5.36k|    } else if (loops == IGRAPH_NO_LOOPS) {
  ------------------
  |  Branch (212:16): [True: 1.28k, False: 4.07k]
  ------------------
  213|       |        /* If we explicitly _checked_ for loops (to remove them) and haven't
  214|       |         * found one, set the cache to false. This is the only case when a
  215|       |         * definite "no" from has_loops really means that there are no loops at
  216|       |         * all */
  217|  1.28k|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, false);
  218|  1.28k|    }
  219|  6.83k|    if (has_multiple) {
  ------------------
  |  Branch (219:9): [True: 1.47k, False: 5.36k]
  ------------------
  220|       |        /* If we have found at least one multiedge above, set the cache to true */
  221|  1.47k|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_MULTI, true);
  222|  5.36k|    } else if (multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (222:16): [True: 1.28k, False: 4.08k]
  ------------------
  223|       |        /* If we explicitly _checked_ for multi-edges (to remove them) and
  224|       |         * haven't found one, set the cache to false. This is the only case
  225|       |         * when a definite "no" from has_multiple really means that there are
  226|       |         * no multi-edges at all all */
  227|  1.28k|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_MULTI, false);
  228|  1.28k|    }
  229|       |
  230|  6.83k|    igraph_vector_int_destroy(&degrees);
  231|  6.83k|    IGRAPH_FINALLY_CLEAN(2); /* + igraph_adjlist_destroy */
  232|       |
  233|  6.83k|    return IGRAPH_SUCCESS;
  234|  6.83k|}
igraph_adjlist_destroy:
  429|  6.83k|void igraph_adjlist_destroy(igraph_adjlist_t *al) {
  430|  1.22M|    for (igraph_integer_t i = 0; i < al->length; i++) {
  ------------------
  |  Branch (430:34): [True: 1.21M, False: 6.83k]
  ------------------
  431|       |        /* This works if some igraph_vector_int_t's contain NULL,
  432|       |           because igraph_vector_int_destroy can handle this. */
  433|  1.21M|        igraph_vector_int_destroy(&al->adjs[i]);
  434|  1.21M|    }
  435|  6.83k|    IGRAPH_FREE(al->adjs);
  ------------------
  |  |   41|  6.83k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  436|  6.83k|}
igraph_adjlist_has_edge:
  580|  57.3k|        igraph_bool_t directed) {
  581|       |
  582|  57.3k|    const igraph_vector_int_t *fromvec;
  583|  57.3k|    ADJLIST_CANON_EDGE(from, to, directed);
  ------------------
  |  |  557|  57.3k|    do {                     \
  |  |  558|  57.3k|        igraph_integer_t temp;         \
  |  |  559|  57.3k|        if ((!directed) && from < to) {     \
  |  |  ------------------
  |  |  |  Branch (559:13): [True: 57.3k, False: 0]
  |  |  |  Branch (559:28): [True: 34.6k, False: 22.7k]
  |  |  ------------------
  |  |  560|  34.6k|            temp = to;               \
  |  |  561|  34.6k|            to = from;               \
  |  |  562|  34.6k|            from = temp;             \
  |  |  563|  34.6k|        }                      \
  |  |  564|  57.3k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (564:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  584|  57.3k|    fromvec = igraph_adjlist_get(al, from);
  ------------------
  |  |   78|  57.3k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_integer_t)(no)])
  ------------------
  585|  57.3k|    return igraph_vector_int_contains_sorted(fromvec, to);
  586|  57.3k|}
igraph_adjlist_replace_edge:
  591|  51.1k|        igraph_bool_t directed) {
  592|       |
  593|  51.1k|    igraph_vector_int_t *oldfromvec, *newfromvec;
  594|  51.1k|    igraph_bool_t found_old, found_new;
  595|  51.1k|    igraph_integer_t oldpos, newpos;
  596|  51.1k|    igraph_integer_t oldfrom = from, newfrom = from;
  597|       |
  598|  51.1k|    ADJLIST_CANON_EDGE(oldfrom, oldto, directed);
  ------------------
  |  |  557|  51.1k|    do {                     \
  |  |  558|  51.1k|        igraph_integer_t temp;         \
  |  |  559|  51.1k|        if ((!directed) && from < to) {     \
  |  |  ------------------
  |  |  |  Branch (559:13): [True: 51.1k, False: 0]
  |  |  |  Branch (559:28): [True: 32.9k, False: 18.1k]
  |  |  ------------------
  |  |  560|  32.9k|            temp = to;               \
  |  |  561|  32.9k|            to = from;               \
  |  |  562|  32.9k|            from = temp;             \
  |  |  563|  32.9k|        }                      \
  |  |  564|  51.1k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (564:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  599|  51.1k|    ADJLIST_CANON_EDGE(newfrom, newto, directed);
  ------------------
  |  |  557|  51.1k|    do {                     \
  |  |  558|  51.1k|        igraph_integer_t temp;         \
  |  |  559|  51.1k|        if ((!directed) && from < to) {     \
  |  |  ------------------
  |  |  |  Branch (559:13): [True: 51.1k, False: 0]
  |  |  |  Branch (559:28): [True: 30.9k, False: 20.1k]
  |  |  ------------------
  |  |  560|  30.9k|            temp = to;               \
  |  |  561|  30.9k|            to = from;               \
  |  |  562|  30.9k|            from = temp;             \
  |  |  563|  30.9k|        }                      \
  |  |  564|  51.1k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (564:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  600|       |
  601|  51.1k|    oldfromvec = igraph_adjlist_get(al, oldfrom);
  ------------------
  |  |   78|  51.1k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_integer_t)(no)])
  ------------------
  602|  51.1k|    newfromvec = igraph_adjlist_get(al, newfrom);
  ------------------
  |  |   78|  51.1k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_integer_t)(no)])
  ------------------
  603|       |
  604|       |    /* oldfrom -> oldto should exist; newfrom -> newto should not. */
  605|  51.1k|    found_old = igraph_vector_int_binsearch(oldfromvec, oldto, &oldpos);
  606|  51.1k|    if (! found_old) {
  ------------------
  |  Branch (606:9): [True: 0, False: 51.1k]
  ------------------
  607|      0|        IGRAPH_ERROR("Edge to replace does not exist.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  608|      0|    }
  609|  51.1k|    found_new = igraph_vector_int_binsearch(newfromvec, newto, &newpos);
  610|  51.1k|    if (found_new) {
  ------------------
  |  Branch (610:9): [True: 0, False: 51.1k]
  ------------------
  611|      0|        IGRAPH_ERROR("New edge already exists.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  612|      0|    }
  613|       |
  614|  51.1k|    if (oldfromvec != newfromvec) {
  ------------------
  |  Branch (614:9): [True: 40.2k, False: 10.8k]
  ------------------
  615|       |        /* grow the new vector first and then remove the item from the old one
  616|       |         * to ensure that we don't end up in a situation where the removal
  617|       |         * succeeds but the addition does not */
  618|  40.2k|        IGRAPH_CHECK(igraph_vector_int_insert(newfromvec, newpos, newto));
  ------------------
  |  |  648|  40.2k|    do { \
  |  |  649|  40.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  40.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  40.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 40.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  40.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  619|  40.2k|        igraph_vector_int_remove(oldfromvec, oldpos);
  620|  40.2k|    } else {
  621|       |        /* moving item within the same vector; here we can safely remove first
  622|       |         * and insert afterwards because there is no need to re-allocate memory */
  623|  10.8k|        igraph_vector_int_remove(oldfromvec, oldpos);
  624|  10.8k|        if (oldpos < newpos) {
  ------------------
  |  Branch (624:13): [True: 5.76k, False: 5.10k]
  ------------------
  625|  5.76k|            --newpos;
  626|  5.76k|        }
  627|  10.8k|        IGRAPH_CHECK(igraph_vector_int_insert(newfromvec, newpos, newto));
  ------------------
  |  |  648|  10.8k|    do { \
  |  |  649|  10.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  10.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  10.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 10.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  10.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  628|  10.8k|    }
  629|       |
  630|  51.1k|    return IGRAPH_SUCCESS;
  631|       |
  632|  51.1k|}
igraph_inclist_init:
  770|  5.15k|                        igraph_loops_t loops) {
  771|  5.15k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  772|  5.15k|    igraph_vector_int_t degrees;
  773|       |
  774|  5.15k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (774:9): [True: 5.15k, False: 0]
  |  Branch (774:30): [True: 4.05k, False: 1.09k]
  |  Branch (774:52): [True: 0, False: 4.05k]
  ------------------
  775|      0|        IGRAPH_ERROR("Cannot create incidence list view.", IGRAPH_EINVMODE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  776|      0|    }
  777|       |
  778|  5.15k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (778:9): [True: 5.15k, False: 0]
  ------------------
  779|  5.15k|        mode = IGRAPH_ALL;
  780|  5.15k|    }
  781|       |
  782|  5.15k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  124|  5.15k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  5.15k|    do { \
  |  |  |  |  649|  5.15k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  5.15k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  5.15k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 5.15k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  5.15k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  5.15k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  5.15k|    do { \
  |  |  |  |  592|  5.15k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  5.15k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  5.15k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  5.15k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  5.15k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  5.15k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  783|       |    /* igraph_degrees() is fast when loops=true */
  784|  5.15k|    IGRAPH_CHECK(igraph_degree(graph, &degrees, igraph_vss_all(), mode, /* loops= */ 1));
  ------------------
  |  |  648|  5.15k|    do { \
  |  |  649|  5.15k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  5.15k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  5.15k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 5.15k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  5.15k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  785|       |
  786|  5.15k|    il->length = no_of_nodes;
  787|  5.15k|    il->incs = IGRAPH_CALLOC(il->length, igraph_vector_int_t);
  ------------------
  |  |   38|  5.15k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  10.3k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 5.15k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 5.15k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 5.14k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  788|  5.15k|    if (il->incs == 0) {
  ------------------
  |  Branch (788:9): [True: 0, False: 5.15k]
  ------------------
  789|      0|        IGRAPH_ERROR("Cannot create incidence list view.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  790|      0|    }
  791|       |
  792|  5.15k|    IGRAPH_FINALLY(igraph_inclist_destroy, il);
  ------------------
  |  |  591|  5.15k|    do { \
  |  |  592|  5.15k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  5.15k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  5.15k|         * incorrect destructor function with the pointer */ \
  |  |  595|  5.15k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  5.15k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  5.15k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  793|   851k|    for (igraph_integer_t i = 0; i < il->length; i++) {
  ------------------
  |  Branch (793:34): [True: 846k, False: 5.15k]
  ------------------
  794|   846k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|   846k|    do { \
  |  |   48|   846k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 846k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|   846k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  795|       |
  796|   846k|        IGRAPH_CHECK(igraph_vector_int_init(&il->incs[i], VECTOR(degrees)[i]));
  ------------------
  |  |  648|   846k|    do { \
  |  |  649|   846k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   846k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   846k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 846k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   846k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  797|   846k|        IGRAPH_CHECK(igraph_incident(graph, &il->incs[i], i, mode));
  ------------------
  |  |  648|   846k|    do { \
  |  |  649|   846k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   846k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   846k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 846k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   846k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  798|       |
  799|   846k|        if (loops != IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (799:13): [True: 147k, False: 698k]
  ------------------
  800|   147k|            IGRAPH_CHECK(
  ------------------
  |  |  648|   147k|    do { \
  |  |  649|   147k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   147k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   147k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 147k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   147k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  801|   147k|                igraph_i_remove_loops_from_incidence_vector_in_place(&il->incs[i], graph, loops)
  802|   147k|            );
  803|   147k|        }
  804|   846k|    }
  805|       |
  806|  5.15k|    igraph_vector_int_destroy(&degrees);
  807|  5.15k|    IGRAPH_FINALLY_CLEAN(2); /* + igraph_inclist_destroy */
  808|       |
  809|  5.15k|    return IGRAPH_SUCCESS;
  810|  5.15k|}
igraph_inclist_destroy:
  854|  5.15k|void igraph_inclist_destroy(igraph_inclist_t *il) {
  855|   851k|    for (igraph_integer_t i = 0; i < il->length; i++) {
  ------------------
  |  Branch (855:34): [True: 846k, False: 5.15k]
  ------------------
  856|       |        /* This works if some igraph_vector_int_t's contain NULL,
  857|       |           because igraph_vector_int_destroy can handle this. */
  858|   846k|        igraph_vector_int_destroy(&il->incs[i]);
  859|   846k|    }
  860|  5.15k|    IGRAPH_FREE(il->incs);
  ------------------
  |  |   41|  5.15k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  861|  5.15k|}
igraph_lazy_adjlist_init:
 1096|  10.1k|                             igraph_multiple_t multiple) {
 1097|  10.1k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1097:9): [True: 10.1k, False: 0]
  |  Branch (1097:30): [True: 8.10k, False: 2.02k]
  |  Branch (1097:52): [True: 0, False: 8.10k]
  ------------------
 1098|      0|        IGRAPH_ERROR("Cannot create lazy adjacency list view.", IGRAPH_EINVMODE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1099|      0|    }
 1100|       |
 1101|  10.1k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1101:9): [True: 10.1k, False: 0]
  ------------------
 1102|  10.1k|        mode = IGRAPH_ALL;
 1103|  10.1k|    }
 1104|       |
 1105|       |    /* if we already know there are no multi-edges, they don't need to be removed */
 1106|  10.1k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MULTI) &&
  ------------------
  |  Branch (1106:9): [True: 10.1k, False: 2]
  ------------------
 1107|  10.1k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_MULTI)) {
  ------------------
  |  Branch (1107:9): [True: 6.43k, False: 3.70k]
  ------------------
 1108|  6.43k|        multiple = IGRAPH_MULTIPLE;
 1109|  6.43k|    }
 1110|       |
 1111|       |    /* if we already know there are no loops, they don't need to be removed */
 1112|  10.1k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (1112:9): [True: 10.1k, False: 2]
  ------------------
 1113|  10.1k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (1113:9): [True: 6.42k, False: 3.71k]
  ------------------
 1114|  6.42k|        if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (1114:13): [True: 6.42k, False: 0]
  ------------------
 1115|  6.42k|            loops = IGRAPH_LOOPS_TWICE;
 1116|  6.42k|        } else {
 1117|      0|            loops = IGRAPH_LOOPS_ONCE;
 1118|      0|        }
 1119|  6.42k|    }
 1120|       |
 1121|  10.1k|    al->mode = mode;
 1122|  10.1k|    al->loops = loops;
 1123|  10.1k|    al->multiple = multiple;
 1124|  10.1k|    al->graph = graph;
 1125|       |
 1126|  10.1k|    al->length = igraph_vcount(graph);
 1127|  10.1k|    al->adjs = IGRAPH_CALLOC(al->length, igraph_vector_int_t*);
  ------------------
  |  |   38|  10.1k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  20.2k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 10.1k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 10.1k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 10.1k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1128|  10.1k|    IGRAPH_CHECK_OOM(al->adjs, "Insufficient memory for creating lazy adjacency list view.");
  ------------------
  |  |  701|  10.1k|    do { \
  |  |  702|  10.1k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  10.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 10.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  10.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1129|       |
 1130|  10.1k|    return IGRAPH_SUCCESS;
 1131|  10.1k|}
igraph_lazy_adjlist_destroy:
 1143|  10.1k|void igraph_lazy_adjlist_destroy(igraph_lazy_adjlist_t *al) {
 1144|  10.1k|    igraph_lazy_adjlist_clear(al);
 1145|  10.1k|    IGRAPH_FREE(al->adjs);
  ------------------
  |  |   41|  10.1k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1146|  10.1k|}
igraph_lazy_adjlist_clear:
 1156|  10.1k|void igraph_lazy_adjlist_clear(igraph_lazy_adjlist_t *al) {
 1157|  10.1k|    igraph_integer_t i, n = al->length;
 1158|  1.75M|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (1158:17): [True: 1.74M, False: 10.1k]
  ------------------
 1159|  1.74M|        if (al->adjs[i] != 0) {
  ------------------
  |  Branch (1159:13): [True: 1.07M, False: 676k]
  ------------------
 1160|  1.07M|            igraph_vector_int_destroy(al->adjs[i]);
 1161|  1.07M|            IGRAPH_FREE(al->adjs[i]);
  ------------------
  |  |   41|  1.07M|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1162|  1.07M|        }
 1163|  1.74M|    }
 1164|  10.1k|}
igraph_i_lazy_adjlist_get_real:
 1179|  1.07M|igraph_vector_int_t *igraph_i_lazy_adjlist_get_real(igraph_lazy_adjlist_t *al, igraph_integer_t no) {
 1180|  1.07M|    igraph_error_t ret;
 1181|       |
 1182|  1.07M|    if (al->adjs[no] == NULL) {
  ------------------
  |  Branch (1182:9): [True: 1.07M, False: 0]
  ------------------
 1183|  1.07M|        al->adjs[no] = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   38|  1.07M|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  2.14M|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  |  Branch (36:24): [Folded - Ignored]
  |  |  |  |  |  Branch (36:66): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1184|  1.07M|        if (al->adjs[no] == NULL) {
  ------------------
  |  Branch (1184:13): [True: 0, False: 1.07M]
  ------------------
 1185|      0|            return NULL;
 1186|      0|        }
 1187|       |
 1188|  1.07M|        ret = igraph_vector_int_init(al->adjs[no], 0);
 1189|  1.07M|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1189:13): [True: 0, False: 1.07M]
  ------------------
 1190|      0|            IGRAPH_FREE(al->adjs[no]);
  ------------------
  |  |   41|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1191|      0|            return NULL;
 1192|      0|        }
 1193|       |
 1194|  1.07M|        ret = igraph_neighbors(al->graph, al->adjs[no], no, al->mode);
 1195|  1.07M|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1195:13): [True: 0, False: 1.07M]
  ------------------
 1196|      0|            igraph_vector_int_destroy(al->adjs[no]);
 1197|      0|            IGRAPH_FREE(al->adjs[no]);
  ------------------
  |  |   41|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1198|      0|            return NULL;
 1199|      0|        }
 1200|       |
 1201|  1.07M|        ret = igraph_i_simplify_sorted_int_adjacency_vector_in_place(
 1202|  1.07M|            al->adjs[no], no, al->mode, al->loops, al->multiple, NULL,
 1203|  1.07M|            NULL
 1204|  1.07M|        );
 1205|  1.07M|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1205:13): [True: 0, False: 1.07M]
  ------------------
 1206|      0|            igraph_vector_int_destroy(al->adjs[no]);
 1207|      0|            IGRAPH_FREE(al->adjs[no]);
  ------------------
  |  |   41|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1208|      0|            return NULL;
 1209|      0|        }
 1210|  1.07M|    }
 1211|       |
 1212|  1.07M|    return al->adjs[no];
 1213|  1.07M|}
igraph_lazy_inclist_init:
 1258|  2.02k|                             igraph_loops_t loops) {
 1259|       |
 1260|  2.02k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1260:9): [True: 2.02k, False: 0]
  |  Branch (1260:30): [True: 0, False: 2.02k]
  |  Branch (1260:52): [True: 0, False: 0]
  ------------------
 1261|      0|        IGRAPH_ERROR("Cannot create lazy incidence list view", IGRAPH_EINVMODE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1262|      0|    }
 1263|       |
 1264|  2.02k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1264:9): [True: 2.02k, False: 0]
  ------------------
 1265|  2.02k|        mode = IGRAPH_ALL;
 1266|  2.02k|    }
 1267|       |
 1268|  2.02k|    il->graph = graph;
 1269|  2.02k|    il->loops = loops;
 1270|  2.02k|    il->mode = mode;
 1271|       |
 1272|  2.02k|    il->length = igraph_vcount(graph);
 1273|  2.02k|    il->incs = IGRAPH_CALLOC(il->length, igraph_vector_int_t*);
  ------------------
  |  |   38|  2.02k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  4.05k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 2.02k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 2.02k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 2.02k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1274|  2.02k|    if (il->incs == 0) {
  ------------------
  |  Branch (1274:9): [True: 0, False: 2.02k]
  ------------------
 1275|      0|        IGRAPH_ERROR("Cannot create lazy incidence list view", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1276|      0|    }
 1277|       |
 1278|  2.02k|    return IGRAPH_SUCCESS;
 1279|       |
 1280|  2.02k|}
igraph_lazy_inclist_destroy:
 1292|  2.02k|void igraph_lazy_inclist_destroy(igraph_lazy_inclist_t *il) {
 1293|  2.02k|    igraph_lazy_inclist_clear(il);
 1294|  2.02k|    IGRAPH_FREE(il->incs);
  ------------------
  |  |   41|  2.02k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1295|  2.02k|}
igraph_lazy_inclist_clear:
 1306|  2.02k|void igraph_lazy_inclist_clear(igraph_lazy_inclist_t *il) {
 1307|  2.02k|    igraph_integer_t i, n = il->length;
 1308|   351k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (1308:17): [True: 349k, False: 2.02k]
  ------------------
 1309|   349k|        if (il->incs[i] != 0) {
  ------------------
  |  Branch (1309:13): [True: 37.3k, False: 312k]
  ------------------
 1310|  37.3k|            igraph_vector_int_destroy(il->incs[i]);
 1311|  37.3k|            IGRAPH_FREE(il->incs[i]);
  ------------------
  |  |   41|  37.3k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1312|  37.3k|        }
 1313|   349k|    }
 1314|  2.02k|}
igraph_i_lazy_inclist_get_real:
 1329|  37.3k|igraph_vector_int_t *igraph_i_lazy_inclist_get_real(igraph_lazy_inclist_t *il, igraph_integer_t no) {
 1330|  37.3k|    igraph_error_t ret;
 1331|       |
 1332|  37.3k|    if (il->incs[no] == NULL) {
  ------------------
  |  Branch (1332:9): [True: 37.3k, False: 0]
  ------------------
 1333|  37.3k|        il->incs[no] = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   38|  37.3k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  74.6k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  |  Branch (36:24): [Folded - Ignored]
  |  |  |  |  |  Branch (36:66): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1334|  37.3k|        if (il->incs[no] == NULL) {
  ------------------
  |  Branch (1334:13): [True: 0, False: 37.3k]
  ------------------
 1335|      0|            return NULL;
 1336|      0|        }
 1337|       |
 1338|  37.3k|        ret = igraph_vector_int_init(il->incs[no], 0);
 1339|  37.3k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1339:13): [True: 0, False: 37.3k]
  ------------------
 1340|      0|            IGRAPH_FREE(il->incs[no]);
  ------------------
  |  |   41|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1341|      0|            return NULL;
 1342|      0|        }
 1343|       |
 1344|  37.3k|        ret = igraph_incident(il->graph, il->incs[no], no, il->mode);
 1345|  37.3k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1345:13): [True: 0, False: 37.3k]
  ------------------
 1346|      0|            igraph_vector_int_destroy(il->incs[no]);
 1347|      0|            IGRAPH_FREE(il->incs[no]);
  ------------------
  |  |   41|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1348|      0|            return NULL;
 1349|      0|        }
 1350|       |
 1351|  37.3k|        if (il->loops != IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1351:13): [True: 37.3k, False: 0]
  ------------------
 1352|  37.3k|            ret = igraph_i_remove_loops_from_incidence_vector_in_place(il->incs[no], il->graph, il->loops);
 1353|  37.3k|            if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1353:17): [True: 0, False: 37.3k]
  ------------------
 1354|      0|                igraph_vector_int_destroy(il->incs[no]);
 1355|      0|                IGRAPH_FREE(il->incs[no]);
  ------------------
  |  |   41|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1356|      0|                return NULL;
 1357|      0|            }
 1358|  37.3k|        }
 1359|  37.3k|    }
 1360|       |
 1361|  37.3k|    return il->incs[no];
 1362|  37.3k|}
adjlist.c:igraph_i_remove_loops_from_incidence_vector_in_place:
  636|   184k|) {
  637|   184k|    igraph_integer_t i, length, eid, write_ptr;
  638|   184k|    igraph_vector_int_t *seen_loops = 0;
  639|       |
  640|       |    /* In this function we make use of the fact that we are dealing with
  641|       |     * _incidence_ lists, and the only way for an edge ID to appear twice
  642|       |     * within an incidence list is if the edge is a loop edge; otherwise each
  643|       |     * element will be unique.
  644|       |     *
  645|       |     * Note that incidence vectors are not sorted by edge ID, so we need to
  646|       |     * look up the edges in the graph to decide whether they are loops or not.
  647|       |     *
  648|       |     * Also, it may be tempting to introduce a boolean in case of IGRAPH_LOOPS_ONCE,
  649|       |     * and flip it every time we see a loop to get rid of half of the occurrences,
  650|       |     * but the problem is that even if the same loop edge ID appears twice in
  651|       |     * the input list, they are not guaranteed to be next to each other; it
  652|       |     * may be the case that there are multiple loop edges, each edge appears
  653|       |     * twice, and we want to keep exactly one of them for each ID. That's why
  654|       |     * we have a "seen_loops" vector.
  655|       |     */
  656|       |
  657|   184k|    if (loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (657:9): [True: 0, False: 184k]
  ------------------
  658|       |        /* Loop edges appear twice by default, nothing to do. */
  659|      0|        return IGRAPH_SUCCESS;
  660|      0|    }
  661|       |
  662|   184k|    length = igraph_vector_int_size(v);
  663|   184k|    if (length == 0) {
  ------------------
  |  Branch (663:9): [True: 141k, False: 43.8k]
  ------------------
  664|   141k|        return IGRAPH_SUCCESS;
  665|   141k|    }
  666|       |
  667|  43.8k|    if (loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (667:9): [True: 43.8k, False: 0]
  ------------------
  668|       |        /* We need a helper vector */
  669|  43.8k|        seen_loops = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   38|  43.8k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  87.7k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  |  Branch (36:24): [Folded - Ignored]
  |  |  |  |  |  Branch (36:66): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|  43.8k|        IGRAPH_FINALLY(igraph_free, seen_loops);
  ------------------
  |  |  591|  43.8k|    do { \
  |  |  592|  43.8k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  43.8k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  43.8k|         * incorrect destructor function with the pointer */ \
  |  |  595|  43.8k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  43.8k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  43.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  671|  43.8k|        IGRAPH_CHECK(igraph_vector_int_init(seen_loops, 0));
  ------------------
  |  |  648|  43.8k|    do { \
  |  |  649|  43.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  43.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  43.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 43.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  43.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  672|  43.8k|        IGRAPH_FINALLY(igraph_vector_int_destroy, seen_loops);
  ------------------
  |  |  591|  43.8k|    do { \
  |  |  592|  43.8k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  43.8k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  43.8k|         * incorrect destructor function with the pointer */ \
  |  |  595|  43.8k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  43.8k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  43.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  673|  43.8k|    } else if (loops != IGRAPH_NO_LOOPS) {
  ------------------
  |  Branch (673:16): [True: 0, False: 0]
  ------------------
  674|      0|        IGRAPH_ERROR("Invalid value for 'loops' argument", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  675|      0|    }
  676|       |
  677|   216k|    for (i = 0, write_ptr = 0; i < length; i++) {
  ------------------
  |  Branch (677:32): [True: 172k, False: 43.8k]
  ------------------
  678|   172k|        eid = VECTOR(*v)[i];
  ------------------
  |  |   65|   172k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  679|   172k|        if (IGRAPH_FROM(graph, eid) == IGRAPH_TO(graph, eid)) {
  ------------------
  |  |  113|   172k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|   172k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                      if (IGRAPH_FROM(graph, eid) == IGRAPH_TO(graph, eid)) {
  ------------------
  |  |  126|   172k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|   172k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (679:13): [True: 62.4k, False: 110k]
  ------------------
  680|       |            /* Loop edge */
  681|  62.4k|            if (seen_loops && !igraph_vector_int_contains(seen_loops, eid)) {
  ------------------
  |  Branch (681:17): [True: 62.4k, False: 0]
  |  Branch (681:31): [True: 31.2k, False: 31.2k]
  ------------------
  682|  31.2k|                VECTOR(*v)[write_ptr++] = eid;
  ------------------
  |  |   65|  31.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  683|  31.2k|                IGRAPH_CHECK(igraph_vector_int_push_back(seen_loops, eid));
  ------------------
  |  |  648|  31.2k|    do { \
  |  |  649|  31.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  31.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  31.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 31.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  31.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  684|  31.2k|            }
  685|   110k|        } else {
  686|       |            /* Not a loop edge */
  687|   110k|            VECTOR(*v)[write_ptr++] = eid;
  ------------------
  |  |   65|   110k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  688|   110k|        }
  689|   172k|    }
  690|       |
  691|       |    /* Always succeeds since we never grow the vector */
  692|  43.8k|    igraph_vector_int_resize(v, write_ptr);
  693|       |
  694|       |    /* Destroy the helper vector */
  695|  43.8k|    if (seen_loops) {
  ------------------
  |  Branch (695:9): [True: 43.8k, False: 0]
  ------------------
  696|  43.8k|        igraph_vector_int_destroy(seen_loops);
  697|  43.8k|        IGRAPH_FREE(seen_loops);
  ------------------
  |  |   41|  43.8k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  698|  43.8k|        IGRAPH_FINALLY_CLEAN(2);
  699|  43.8k|    }
  700|       |
  701|  43.8k|    return IGRAPH_SUCCESS;
  702|  43.8k|}
adjlist.c:igraph_i_simplify_sorted_int_adjacency_vector_in_place:
  900|  2.28M|) {
  901|  2.28M|    igraph_bool_t dummy1 = true, dummy2 = true; /* set dummies to avoid uninitialized read */
  902|  2.28M|    if (has_loops == NULL) {
  ------------------
  |  Branch (902:9): [True: 1.07M, False: 1.21M]
  ------------------
  903|  1.07M|        has_loops = &dummy1;
  904|  1.07M|    }
  905|  2.28M|    if (has_multiple == NULL) {
  ------------------
  |  Branch (905:9): [True: 1.07M, False: 1.21M]
  ------------------
  906|  1.07M|        has_multiple = &dummy2;
  907|  1.07M|    }
  908|  2.28M|    igraph_integer_t i, p = 0;
  909|  2.28M|    igraph_integer_t n = igraph_vector_int_size(v);
  910|       |
  911|  2.28M|    if (
  912|  2.28M|        multiple == IGRAPH_MULTIPLE &&
  ------------------
  |  Branch (912:9): [True: 1.72M, False: 568k]
  ------------------
  913|  2.28M|        (
  914|  1.72M|            loops == IGRAPH_LOOPS_TWICE ||
  ------------------
  |  Branch (914:13): [True: 1.45M, False: 267k]
  ------------------
  915|  1.72M|            (loops == IGRAPH_LOOPS_ONCE && (mode == IGRAPH_IN || mode == IGRAPH_OUT))
  ------------------
  |  Branch (915:14): [True: 183k, False: 83.7k]
  |  Branch (915:45): [True: 0, False: 183k]
  |  Branch (915:66): [True: 0, False: 183k]
  ------------------
  916|  1.72M|        )
  917|  2.28M|    ) {
  918|       |        /* nothing to simplify */
  919|  1.45M|        return IGRAPH_SUCCESS;
  920|  1.45M|    }
  921|       |
  922|   836k|    if (loops == IGRAPH_NO_LOOPS) {
  ------------------
  |  Branch (922:9): [True: 574k, False: 261k]
  ------------------
  923|   574k|        if (multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (923:13): [True: 490k, False: 83.7k]
  ------------------
  924|       |            /* We need to get rid of loops and multiple edges completely */
  925|   792k|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (925:25): [True: 301k, False: 490k]
  ------------------
  926|   301k|                if (VECTOR(*v)[i] != index &&
  ------------------
  |  |   65|   301k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (926:21): [True: 191k, False: 110k]
  ------------------
  927|   301k|                    (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i])) {
  ------------------
  |  |   65|   113k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i])) {
  ------------------
  |  |   65|   113k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (927:22): [True: 77.1k, False: 113k]
  |  Branch (927:36): [True: 73.8k, False: 40.0k]
  ------------------
  928|   150k|                    VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   65|   150k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   65|   150k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  929|   150k|                    p++;
  930|   150k|                } else {
  931|   150k|                    if (VECTOR(*v)[i] == index) {
  ------------------
  |  |   65|   150k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (931:25): [True: 110k, False: 40.0k]
  ------------------
  932|   110k|                        *has_loops = true;
  933|       |                        /* If we haven't found multi-edges yet, we also need to check
  934|       |                         * if this is a multi-loop, to set 'has_multiple' correctly. */
  935|   110k|                        if (! *has_multiple) {
  ------------------
  |  Branch (935:29): [True: 1.84k, False: 108k]
  ------------------
  936|  1.84k|                            if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (936:33): [True: 1.84k, False: 0]
  ------------------
  937|       |                                /* Undirected loops appear twice in the neighbour list,
  938|       |                                 * so we check two following items instead of one. */
  939|  1.84k|                                if (i < n - 2 &&
  ------------------
  |  Branch (939:37): [True: 1.23k, False: 608]
  ------------------
  940|  1.84k|                                    VECTOR(*v)[i + 1] == VECTOR(*v)[i] &&
  ------------------
  |  |   65|  1.23k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                                  VECTOR(*v)[i + 1] == VECTOR(*v)[i] &&
  ------------------
  |  |   65|  1.23k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (940:37): [True: 986, False: 250]
  ------------------
  941|  1.84k|                                    VECTOR(*v)[i + 2] == VECTOR(*v)[i]) {
  ------------------
  |  |   65|    986|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                                  VECTOR(*v)[i + 2] == VECTOR(*v)[i]) {
  ------------------
  |  |   65|    986|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (941:37): [True: 654, False: 332]
  ------------------
  942|    654|                                    *has_multiple = true;
  943|    654|                                }
  944|  1.84k|                            } else {
  945|      0|                                if (i != n - 1 && VECTOR(*v)[i + 1] == VECTOR(*v)[i]) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                              if (i != n - 1 && VECTOR(*v)[i + 1] == VECTOR(*v)[i]) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (945:37): [True: 0, False: 0]
  |  Branch (945:51): [True: 0, False: 0]
  ------------------
  946|      0|                                    *has_multiple = true;
  947|      0|                                }
  948|      0|                            }
  949|  1.84k|                        }
  950|   110k|                    } else if (i != n - 1 && VECTOR(*v)[i + 1] == VECTOR(*v)[i]) {
  ------------------
  |  |   65|  40.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  } else if (i != n - 1 && VECTOR(*v)[i + 1] == VECTOR(*v)[i]) {
  ------------------
  |  |   65|  40.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (950:32): [True: 40.0k, False: 0]
  |  Branch (950:46): [True: 40.0k, False: 0]
  ------------------
  951|  40.0k|                        *has_multiple = true;
  952|  40.0k|                    }
  953|   150k|                }
  954|   301k|            }
  955|   490k|        } else {
  956|       |            /* We need to get rid of loops but keep multiple edges */
  957|   120k|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (957:25): [True: 36.9k, False: 83.7k]
  ------------------
  958|  36.9k|                if (VECTOR(*v)[i] != index) {
  ------------------
  |  |   65|  36.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (958:21): [True: 35.1k, False: 1.78k]
  ------------------
  959|  35.1k|                    VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   65|  35.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   65|  35.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  960|  35.1k|                    p++;
  961|  35.1k|                } else {
  962|  1.78k|                    *has_loops = true;
  963|  1.78k|                }
  964|  36.9k|            }
  965|  83.7k|        }
  966|   574k|    } else if (loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (966:16): [True: 183k, False: 77.8k]
  ------------------
  967|   183k|        if (multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (967:13): [True: 0, False: 183k]
  ------------------
  968|       |            /* We need to get rid of multiple edges completely (including
  969|       |             * multiple loop edges), but keep one edge from each loop edge */
  970|      0|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (970:25): [True: 0, False: 0]
  ------------------
  971|      0|                if (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i]) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i]) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (971:21): [True: 0, False: 0]
  |  Branch (971:35): [True: 0, False: 0]
  ------------------
  972|      0|                    VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  973|      0|                    p++;
  974|      0|                } else if (
  975|       |                        /* If this is not a loop then we have a multigraph.
  976|       |                           Else we have at least two loops.
  977|       |                           The v vector comes from a call to igraph_neighbors.
  978|       |                           This will count loops twice if mode == IGRAPH_ALL.
  979|       |                           So if mode != IGRAPH_ALL,
  980|       |                           then we have a multigraph.
  981|       |                           If mode == IGRAPH_ALL and we have three loops
  982|       |                           then we also have a multigraph
  983|       |                           */
  984|      0|                        (VECTOR(*v)[i] != index) ||
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (984:25): [True: 0, False: 0]
  ------------------
  985|      0|                       (mode != IGRAPH_ALL)  ||
  ------------------
  |  Branch (985:24): [True: 0, False: 0]
  ------------------
  986|      0|                       (mode == IGRAPH_ALL && i < n - 2 && VECTOR(*v)[i + 2] == VECTOR(*v)[i])
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                     (mode == IGRAPH_ALL && i < n - 2 && VECTOR(*v)[i + 2] == VECTOR(*v)[i])
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (986:25): [True: 0, False: 0]
  |  Branch (986:47): [True: 0, False: 0]
  |  Branch (986:60): [True: 0, False: 0]
  ------------------
  987|      0|                       ){
  988|      0|                    *has_multiple = true;
  989|      0|                }
  990|      0|            }
  991|   183k|        } else {
  992|       |            /* We need to keep one edge from each loop edge and we don't need to
  993|       |             * touch multiple edges. Note that we can get here only if
  994|       |             * mode == IGRAPH_ALL; if mode was IGRAPH_IN or IGRAPH_OUT, we would
  995|       |             * have bailed out earlier */
  996|   322k|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (996:25): [True: 139k, False: 183k]
  ------------------
  997|   139k|                VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   65|   139k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   65|   139k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  998|   139k|                if (VECTOR(*v)[i] == index) {
  ------------------
  |  |   65|   139k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (998:21): [True: 15.1k, False: 123k]
  ------------------
  999|  15.1k|                    *has_loops = true;
 1000|       |                    /* this was a loop edge so if the next element is the same, we
 1001|       |                    * need to skip that */
 1002|  15.1k|                    if (i < n-1 && VECTOR(*v)[i + 1] == index) {
  ------------------
  |  |   65|  15.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1002:25): [True: 15.1k, False: 0]
  |  Branch (1002:36): [True: 15.1k, False: 0]
  ------------------
 1003|  15.1k|                        i++;
 1004|  15.1k|                    }
 1005|  15.1k|                }
 1006|   139k|                p++;
 1007|   139k|            }
 1008|   183k|        }
 1009|   183k|    } else if (loops == IGRAPH_LOOPS_TWICE && multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (1009:16): [True: 77.8k, False: 0]
  |  Branch (1009:47): [True: 77.8k, False: 0]
  ------------------
 1010|       |        /* We need to get rid of multiple edges completely (including
 1011|       |         * multiple loop edges), but keep both edge from each loop edge */
 1012|   130k|        for (i = 0; i < n; i++) {
  ------------------
  |  Branch (1012:21): [True: 52.9k, False: 77.8k]
  ------------------
 1013|  52.9k|            if (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i]) {
  ------------------
  |  |   65|  36.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i]) {
  ------------------
  |  |   65|  36.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1013:17): [True: 16.5k, False: 36.3k]
  |  Branch (1013:31): [True: 15.3k, False: 20.9k]
  ------------------
 1014|  31.9k|                VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   65|  31.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   65|  31.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1015|  31.9k|                p++;
 1016|  31.9k|            } else {
 1017|  20.9k|                *has_multiple = true;
 1018|       |                /* Current item is the same as the next one, but if it is a
 1019|       |                 * loop edge, then the first one or two items are okay. We need
 1020|       |                 * to keep one if mode == IGRAPH_IN or mode == IGRAPH_OUT,
 1021|       |                 * otherwise we need to keep two */
 1022|  20.9k|                if (VECTOR(*v)[i] == index) {
  ------------------
  |  |   65|  20.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1022:21): [True: 0, False: 20.9k]
  ------------------
 1023|      0|                    VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1024|      0|                    p++;
 1025|      0|                    if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (1025:25): [True: 0, False: 0]
  ------------------
 1026|      0|                        VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1027|      0|                        p++;
 1028|      0|                    }
 1029|       |                    /* skip over all the items corresponding to the loop edges */
 1030|      0|                    while (i < n && VECTOR(*v)[i] == index) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1030:28): [True: 0, False: 0]
  |  Branch (1030:37): [True: 0, False: 0]
  ------------------
 1031|      0|                        i++;
 1032|      0|                    }
 1033|      0|                    i--; /* because the for loop also increases i by 1 */
 1034|      0|                }
 1035|  20.9k|            }
 1036|  52.9k|        }
 1037|  77.8k|    } else {
 1038|       |        /* TODO; we don't use this combination yet */
 1039|      0|        return IGRAPH_UNIMPLEMENTED;
 1040|      0|    }
 1041|       |
 1042|       |    /* always succeeds since we are never growing the vector */
 1043|   836k|    igraph_vector_int_resize(v, p);
 1044|       |
 1045|   836k|    return IGRAPH_SUCCESS;
 1046|   836k|}

igraph_i_attribute_init:
  617|  35.1k|) {
  618|  35.1k|    graph->attr = NULL;
  619|  35.1k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (619:9): [True: 0, False: 35.1k]
  ------------------
  620|      0|        IGRAPH_CHECK(igraph_i_attribute_table->init(graph, attr));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  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);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  623|      0|        }
  624|      0|    }
  625|  35.1k|    return IGRAPH_SUCCESS;
  626|  35.1k|}
igraph_i_attribute_destroy:
  628|  46.8k|void igraph_i_attribute_destroy(igraph_t *graph) {
  629|  46.8k|    if (graph->attr && igraph_i_attribute_table) {
  ------------------
  |  Branch (629:9): [True: 0, False: 46.8k]
  |  Branch (629:24): [True: 0, False: 0]
  ------------------
  630|      0|        igraph_i_attribute_table->destroy(graph);
  631|      0|    }
  632|  46.8k|    graph->attr = NULL;
  633|  46.8k|}
igraph_i_attribute_copy:
  636|  7.20k|                            igraph_bool_t va, igraph_bool_t ea) {
  637|  7.20k|    igraph_i_attribute_destroy(to);
  638|  7.20k|    if (from->attr && igraph_i_attribute_table) {
  ------------------
  |  Branch (638:9): [True: 0, False: 7.20k]
  |  Branch (638:23): [True: 0, False: 0]
  ------------------
  639|      0|        IGRAPH_CHECK(igraph_i_attribute_table->copy(to, from, ga, va, ea));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  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);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  642|      0|        }
  643|      0|    }
  644|  7.20k|    return IGRAPH_SUCCESS;
  645|  7.20k|}
igraph_i_attribute_permute_vertices:
  659|  1.92k|                                        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|  1.92k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (663:9): [True: 0, False: 1.92k]
  ------------------
  664|      0|        return igraph_i_attribute_table->permute_vertices(graph, newgraph, idx);
  665|  1.92k|    } else {
  666|  1.92k|        return IGRAPH_SUCCESS;
  667|  1.92k|    }
  668|  1.92k|}
igraph_i_attribute_permute_edges:
  700|  1.92k|                                     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|  1.92k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (704:9): [True: 0, False: 1.92k]
  ------------------
  705|      0|        return igraph_i_attribute_table->permute_edges(graph, newgraph, idx);
  706|  1.92k|    } else {
  707|  1.92k|        return IGRAPH_SUCCESS;
  708|  1.92k|    }
  709|  1.92k|}

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

igraph_i_property_cache_init:
   30|  37.3k|igraph_error_t igraph_i_property_cache_init(igraph_i_property_cache_t *cache) {
   31|  37.3k|    IGRAPH_STATIC_ASSERT(IGRAPH_PROP_I_SIZE <= 32);
  ------------------
  |  |   69|  37.3k|#define IGRAPH_STATIC_ASSERT(condition) ((void)sizeof(char[1 - 2*!(condition)]))
  ------------------
   32|       |
   33|  37.3k|    memset(cache->value, 0, sizeof(cache->value));
   34|  37.3k|    cache->known = 0;
   35|  37.3k|    return IGRAPH_SUCCESS;
   36|  37.3k|}
igraph_i_property_cache_copy:
   43|  2.27k|        const igraph_i_property_cache_t *other_cache) {
   44|  2.27k|    *cache = *other_cache;
   45|  2.27k|    return IGRAPH_SUCCESS;
   46|  2.27k|}
igraph_i_property_cache_destroy:
   51|  39.6k|void igraph_i_property_cache_destroy(igraph_i_property_cache_t *cache) {
   52|  39.6k|    IGRAPH_UNUSED(cache);
  ------------------
  |  |   32|  39.6k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
   53|       |    /* Nothing to do */
   54|  39.6k|}
igraph_i_property_cache_get_bool:
   70|  62.6k|igraph_bool_t igraph_i_property_cache_get_bool(const igraph_t *graph, igraph_cached_property_t prop) {
   71|  62.6k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  916|  62.6k|    do { \
  |  |  917|  62.6k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   125k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 62.6k]
  |  |  |  |  |  Branch (604:50): [True: 62.6k, False: 0]
  |  |  |  |  |  Branch (604:50): [True: 62.6k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  62.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   72|  62.6k|    assert(graph->cache != NULL);
   73|  62.6k|    return graph->cache->value[prop];
   74|  62.6k|}
igraph_i_property_cache_has:
   82|  63.7k|igraph_bool_t igraph_i_property_cache_has(const igraph_t *graph, igraph_cached_property_t prop) {
   83|  63.7k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  916|  63.7k|    do { \
  |  |  917|  63.7k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   127k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 63.7k]
  |  |  |  |  |  Branch (604:50): [True: 63.7k, False: 0]
  |  |  |  |  |  Branch (604:50): [True: 63.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  63.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   84|  63.7k|    assert(graph->cache != NULL);
   85|  63.7k|    return graph->cache->known & (1 << prop);
   86|  63.7k|}
igraph_i_property_cache_set_bool:
   95|  8.62k|void igraph_i_property_cache_set_bool(const igraph_t *graph, igraph_cached_property_t prop, igraph_bool_t value) {
   96|  8.62k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  916|  8.62k|    do { \
  |  |  917|  8.62k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  17.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 8.62k]
  |  |  |  |  |  Branch (604:50): [True: 8.62k, False: 0]
  |  |  |  |  |  Branch (604:50): [True: 8.62k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  8.62k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   97|  8.62k|    assert(graph->cache != NULL);
   98|       |    /* Even though graph is const, updating the cache is not considered modification.
   99|       |     * Functions that merely compute graph properties, and thus leave the graph structure
  100|       |     * intact, will often update the cache. */
  101|  8.62k|    graph->cache->value[prop] = value;
  102|  8.62k|    graph->cache->known |= (1 << prop);
  103|  8.62k|}
igraph_i_property_cache_set_bool_checked:
  121|  15.8k|void igraph_i_property_cache_set_bool_checked(const igraph_t *graph, igraph_cached_property_t prop, igraph_bool_t value) {
  122|  15.8k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  916|  15.8k|    do { \
  |  |  917|  15.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  31.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 15.8k]
  |  |  |  |  |  Branch (604:50): [True: 15.8k, False: 0]
  |  |  |  |  |  Branch (604:50): [True: 15.8k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  15.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  123|  15.8k|    assert(graph->cache != NULL);
  124|       |    /* Even though graph is const, updating the cache is not considered modification.
  125|       |     * Functions that merely compute graph properties, and thus leave the graph structure
  126|       |     * intact, will often update the cache. */
  127|  15.8k|    if (graph->cache->known & (1 << prop)) {
  ------------------
  |  Branch (127:9): [True: 7.21k, False: 8.62k]
  ------------------
  128|  7.21k|        IGRAPH_ASSERT(graph->cache->value[prop] == value);
  ------------------
  |  |  916|  7.21k|    do { \
  |  |  917|  7.21k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  7.21k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 7.21k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  7.21k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  129|  8.62k|    } else {
  130|  8.62k|        igraph_i_property_cache_set_bool(graph, prop, value);
  131|  8.62k|    }
  132|  15.8k|}
igraph_i_property_cache_invalidate_conditionally:
  180|  84.4k|) {
  181|  84.4k|    uint32_t invalidate = ~keep_always;
  182|  84.4k|    uint32_t mask;
  183|  84.4k|    uint32_t maybe_keep;
  184|  84.4k|    igraph_bool_t cached_value;
  185|       |
  186|  84.4k|    assert(graph->cache != NULL);
  187|       |
  188|       |    /* The bits of maybe_keep are set to 1 for those properties that are:
  189|       |     *
  190|       |     * - currently cached
  191|       |     * - should _probably_ be invalidated
  192|       |     * - _but_ the current cached value of the property may change the decision
  193|       |     */
  194|  84.4k|    maybe_keep = graph->cache->known & invalidate & (keep_when_false | keep_when_true);
  195|       |
  196|  84.4k|    if (maybe_keep) {
  ------------------
  |  Branch (196:9): [True: 3.55k, False: 80.9k]
  ------------------
  197|  28.4k|        for (igraph_cached_property_t prop = (igraph_cached_property_t ) 0; prop < IGRAPH_PROP_I_SIZE; ++prop) {
  ------------------
  |  Branch (197:77): [True: 24.8k, False: 3.55k]
  ------------------
  198|  24.8k|            mask = 1 << prop;
  199|  24.8k|            if (maybe_keep & mask) {
  ------------------
  |  Branch (199:17): [True: 8.87k, False: 15.9k]
  ------------------
  200|       |                /* if we get here, we know that the property is cached; we have
  201|       |                 * masked maybe_keep with graph->cache->known */
  202|  8.87k|                cached_value = igraph_i_property_cache_get_bool(graph, prop);
  203|  8.87k|                if (
  204|  8.87k|                    ((keep_when_false & mask) && !cached_value) ||
  ------------------
  |  Branch (204:22): [True: 8.10k, False: 767]
  |  Branch (204:50): [True: 6.09k, False: 2.01k]
  ------------------
  205|  8.87k|                    ((keep_when_true & mask) && cached_value)
  ------------------
  |  Branch (205:22): [True: 767, False: 2.01k]
  |  Branch (205:49): [True: 767, False: 0]
  ------------------
  206|  8.87k|                ) {
  207|  6.86k|                    invalidate &= ~mask;
  208|  6.86k|                }
  209|  8.87k|            }
  210|  24.8k|        }
  211|  3.55k|    }
  212|       |
  213|  84.4k|    graph->cache->known &= ~invalidate;
  214|  84.4k|}

graph_list.c:igraph_i_graph_list_destroy_item:
   59|  2.16k|static void igraph_i_graph_list_destroy_item(igraph_t* item) {
   60|  2.16k|    igraph_destroy(item);
   61|  2.16k|}

igraph_vss_all:
  116|  36.4k|igraph_vs_t igraph_vss_all(void) {
  117|  36.4k|    igraph_vs_t allvs;
  118|  36.4k|    allvs.type = IGRAPH_VS_ALL;
  119|  36.4k|    return allvs;
  120|  36.4k|}
igraph_vss_1:
  276|  8.76k|igraph_vs_t igraph_vss_1(igraph_integer_t vid) {
  277|  8.76k|    igraph_vs_t onevs;
  278|  8.76k|    onevs.type = IGRAPH_VS_1;
  279|  8.76k|    onevs.data.vid = vid;
  280|  8.76k|    return onevs;
  281|  8.76k|}
igraph_vss_vector:
  328|  2.40k|igraph_vs_t igraph_vss_vector(const igraph_vector_int_t *v) {
  329|  2.40k|    igraph_vs_t vecvs;
  330|  2.40k|    vecvs.type = IGRAPH_VS_VECTORPTR;
  331|  2.40k|    vecvs.data.vecptr = v;
  332|  2.40k|    return vecvs;
  333|  2.40k|}
igraph_vs_is_all:
  528|  6.12k|igraph_bool_t igraph_vs_is_all(const igraph_vs_t *vs) {
  529|  6.12k|    return vs->type == IGRAPH_VS_ALL;
  530|  6.12k|}
igraph_vs_size:
  592|  2.16k|                   igraph_integer_t *result) {
  593|  2.16k|    igraph_vector_int_t vec;
  594|  2.16k|    igraph_bool_t *seen;
  595|  2.16k|    igraph_integer_t i;
  596|  2.16k|    igraph_integer_t vec_len;
  597|       |
  598|  2.16k|    switch (vs->type) {
  ------------------
  |  Branch (598:13): [True: 0, False: 2.16k]
  ------------------
  599|      0|    case IGRAPH_VS_NONE:
  ------------------
  |  Branch (599:5): [True: 0, False: 2.16k]
  ------------------
  600|      0|        *result = 0; return IGRAPH_SUCCESS;
  601|       |
  602|      0|    case IGRAPH_VS_1:
  ------------------
  |  Branch (602:5): [True: 0, False: 2.16k]
  ------------------
  603|      0|        *result = 0;
  604|      0|        if (vs->data.vid < igraph_vcount(graph) && vs->data.vid >= 0) {
  ------------------
  |  Branch (604:13): [True: 0, False: 0]
  |  Branch (604:52): [True: 0, False: 0]
  ------------------
  605|      0|            *result = 1;
  606|      0|        }
  607|      0|        return IGRAPH_SUCCESS;
  608|       |
  609|      0|    case IGRAPH_VS_RANGE:
  ------------------
  |  Branch (609:5): [True: 0, False: 2.16k]
  ------------------
  610|      0|        *result = vs->data.range.end - vs->data.range.start;
  611|      0|        return IGRAPH_SUCCESS;
  612|       |
  613|      0|    case IGRAPH_VS_ALL:
  ------------------
  |  Branch (613:5): [True: 0, False: 2.16k]
  ------------------
  614|      0|        *result = igraph_vcount(graph); return IGRAPH_SUCCESS;
  615|       |
  616|      0|    case IGRAPH_VS_ADJ:
  ------------------
  |  Branch (616:5): [True: 0, False: 2.16k]
  ------------------
  617|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vec, 0);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  618|      0|        IGRAPH_CHECK(igraph_neighbors(graph, &vec, vs->data.adj.vid, vs->data.adj.mode));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  619|      0|        *result = igraph_vector_int_size(&vec);
  620|      0|        igraph_vector_int_destroy(&vec);
  621|      0|        IGRAPH_FINALLY_CLEAN(1);
  622|      0|        return IGRAPH_SUCCESS;
  623|       |
  624|      0|    case IGRAPH_VS_NONADJ:
  ------------------
  |  Branch (624:5): [True: 0, False: 2.16k]
  ------------------
  625|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vec, 0);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  626|      0|        IGRAPH_CHECK(igraph_neighbors(graph, &vec, vs->data.adj.vid, vs->data.adj.mode));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  627|      0|        vec_len = igraph_vector_int_size(&vec);
  628|      0|        *result = igraph_vcount(graph);
  629|      0|        seen = IGRAPH_CALLOC(*result, igraph_bool_t);
  ------------------
  |  |   38|      0|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|      0|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 0, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 0, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  630|      0|        IGRAPH_CHECK_OOM(seen, "Cannot calculate vertex selector length.");
  ------------------
  |  |  701|      0|    do { \
  |  |  702|      0|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  631|      0|        IGRAPH_FINALLY(igraph_free, seen);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  632|      0|        for (i = 0; i < vec_len; i++) {
  ------------------
  |  Branch (632:21): [True: 0, False: 0]
  ------------------
  633|      0|            if (!seen[ VECTOR(vec)[i] ]) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (633:17): [True: 0, False: 0]
  ------------------
  634|      0|                (*result)--;
  635|      0|                seen[ VECTOR(vec)[i] ] = true;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  636|      0|            }
  637|      0|        }
  638|      0|        igraph_free(seen);
  639|      0|        igraph_vector_int_destroy(&vec);
  640|      0|        IGRAPH_FINALLY_CLEAN(2);
  641|      0|        return IGRAPH_SUCCESS;
  642|       |
  643|      0|    case IGRAPH_VS_VECTOR:
  ------------------
  |  Branch (643:5): [True: 0, False: 2.16k]
  ------------------
  644|  2.16k|    case IGRAPH_VS_VECTORPTR:
  ------------------
  |  Branch (644:5): [True: 2.16k, False: 0]
  ------------------
  645|  2.16k|        *result = igraph_vector_int_size(vs->data.vecptr);
  646|  2.16k|        return IGRAPH_SUCCESS;
  647|  2.16k|    }
  648|       |
  649|      0|    IGRAPH_ERROR("Cannot calculate selector length, invalid selector type",
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  650|      0|                 IGRAPH_EINVAL);
  651|      0|}
igraph_vit_create:
  687|  45.5k|igraph_error_t igraph_vit_create(const igraph_t *graph, igraph_vs_t vs, igraph_vit_t *vit) {
  688|  45.5k|    igraph_vector_int_t vec;
  689|  45.5k|    igraph_vector_int_t *vec_int;
  690|  45.5k|    igraph_bool_t *seen;
  691|  45.5k|    igraph_integer_t i, j, n;
  692|  45.5k|    igraph_integer_t vec_len;
  693|       |
  694|  45.5k|    switch (vs.type) {
  695|  34.4k|    case IGRAPH_VS_ALL:
  ------------------
  |  Branch (695:5): [True: 34.4k, False: 11.1k]
  ------------------
  696|  34.4k|        vit->type = IGRAPH_VIT_RANGE;
  697|  34.4k|        vit->pos = 0;
  698|  34.4k|        vit->start = 0;
  699|  34.4k|        vit->end = igraph_vcount(graph);
  700|  34.4k|        break;
  701|      0|    case IGRAPH_VS_ADJ:
  ------------------
  |  Branch (701:5): [True: 0, False: 45.5k]
  ------------------
  702|      0|        vec_int = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   38|      0|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|      0|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  |  Branch (36:24): [Folded - Ignored]
  |  |  |  |  |  Branch (36:66): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  703|      0|        IGRAPH_CHECK_OOM(vec_int, "Cannot create vertex iterator.");
  ------------------
  |  |  701|      0|    do { \
  |  |  702|      0|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  704|      0|        IGRAPH_FINALLY(igraph_free, vec_int);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  705|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(vec_int, 0);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  706|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vec, 0);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  707|      0|        IGRAPH_CHECK(igraph_neighbors(graph, &vec, vs.data.adj.vid, vs.data.adj.mode));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  708|      0|        n = igraph_vector_int_size(&vec);
  709|      0|        IGRAPH_CHECK(igraph_vector_int_resize(vec_int, n));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  710|      0|        for (i = 0; i < n; i++) {
  ------------------
  |  Branch (710:21): [True: 0, False: 0]
  ------------------
  711|      0|            VECTOR(*vec_int)[i] = VECTOR(vec)[i];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*vec_int)[i] = VECTOR(vec)[i];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  712|      0|        }
  713|       |
  714|      0|        igraph_vector_int_destroy(&vec);
  715|      0|        IGRAPH_FINALLY_CLEAN(3);
  716|       |
  717|      0|        vit->type = IGRAPH_VIT_VECTOR;
  718|      0|        vit->pos = 0;
  719|      0|        vit->start = 0;
  720|      0|        vit->vec = vec_int;
  721|      0|        vit->end = n;
  722|       |
  723|      0|        break;
  724|      0|    case IGRAPH_VS_NONADJ:
  ------------------
  |  Branch (724:5): [True: 0, False: 45.5k]
  ------------------
  725|      0|        vec_int = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   38|      0|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|      0|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  |  Branch (36:24): [Folded - Ignored]
  |  |  |  |  |  Branch (36:66): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  726|      0|        IGRAPH_CHECK_OOM(vec_int, "Cannot create vertex iterator.");
  ------------------
  |  |  701|      0|    do { \
  |  |  702|      0|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  727|      0|        IGRAPH_FINALLY(igraph_free, vec_int);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  728|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(vec_int, 0);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  729|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vec, 0);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  730|      0|        IGRAPH_CHECK(igraph_neighbors(graph, &vec, vs.data.adj.vid, vs.data.adj.mode));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  731|      0|        vec_len = igraph_vector_int_size(&vec);
  732|      0|        n = igraph_vcount(graph);
  733|      0|        seen = IGRAPH_CALLOC(n, igraph_bool_t);
  ------------------
  |  |   38|      0|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|      0|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 0, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 0, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  734|      0|        IGRAPH_CHECK_OOM(seen, "Cannot create vertex iterator.");
  ------------------
  |  |  701|      0|    do { \
  |  |  702|      0|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  735|      0|        IGRAPH_FINALLY(igraph_free, seen);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  736|      0|        for (i = 0; i < vec_len; i++) {
  ------------------
  |  Branch (736:21): [True: 0, False: 0]
  ------------------
  737|      0|            if (! seen [ VECTOR(vec)[i] ] ) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (737:17): [True: 0, False: 0]
  ------------------
  738|      0|                n--;
  739|      0|                seen[ VECTOR(vec)[i] ] = true;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  740|      0|            }
  741|      0|        }
  742|      0|        IGRAPH_CHECK(igraph_vector_int_resize(vec_int, n));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  743|      0|        for (i = 0, j = 0; j < n; i++) {
  ------------------
  |  Branch (743:28): [True: 0, False: 0]
  ------------------
  744|      0|            if (!seen[i]) {
  ------------------
  |  Branch (744:17): [True: 0, False: 0]
  ------------------
  745|      0|                VECTOR(*vec_int)[j++] = i;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  746|      0|            }
  747|      0|        }
  748|       |
  749|      0|        IGRAPH_FREE(seen);
  ------------------
  |  |   41|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  750|      0|        igraph_vector_int_destroy(&vec);
  751|      0|        IGRAPH_FINALLY_CLEAN(4);
  752|       |
  753|      0|        vit->type = IGRAPH_VIT_VECTOR;
  754|      0|        vit->pos = 0;
  755|      0|        vit->start = 0;
  756|      0|        vit->vec = vec_int;
  757|      0|        vit->end = n;
  758|      0|        break;
  759|      0|    case IGRAPH_VS_NONE:
  ------------------
  |  Branch (759:5): [True: 0, False: 45.5k]
  ------------------
  760|      0|        vit->type = IGRAPH_VIT_RANGE;
  761|      0|        vit->pos = 0;
  762|      0|        vit->start = 0;
  763|      0|        vit->end = 0;
  764|      0|        break;
  765|  8.76k|    case IGRAPH_VS_1:
  ------------------
  |  Branch (765:5): [True: 8.76k, False: 36.8k]
  ------------------
  766|  8.76k|        vit->type = IGRAPH_VIT_RANGE;
  767|  8.76k|        vit->pos = vs.data.vid;
  768|  8.76k|        vit->start = vs.data.vid;
  769|  8.76k|        vit->end = vs.data.vid + 1;
  770|  8.76k|        if (vit->pos >= igraph_vcount(graph)) {
  ------------------
  |  Branch (770:13): [True: 0, False: 8.76k]
  ------------------
  771|      0|            IGRAPH_ERROR("Cannot create iterator, invalid vertex ID.", IGRAPH_EINVVID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  772|      0|        }
  773|  8.76k|        break;
  774|  8.76k|    case IGRAPH_VS_VECTORPTR:
  ------------------
  |  Branch (774:5): [True: 2.40k, False: 43.1k]
  ------------------
  775|  2.40k|    case IGRAPH_VS_VECTOR:
  ------------------
  |  Branch (775:5): [True: 0, False: 45.5k]
  ------------------
  776|  2.40k|        vit->type = IGRAPH_VIT_VECTORPTR;
  777|  2.40k|        vit->pos = 0;
  778|  2.40k|        vit->start = 0;
  779|  2.40k|        vit->vec = vs.data.vecptr;
  780|  2.40k|        vit->end = igraph_vector_int_size(vit->vec);
  781|  2.40k|        if (!igraph_vector_int_isininterval(vit->vec, 0, igraph_vcount(graph) - 1)) {
  ------------------
  |  Branch (781:13): [True: 0, False: 2.40k]
  ------------------
  782|      0|            IGRAPH_ERROR("Cannot create iterator, invalid vertex ID.", IGRAPH_EINVVID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  783|      0|        }
  784|  2.40k|        break;
  785|  2.40k|    case IGRAPH_VS_RANGE:
  ------------------
  |  Branch (785:5): [True: 0, False: 45.5k]
  ------------------
  786|      0|        {
  787|      0|            igraph_integer_t no_of_nodes = igraph_vcount(graph);
  788|      0|            if (vs.data.range.start < 0 ||
  ------------------
  |  Branch (788:17): [True: 0, False: 0]
  ------------------
  789|      0|                vs.data.range.start > no_of_nodes ||
  ------------------
  |  Branch (789:17): [True: 0, False: 0]
  ------------------
  790|      0|                (no_of_nodes > 0 && vs.data.range.start == no_of_nodes)) {
  ------------------
  |  Branch (790:18): [True: 0, False: 0]
  |  Branch (790:37): [True: 0, False: 0]
  ------------------
  791|      0|                IGRAPH_ERROR("Cannot create range iterator, starting vertex ID out of range.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  792|      0|            }
  793|      0|            if (vs.data.range.end < 0 || vs.data.range.end > no_of_nodes) {
  ------------------
  |  Branch (793:17): [True: 0, False: 0]
  |  Branch (793:42): [True: 0, False: 0]
  ------------------
  794|      0|                IGRAPH_ERROR("Cannot create range iterator, ending vertex ID out of range.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  795|      0|            }
  796|      0|        }
  797|      0|        vit->type = IGRAPH_VIT_RANGE;
  798|      0|        vit->pos = vs.data.range.start;
  799|      0|        vit->start = vs.data.range.start;
  800|      0|        vit->end = vs.data.range.end;
  801|      0|        break;
  802|      0|    default:
  ------------------
  |  Branch (802:5): [True: 0, False: 45.5k]
  ------------------
  803|      0|        IGRAPH_ERROR("Cannot create iterator, invalid selector.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  804|      0|        break;
  805|  45.5k|    }
  806|  45.5k|    return IGRAPH_SUCCESS;
  807|  45.5k|}
igraph_vit_destroy:
  822|  45.5k|void igraph_vit_destroy(const igraph_vit_t *vit) {
  823|  45.5k|    switch (vit->type) {
  824|  43.1k|    case IGRAPH_VIT_RANGE:
  ------------------
  |  Branch (824:5): [True: 43.1k, False: 2.40k]
  ------------------
  825|  45.5k|    case IGRAPH_VIT_VECTORPTR:
  ------------------
  |  Branch (825:5): [True: 2.40k, False: 43.1k]
  ------------------
  826|  45.5k|        break;
  827|      0|    case IGRAPH_VIT_VECTOR:
  ------------------
  |  Branch (827:5): [True: 0, False: 45.5k]
  ------------------
  828|      0|        igraph_vector_int_destroy((igraph_vector_int_t*) vit->vec);
  829|      0|        igraph_free((igraph_vector_int_t*) vit->vec);
  830|      0|        break;
  831|      0|    default:
  ------------------
  |  Branch (831:5): [True: 0, False: 45.5k]
  ------------------
  832|       |        /*     IGRAPH_ERROR("Cannot destroy iterator, unknown type", IGRAPH_EINVAL); */
  833|      0|        break;
  834|  45.5k|    }
  835|  45.5k|}
igraph_vit_as_vector:
  837|  1.92k|igraph_error_t igraph_vit_as_vector(const igraph_vit_t *vit, igraph_vector_int_t *v) {
  838|  1.92k|    igraph_integer_t i;
  839|       |
  840|  1.92k|    IGRAPH_CHECK(igraph_vector_int_resize(v, IGRAPH_VIT_SIZE(*vit)));
  ------------------
  |  |  648|  1.92k|    do { \
  |  |  649|  1.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  841|       |
  842|  1.92k|    switch (vit->type) {
  843|      0|    case IGRAPH_VIT_RANGE:
  ------------------
  |  Branch (843:5): [True: 0, False: 1.92k]
  ------------------
  844|      0|        for (i = 0; i < IGRAPH_VIT_SIZE(*vit); i++) {
  ------------------
  |  |  191|      0|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  |  Branch (844:21): [True: 0, False: 0]
  ------------------
  845|      0|            VECTOR(*v)[i] = vit->start + i;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  846|      0|        }
  847|      0|        break;
  848|      0|    case IGRAPH_VIT_VECTOR:
  ------------------
  |  Branch (848:5): [True: 0, False: 1.92k]
  ------------------
  849|  1.92k|    case IGRAPH_VIT_VECTORPTR:
  ------------------
  |  Branch (849:5): [True: 1.92k, False: 0]
  ------------------
  850|  30.4k|        for (i = 0; i < IGRAPH_VIT_SIZE(*vit); i++) {
  ------------------
  |  |  191|  30.4k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  |  Branch (850:21): [True: 28.5k, False: 1.92k]
  ------------------
  851|  28.5k|            VECTOR(*v)[i] = VECTOR(*vit->vec)[i];
  ------------------
  |  |   65|  28.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*v)[i] = VECTOR(*vit->vec)[i];
  ------------------
  |  |   65|  28.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  852|  28.5k|        }
  853|  1.92k|        break;
  854|      0|    default:
  ------------------
  |  Branch (854:5): [True: 0, False: 1.92k]
  ------------------
  855|      0|        IGRAPH_ERROR("Cannot convert to vector, unknown iterator type",
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  856|      0|                     IGRAPH_EINVAL);
  857|      0|        break;
  858|  1.92k|    }
  859|       |
  860|  1.92k|    return IGRAPH_SUCCESS;
  861|  1.92k|}
igraph_es_all:
  890|  10.6k|                  igraph_edgeorder_type_t order) {
  891|  10.6k|    switch (order) {
  892|  3.81k|    case IGRAPH_EDGEORDER_ID:
  ------------------
  |  Branch (892:5): [True: 3.81k, False: 6.81k]
  ------------------
  893|  3.81k|        es->type = IGRAPH_ES_ALL;
  894|  3.81k|        break;
  895|  4.78k|    case IGRAPH_EDGEORDER_FROM:
  ------------------
  |  Branch (895:5): [True: 4.78k, False: 5.84k]
  ------------------
  896|  4.78k|        es->type = IGRAPH_ES_ALLFROM;
  897|  4.78k|        break;
  898|  2.02k|    case IGRAPH_EDGEORDER_TO:
  ------------------
  |  Branch (898:5): [True: 2.02k, False: 8.59k]
  ------------------
  899|  2.02k|        es->type = IGRAPH_ES_ALLTO;
  900|  2.02k|        break;
  901|      0|    default:
  ------------------
  |  Branch (901:5): [True: 0, False: 10.6k]
  ------------------
  902|      0|        IGRAPH_ERROR("Invalid edge order, cannot create selector.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  903|      0|        break;
  904|  10.6k|    }
  905|  10.6k|    return IGRAPH_SUCCESS;
  906|  10.6k|}
igraph_ess_all:
  922|  9.63k|igraph_es_t igraph_ess_all(igraph_edgeorder_type_t order) {
  923|  9.63k|    igraph_es_t es;
  924|  9.63k|    igraph_es_all(&es, order); /* cannot fail */
  925|  9.63k|    return es;
  926|  9.63k|}
igraph_ess_1:
 1019|  2.02k|igraph_es_t igraph_ess_1(igraph_integer_t eid) {
 1020|  2.02k|    igraph_es_t es;
 1021|  2.02k|    es.type = IGRAPH_ES_1;
 1022|  2.02k|    es.data.eid = eid;
 1023|  2.02k|    return es;
 1024|  2.02k|}
igraph_ess_vector:
 1100|  4.82k|igraph_es_t igraph_ess_vector(const igraph_vector_int_t *v) {
 1101|  4.82k|    igraph_es_t es;
 1102|  4.82k|    es.type = IGRAPH_ES_VECTORPTR;
 1103|  4.82k|    es.data.vecptr = v;
 1104|  4.82k|    return es;
 1105|  4.82k|}
igraph_es_destroy:
 1369|    992|void igraph_es_destroy(igraph_es_t *es) {
 1370|    992|    switch (es->type) {
 1371|    251|    case IGRAPH_ES_ALL:
  ------------------
  |  Branch (1371:5): [True: 251, False: 741]
  ------------------
 1372|    992|    case IGRAPH_ES_ALLFROM:
  ------------------
  |  Branch (1372:5): [True: 741, False: 251]
  ------------------
 1373|    992|    case IGRAPH_ES_ALLTO:
  ------------------
  |  Branch (1373:5): [True: 0, False: 992]
  ------------------
 1374|    992|    case IGRAPH_ES_INCIDENT:
  ------------------
  |  Branch (1374:5): [True: 0, False: 992]
  ------------------
 1375|    992|    case IGRAPH_ES_NONE:
  ------------------
  |  Branch (1375:5): [True: 0, False: 992]
  ------------------
 1376|    992|    case IGRAPH_ES_1:
  ------------------
  |  Branch (1376:5): [True: 0, False: 992]
  ------------------
 1377|    992|    case IGRAPH_ES_VECTORPTR:
  ------------------
  |  Branch (1377:5): [True: 0, False: 992]
  ------------------
 1378|    992|    case IGRAPH_ES_RANGE:
  ------------------
  |  Branch (1378:5): [True: 0, False: 992]
  ------------------
 1379|    992|    case IGRAPH_ES_ALL_BETWEEN:
  ------------------
  |  Branch (1379:5): [True: 0, False: 992]
  ------------------
 1380|    992|        break;
 1381|      0|    case IGRAPH_ES_VECTOR:
  ------------------
  |  Branch (1381:5): [True: 0, False: 992]
  ------------------
 1382|      0|        igraph_vector_int_destroy((igraph_vector_int_t*)es->data.vecptr);
 1383|      0|        IGRAPH_FREE(es->data.vecptr);
  ------------------
  |  |   41|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1384|      0|        break;
 1385|      0|    case IGRAPH_ES_PAIRS:
  ------------------
  |  Branch (1385:5): [True: 0, False: 992]
  ------------------
 1386|      0|    case IGRAPH_ES_PATH:
  ------------------
  |  Branch (1386:5): [True: 0, False: 992]
  ------------------
 1387|      0|        igraph_vector_int_destroy((igraph_vector_int_t*)es->data.path.ptr);
 1388|      0|        IGRAPH_FREE(es->data.path.ptr);
  ------------------
  |  |   41|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1389|      0|        break;
 1390|      0|    default:
  ------------------
  |  Branch (1390:5): [True: 0, False: 992]
  ------------------
 1391|      0|        break;
 1392|    992|    }
 1393|    992|}
igraph_es_is_all:
 1406|      1|igraph_bool_t igraph_es_is_all(const igraph_es_t *es) {
 1407|      1|    return es->type == IGRAPH_ES_ALL;
 1408|      1|}
igraph_eit_create:
 1872|  18.5k|igraph_error_t igraph_eit_create(const igraph_t *graph, igraph_es_t es, igraph_eit_t *eit) {
 1873|  18.5k|    switch (es.type) {
 1874|  3.81k|    case IGRAPH_ES_ALL:
  ------------------
  |  Branch (1874:5): [True: 3.81k, False: 14.6k]
  ------------------
 1875|  3.81k|        eit->type = IGRAPH_EIT_RANGE;
 1876|  3.81k|        eit->pos = 0;
 1877|  3.81k|        eit->start = 0;
 1878|  3.81k|        eit->end = igraph_ecount(graph);
 1879|  3.81k|        break;
 1880|  4.78k|    case IGRAPH_ES_ALLFROM:
  ------------------
  |  Branch (1880:5): [True: 4.78k, False: 13.7k]
  ------------------
 1881|  4.78k|        IGRAPH_CHECK(igraph_i_eit_create_allfromto(graph, eit, IGRAPH_OUT));
  ------------------
  |  |  648|  4.78k|    do { \
  |  |  649|  4.78k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  4.78k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  4.78k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.78k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  4.78k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1882|  4.78k|        break;
 1883|  4.78k|    case IGRAPH_ES_ALLTO:
  ------------------
  |  Branch (1883:5): [True: 2.02k, False: 16.4k]
  ------------------
 1884|  2.02k|        IGRAPH_CHECK(igraph_i_eit_create_allfromto(graph, eit, IGRAPH_IN));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1885|  2.02k|        break;
 1886|  2.02k|    case IGRAPH_ES_INCIDENT:
  ------------------
  |  Branch (1886:5): [True: 0, False: 18.5k]
  ------------------
 1887|      0|        IGRAPH_CHECK(igraph_i_eit_create_incident(graph, es, eit));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1888|      0|        break;
 1889|      0|    case IGRAPH_ES_NONE:
  ------------------
  |  Branch (1889:5): [True: 0, False: 18.5k]
  ------------------
 1890|      0|        eit->type = IGRAPH_EIT_RANGE;
 1891|      0|        eit->pos = 0;
 1892|      0|        eit->start = 0;
 1893|      0|        eit->end = 0;
 1894|      0|        break;
 1895|  2.02k|    case IGRAPH_ES_1:
  ------------------
  |  Branch (1895:5): [True: 2.02k, False: 16.4k]
  ------------------
 1896|  2.02k|        eit->type = IGRAPH_EIT_RANGE;
 1897|  2.02k|        eit->pos = es.data.eid;
 1898|  2.02k|        eit->start = es.data.eid;
 1899|  2.02k|        eit->end = es.data.eid + 1;
 1900|  2.02k|        if (eit->pos >= igraph_ecount(graph)) {
  ------------------
  |  Branch (1900:13): [True: 0, False: 2.02k]
  ------------------
 1901|      0|            IGRAPH_ERROR("Cannot create iterator.", IGRAPH_EINVEID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1902|      0|        }
 1903|  2.02k|        break;
 1904|  2.02k|    case IGRAPH_ES_VECTOR:
  ------------------
  |  Branch (1904:5): [True: 0, False: 18.5k]
  ------------------
 1905|  5.84k|    case IGRAPH_ES_VECTORPTR:
  ------------------
  |  Branch (1905:5): [True: 5.84k, False: 12.6k]
  ------------------
 1906|  5.84k|        eit->type = IGRAPH_EIT_VECTORPTR;
 1907|  5.84k|        eit->pos = 0;
 1908|  5.84k|        eit->start = 0;
 1909|  5.84k|        eit->vec = es.data.vecptr;
 1910|  5.84k|        eit->end = igraph_vector_int_size(eit->vec);
 1911|  5.84k|        if (!igraph_vector_int_isininterval(eit->vec, 0, igraph_ecount(graph) - 1)) {
  ------------------
  |  Branch (1911:13): [True: 0, False: 5.84k]
  ------------------
 1912|      0|            IGRAPH_ERROR("Cannot create iterator.", IGRAPH_EINVEID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1913|      0|        }
 1914|  5.84k|        break;
 1915|  5.84k|    case IGRAPH_ES_RANGE:
  ------------------
  |  Branch (1915:5): [True: 0, False: 18.5k]
  ------------------
 1916|      0|        {
 1917|      0|            igraph_integer_t no_of_edges = igraph_ecount(graph);
 1918|      0|            if (es.data.range.start < 0 ||
  ------------------
  |  Branch (1918:17): [True: 0, False: 0]
  ------------------
 1919|      0|                es.data.range.start > no_of_edges ||
  ------------------
  |  Branch (1919:17): [True: 0, False: 0]
  ------------------
 1920|      0|                (no_of_edges > 0 && es.data.range.start == no_of_edges)) {
  ------------------
  |  Branch (1920:18): [True: 0, False: 0]
  |  Branch (1920:37): [True: 0, False: 0]
  ------------------
 1921|      0|                IGRAPH_ERROR("Cannot create range iterator, starting edge ID out of range.", IGRAPH_EINVEID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1922|      0|            }
 1923|      0|            if (es.data.range.end < 0 || es.data.range.end > no_of_edges) {
  ------------------
  |  Branch (1923:17): [True: 0, False: 0]
  |  Branch (1923:42): [True: 0, False: 0]
  ------------------
 1924|      0|                IGRAPH_ERROR("Cannot create range iterator, ending edge ID out of range.", IGRAPH_EINVEID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1925|      0|            }
 1926|      0|        }
 1927|      0|        eit->type = IGRAPH_EIT_RANGE;
 1928|      0|        eit->pos = es.data.range.start;
 1929|      0|        eit->start = es.data.range.start;
 1930|      0|        eit->end = es.data.range.end;
 1931|      0|        break;
 1932|      0|    case IGRAPH_ES_PAIRS:
  ------------------
  |  Branch (1932:5): [True: 0, False: 18.5k]
  ------------------
 1933|      0|        IGRAPH_CHECK(igraph_i_eit_pairs(graph, es, eit));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1934|      0|        break;
 1935|      0|    case IGRAPH_ES_PATH:
  ------------------
  |  Branch (1935:5): [True: 0, False: 18.5k]
  ------------------
 1936|      0|        IGRAPH_CHECK(igraph_i_eit_path(graph, es, eit));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1937|      0|        break;
 1938|      0|    case IGRAPH_ES_ALL_BETWEEN:
  ------------------
  |  Branch (1938:5): [True: 0, False: 18.5k]
  ------------------
 1939|      0|        IGRAPH_CHECK(igraph_i_eit_all_between(graph, es, eit));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1940|      0|        break;
 1941|      0|    default:
  ------------------
  |  Branch (1941:5): [True: 0, False: 18.5k]
  ------------------
 1942|      0|        IGRAPH_ERROR("Cannot create iterator, invalid selector.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1943|      0|        break;
 1944|  18.5k|    }
 1945|  18.5k|    return IGRAPH_SUCCESS;
 1946|  18.5k|}
igraph_eit_destroy:
 1958|  18.5k|void igraph_eit_destroy(const igraph_eit_t *eit) {
 1959|  18.5k|    switch (eit->type) {
 1960|  5.84k|    case IGRAPH_EIT_RANGE:
  ------------------
  |  Branch (1960:5): [True: 5.84k, False: 12.6k]
  ------------------
 1961|  11.6k|    case IGRAPH_EIT_VECTORPTR:
  ------------------
  |  Branch (1961:5): [True: 5.84k, False: 12.6k]
  ------------------
 1962|  11.6k|        break;
 1963|  6.81k|    case IGRAPH_EIT_VECTOR:
  ------------------
  |  Branch (1963:5): [True: 6.81k, False: 11.6k]
  ------------------
 1964|  6.81k|        igraph_vector_int_destroy((igraph_vector_int_t*)eit->vec);
 1965|  6.81k|        igraph_free((igraph_vector_int_t*)eit->vec);
 1966|  6.81k|        break;
 1967|      0|    default:
  ------------------
  |  Branch (1967:5): [True: 0, False: 18.5k]
  ------------------
 1968|       |        /*     IGRAPH_ERROR("Cannot destroy iterator, unknown type", IGRAPH_EINVAL); */
 1969|      0|        break;
 1970|  18.5k|    }
 1971|  18.5k|}
iterators.c:igraph_i_eit_create_allfromto:
 1649|  6.81k|                                         igraph_neimode_t mode) {
 1650|  6.81k|    igraph_vector_int_t *vec;
 1651|  6.81k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
 1652|  6.81k|    igraph_integer_t no_of_edges = igraph_ecount(graph);
 1653|       |
 1654|  6.81k|    vec = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   38|  6.81k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  13.6k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  |  Branch (36:24): [Folded - Ignored]
  |  |  |  |  |  Branch (36:66): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1655|  6.81k|    IGRAPH_CHECK_OOM(vec, "Cannot create edge iterator.");
  ------------------
  |  |  701|  6.81k|    do { \
  |  |  702|  6.81k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  6.81k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.81k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  6.81k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1656|  6.81k|    IGRAPH_FINALLY(igraph_free, vec);
  ------------------
  |  |  591|  6.81k|    do { \
  |  |  592|  6.81k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  6.81k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  6.81k|         * incorrect destructor function with the pointer */ \
  |  |  595|  6.81k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  6.81k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  6.81k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1657|       |
 1658|  6.81k|    IGRAPH_VECTOR_INT_INIT_FINALLY(vec, 0);
  ------------------
  |  |  124|  6.81k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  6.81k|    do { \
  |  |  |  |  649|  6.81k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  6.81k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  6.81k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.81k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  6.81k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  6.81k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  6.81k|    do { \
  |  |  |  |  592|  6.81k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  6.81k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  6.81k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  6.81k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  6.81k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  6.81k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1659|  6.81k|    IGRAPH_CHECK(igraph_vector_int_reserve(vec, no_of_edges));
  ------------------
  |  |  648|  6.81k|    do { \
  |  |  649|  6.81k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  6.81k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  6.81k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.81k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  6.81k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1660|       |
 1661|  6.81k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (1661:9): [True: 0, False: 6.81k]
  ------------------
 1662|      0|        igraph_vector_int_t adj;
 1663|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&adj, 0);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1664|      0|        for (igraph_integer_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (1664:38): [True: 0, False: 0]
  ------------------
 1665|      0|            IGRAPH_CHECK(igraph_incident(graph, &adj, i, mode));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1666|      0|            igraph_vector_int_append(vec, &adj);  /* reserved */
 1667|      0|        }
 1668|      0|        igraph_vector_int_destroy(&adj);
 1669|      0|        IGRAPH_FINALLY_CLEAN(1);
 1670|  6.81k|    } else {
 1671|  6.81k|        igraph_vector_int_t adj;
 1672|  6.81k|        igraph_bool_t *added;
 1673|  6.81k|        IGRAPH_VECTOR_INT_INIT_FINALLY(&adj, 0);
  ------------------
  |  |  124|  6.81k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  6.81k|    do { \
  |  |  |  |  649|  6.81k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  6.81k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  6.81k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.81k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  6.81k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  6.81k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  6.81k|    do { \
  |  |  |  |  592|  6.81k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  6.81k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  6.81k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  6.81k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  6.81k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  6.81k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1674|  6.81k|        added = IGRAPH_CALLOC(no_of_edges, igraph_bool_t);
  ------------------
  |  |   38|  6.81k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  13.6k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 6.81k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 6.81k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 6.53k, False: 280]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1675|  6.81k|        IGRAPH_CHECK_OOM(added, "Cannot create edge iterator.");
  ------------------
  |  |  701|  6.81k|    do { \
  |  |  702|  6.81k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  6.81k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.81k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  6.81k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1676|  6.81k|        IGRAPH_FINALLY(igraph_free, added);
  ------------------
  |  |  591|  6.81k|    do { \
  |  |  592|  6.81k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  6.81k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  6.81k|         * incorrect destructor function with the pointer */ \
  |  |  595|  6.81k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  6.81k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  6.81k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1677|  1.17M|        for (igraph_integer_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (1677:38): [True: 1.16M, False: 6.81k]
  ------------------
 1678|  1.16M|            IGRAPH_CHECK(igraph_incident(graph, &adj, i, IGRAPH_ALL));
  ------------------
  |  |  648|  1.16M|    do { \
  |  |  649|  1.16M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.16M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.16M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.16M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.16M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1679|  1.16M|            const igraph_integer_t length = igraph_vector_int_size(&adj);
 1680|  1.69M|            for (igraph_integer_t j = 0; j < length; j++) {
  ------------------
  |  Branch (1680:42): [True: 529k, False: 1.16M]
  ------------------
 1681|   529k|                if (!added[ VECTOR(adj)[j] ]) {
  ------------------
  |  |   65|   529k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1681:21): [True: 264k, False: 264k]
  ------------------
 1682|   264k|                    igraph_vector_int_push_back(vec, VECTOR(adj)[j]);  /* reserved */
  ------------------
  |  |   65|   264k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1683|   264k|                    added[ VECTOR(adj)[j] ] = true;
  ------------------
  |  |   65|   264k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1684|   264k|                }
 1685|   529k|            }
 1686|  1.16M|        }
 1687|  6.81k|        igraph_vector_int_destroy(&adj);
 1688|  6.81k|        IGRAPH_FREE(added);
  ------------------
  |  |   41|  6.81k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1689|  6.81k|        IGRAPH_FINALLY_CLEAN(2);
 1690|  6.81k|    }
 1691|       |
 1692|  6.81k|    eit->type = IGRAPH_EIT_VECTOR;
 1693|  6.81k|    eit->pos = 0;
 1694|  6.81k|    eit->start = 0;
 1695|  6.81k|    eit->vec = vec;
 1696|  6.81k|    eit->end = igraph_vector_int_size(eit->vec);
 1697|       |
 1698|  6.81k|    IGRAPH_FINALLY_CLEAN(2);
 1699|  6.81k|    return IGRAPH_SUCCESS;
 1700|  6.81k|}

igraph_empty:
   65|  35.1k|igraph_error_t igraph_empty(igraph_t *graph, igraph_integer_t n, igraph_bool_t directed) {
   66|  35.1k|    return igraph_empty_attrs(graph, n, directed, 0);
   67|  35.1k|}
igraph_delete_vertices:
   92|  2.02k|igraph_error_t igraph_delete_vertices(igraph_t *graph, const igraph_vs_t vertices) {
   93|  2.02k|    return igraph_delete_vertices_map(graph, vertices, /* idx= */ 0, /* invidx= */ 0);
   94|  2.02k|}
igraph_edge:
  133|  50.1k|) {
  134|       |
  135|  50.1k|    if (eid < 0 || eid >= igraph_ecount(graph)) {
  ------------------
  |  Branch (135:9): [True: 0, False: 50.1k]
  |  Branch (135:20): [True: 0, False: 50.1k]
  ------------------
  136|      0|        IGRAPH_ERROR("Cannot retrieve edge endpoints.", IGRAPH_EINVEID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  137|      0|    }
  138|       |
  139|  50.1k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (139:9): [True: 0, False: 50.1k]
  ------------------
  140|      0|        *from = IGRAPH_FROM(graph, eid);
  ------------------
  |  |  113|      0|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  141|      0|        *to   = IGRAPH_TO(graph, eid);
  ------------------
  |  |  126|      0|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  142|  50.1k|    } else {
  143|  50.1k|        *from = IGRAPH_TO(graph, eid);
  ------------------
  |  |  126|  50.1k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  50.1k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  144|  50.1k|        *to   = IGRAPH_FROM(graph, eid);
  ------------------
  |  |  113|  50.1k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  50.1k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  145|  50.1k|    }
  146|       |
  147|  50.1k|    return IGRAPH_SUCCESS;
  148|  50.1k|}
igraph_edges:
  167|  2.01k|igraph_error_t igraph_edges(const igraph_t *graph, igraph_es_t eids, igraph_vector_int_t *edges) {
  168|  2.01k|    igraph_eit_t eit;
  169|  2.01k|    igraph_integer_t n, ptr = 0;
  170|       |
  171|  2.01k|    IGRAPH_CHECK(igraph_eit_create(graph, eids, &eit));
  ------------------
  |  |  648|  2.01k|    do { \
  |  |  649|  2.01k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.01k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  172|  2.01k|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  591|  2.01k|    do { \
  |  |  592|  2.01k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.01k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.01k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.01k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.01k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  173|  2.01k|    n = IGRAPH_EIT_SIZE(eit);
  ------------------
  |  |  381|  2.01k|#define IGRAPH_EIT_SIZE(eit)  ((eit).end - (eit).start)
  ------------------
  174|  2.01k|    IGRAPH_CHECK(igraph_vector_int_resize(edges, n * 2));
  ------------------
  |  |  648|  2.01k|    do { \
  |  |  649|  2.01k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.01k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  175|       |
  176|  2.01k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (176:9): [True: 0, False: 2.01k]
  ------------------
  177|      0|        for (; !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  370|      0|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                      for (; !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  358|      0|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (177:16): [True: 0, False: 0]
  ------------------
  178|      0|            igraph_integer_t e = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  404|      0|    (igraph_integer_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (404:25): [True: 0, False: 0]
  |  |  ------------------
  |  |  405|      0|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  179|      0|            VECTOR(*edges)[ptr++] = IGRAPH_FROM(graph, e);
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*edges)[ptr++] = IGRAPH_FROM(graph, e);
  ------------------
  |  |  113|      0|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  180|      0|            VECTOR(*edges)[ptr++] = IGRAPH_TO(graph, e);
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*edges)[ptr++] = IGRAPH_TO(graph, e);
  ------------------
  |  |  126|      0|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  181|      0|        }
  182|  2.01k|    } else {
  183|  76.5k|        for (; !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  370|  76.5k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                      for (; !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  358|  74.5k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (183:16): [True: 74.5k, False: 2.01k]
  ------------------
  184|  74.5k|            igraph_integer_t e = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  404|  74.5k|    (igraph_integer_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (404:25): [True: 0, False: 74.5k]
  |  |  ------------------
  |  |  405|  74.5k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   65|  74.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  185|  74.5k|            VECTOR(*edges)[ptr++] = IGRAPH_TO(graph, e);
  ------------------
  |  |   65|  74.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*edges)[ptr++] = IGRAPH_TO(graph, e);
  ------------------
  |  |  126|  74.5k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  74.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  186|  74.5k|            VECTOR(*edges)[ptr++] = IGRAPH_FROM(graph, e);
  ------------------
  |  |   65|  74.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*edges)[ptr++] = IGRAPH_FROM(graph, e);
  ------------------
  |  |  113|  74.5k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  74.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  187|  74.5k|        }
  188|  2.01k|    }
  189|       |
  190|  2.01k|    igraph_eit_destroy(&eit);
  191|  2.01k|    IGRAPH_FINALLY_CLEAN(1);
  192|       |
  193|  2.01k|    return IGRAPH_SUCCESS;
  194|  2.01k|}

igraph_empty_attrs:
  101|  35.1k|) {
  102|       |
  103|  35.1k|    if (n < 0) {
  ------------------
  |  Branch (103:9): [True: 0, False: 35.1k]
  ------------------
  104|      0|        IGRAPH_ERROR("Number of vertices must not be negative.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  105|      0|    }
  106|       |
  107|  35.1k|    memset(graph, 0, sizeof(igraph_t));
  108|       |
  109|  35.1k|    graph->n = 0;
  110|  35.1k|    graph->directed = directed;
  111|  35.1k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->from, 0);
  ------------------
  |  |  124|  35.1k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  35.1k|    do { \
  |  |  |  |  649|  35.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  35.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  35.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 35.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  35.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  35.1k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  35.1k|    do { \
  |  |  |  |  592|  35.1k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  35.1k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  35.1k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  35.1k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  35.1k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  35.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  112|  35.1k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->to, 0);
  ------------------
  |  |  124|  35.1k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  35.1k|    do { \
  |  |  |  |  649|  35.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  35.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  35.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 35.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  35.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  35.1k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  35.1k|    do { \
  |  |  |  |  592|  35.1k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  35.1k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  35.1k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  35.1k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  35.1k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  35.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  113|  35.1k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->oi, 0);
  ------------------
  |  |  124|  35.1k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  35.1k|    do { \
  |  |  |  |  649|  35.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  35.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  35.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 35.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  35.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  35.1k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  35.1k|    do { \
  |  |  |  |  592|  35.1k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  35.1k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  35.1k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  35.1k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  35.1k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  35.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  114|  35.1k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->ii, 0);
  ------------------
  |  |  124|  35.1k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  35.1k|    do { \
  |  |  |  |  649|  35.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  35.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  35.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 35.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  35.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  35.1k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  35.1k|    do { \
  |  |  |  |  592|  35.1k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  35.1k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  35.1k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  35.1k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  35.1k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  35.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  115|  35.1k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->os, 1);
  ------------------
  |  |  124|  35.1k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  35.1k|    do { \
  |  |  |  |  649|  35.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  35.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  35.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 35.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  35.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  35.1k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  35.1k|    do { \
  |  |  |  |  592|  35.1k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  35.1k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  35.1k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  35.1k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  35.1k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  35.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  116|  35.1k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->is, 1);
  ------------------
  |  |  124|  35.1k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  35.1k|    do { \
  |  |  |  |  649|  35.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  35.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  35.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 35.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  35.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  35.1k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  35.1k|    do { \
  |  |  |  |  592|  35.1k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  35.1k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  35.1k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  35.1k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  35.1k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  35.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  117|       |
  118|       |    /* init cache */
  119|  35.1k|    graph->cache = IGRAPH_CALLOC(1, igraph_i_property_cache_t);
  ------------------
  |  |   38|  35.1k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  70.2k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  |  Branch (36:24): [Folded - Ignored]
  |  |  |  |  |  Branch (36:66): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  120|  35.1k|    IGRAPH_CHECK_OOM(graph->cache, "Cannot create graph.");
  ------------------
  |  |  701|  35.1k|    do { \
  |  |  702|  35.1k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  35.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 35.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  35.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  121|  35.1k|    IGRAPH_FINALLY(igraph_free, graph->cache);
  ------------------
  |  |  591|  35.1k|    do { \
  |  |  592|  35.1k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  35.1k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  35.1k|         * incorrect destructor function with the pointer */ \
  |  |  595|  35.1k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  35.1k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  35.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  122|  35.1k|    IGRAPH_CHECK(igraph_i_property_cache_init(graph->cache));
  ------------------
  |  |  648|  35.1k|    do { \
  |  |  649|  35.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  35.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  35.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 35.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  35.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  123|  35.1k|    IGRAPH_FINALLY(igraph_i_property_cache_destroy, graph->cache);
  ------------------
  |  |  591|  35.1k|    do { \
  |  |  592|  35.1k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  35.1k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  35.1k|         * incorrect destructor function with the pointer */ \
  |  |  595|  35.1k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  35.1k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  35.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  124|       |
  125|  35.1k|    VECTOR(graph->os)[0] = 0;
  ------------------
  |  |   65|  35.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  126|  35.1k|    VECTOR(graph->is)[0] = 0;
  ------------------
  |  |   65|  35.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  127|       |
  128|       |    /* init attributes */
  129|  35.1k|    IGRAPH_CHECK(igraph_i_attribute_init(graph, attr));
  ------------------
  |  |  648|  35.1k|    do { \
  |  |  649|  35.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  35.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  35.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 35.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  35.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  130|       |
  131|       |    /* add the vertices */
  132|  35.1k|    IGRAPH_CHECK(igraph_add_vertices(graph, n, 0));
  ------------------
  |  |  648|  35.1k|    do { \
  |  |  649|  35.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  35.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  35.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 35.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  35.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  133|       |
  134|  35.1k|    IGRAPH_FINALLY_CLEAN(8);
  135|  35.1k|    return IGRAPH_SUCCESS;
  136|  35.1k|}
igraph_destroy:
  154|  39.6k|void igraph_destroy(igraph_t *graph) {
  155|  39.6k|    igraph_i_attribute_destroy(graph);
  156|       |
  157|  39.6k|    igraph_i_property_cache_destroy(graph->cache);
  158|  39.6k|    IGRAPH_FREE(graph->cache);
  ------------------
  |  |   41|  39.6k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  159|       |
  160|  39.6k|    igraph_vector_int_destroy(&graph->from);
  161|  39.6k|    igraph_vector_int_destroy(&graph->to);
  162|  39.6k|    igraph_vector_int_destroy(&graph->oi);
  163|  39.6k|    igraph_vector_int_destroy(&graph->ii);
  164|  39.6k|    igraph_vector_int_destroy(&graph->os);
  165|  39.6k|    igraph_vector_int_destroy(&graph->is);
  166|  39.6k|}
igraph_copy:
  194|  2.27k|igraph_error_t igraph_copy(igraph_t *to, const igraph_t *from) {
  195|  2.27k|    memset(to, 0, sizeof(igraph_t));
  196|       |
  197|  2.27k|    to->n = from->n;
  198|  2.27k|    to->directed = from->directed;
  199|  2.27k|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->from, &from->from));
  ------------------
  |  |  648|  2.27k|    do { \
  |  |  649|  2.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  200|  2.27k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->from);
  ------------------
  |  |  591|  2.27k|    do { \
  |  |  592|  2.27k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.27k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.27k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.27k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.27k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  201|  2.27k|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->to, &from->to));
  ------------------
  |  |  648|  2.27k|    do { \
  |  |  649|  2.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  202|  2.27k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->to);
  ------------------
  |  |  591|  2.27k|    do { \
  |  |  592|  2.27k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.27k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.27k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.27k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.27k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  203|  2.27k|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->oi, &from->oi));
  ------------------
  |  |  648|  2.27k|    do { \
  |  |  649|  2.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  204|  2.27k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->oi);
  ------------------
  |  |  591|  2.27k|    do { \
  |  |  592|  2.27k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.27k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.27k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.27k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.27k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  205|  2.27k|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->ii, &from->ii));
  ------------------
  |  |  648|  2.27k|    do { \
  |  |  649|  2.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  206|  2.27k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->ii);
  ------------------
  |  |  591|  2.27k|    do { \
  |  |  592|  2.27k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.27k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.27k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.27k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.27k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  207|  2.27k|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->os, &from->os));
  ------------------
  |  |  648|  2.27k|    do { \
  |  |  649|  2.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  208|  2.27k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->os);
  ------------------
  |  |  591|  2.27k|    do { \
  |  |  592|  2.27k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.27k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.27k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.27k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.27k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  209|  2.27k|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->is, &from->is));
  ------------------
  |  |  648|  2.27k|    do { \
  |  |  649|  2.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  210|  2.27k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->is);
  ------------------
  |  |  591|  2.27k|    do { \
  |  |  592|  2.27k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.27k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.27k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.27k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.27k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  211|       |
  212|  2.27k|    to->cache = IGRAPH_CALLOC(1, igraph_i_property_cache_t);
  ------------------
  |  |   38|  2.27k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  4.54k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  |  Branch (36:24): [Folded - Ignored]
  |  |  |  |  |  Branch (36:66): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  213|  2.27k|    IGRAPH_CHECK_OOM(to->cache, "Cannot copy graph.");
  ------------------
  |  |  701|  2.27k|    do { \
  |  |  702|  2.27k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  214|  2.27k|    IGRAPH_FINALLY(igraph_free, to->cache);
  ------------------
  |  |  591|  2.27k|    do { \
  |  |  592|  2.27k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.27k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.27k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.27k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.27k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  215|  2.27k|    IGRAPH_CHECK(igraph_i_property_cache_copy(to->cache, from->cache));
  ------------------
  |  |  648|  2.27k|    do { \
  |  |  649|  2.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  216|  2.27k|    IGRAPH_FINALLY(igraph_i_property_cache_destroy, to->cache);
  ------------------
  |  |  591|  2.27k|    do { \
  |  |  592|  2.27k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.27k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.27k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.27k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.27k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  217|       |
  218|  2.27k|    IGRAPH_CHECK(igraph_i_attribute_copy(to, from, true, true, true));
  ------------------
  |  |  648|  2.27k|    do { \
  |  |  649|  2.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  219|       |
  220|  2.27k|    IGRAPH_FINALLY_CLEAN(8);
  221|  2.27k|    return IGRAPH_SUCCESS;
  222|  2.27k|}
igraph_add_edges:
  256|  36.7k|) {
  257|  36.7k|    igraph_integer_t no_of_edges = igraph_vector_int_size(&graph->from);
  258|  36.7k|    igraph_integer_t edges_to_add = igraph_vector_int_size(edges) / 2;
  259|  36.7k|    igraph_integer_t new_no_of_edges;
  260|  36.7k|    igraph_integer_t i = 0;
  261|  36.7k|    igraph_vector_int_t newoi, newii;
  262|  36.7k|    igraph_bool_t directed = igraph_is_directed(graph);
  263|       |
  264|  36.7k|    if (igraph_vector_int_size(edges) % 2 != 0) {
  ------------------
  |  Branch (264:9): [True: 0, False: 36.7k]
  ------------------
  265|      0|        IGRAPH_ERROR("Invalid (odd) length of edges vector.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  266|      0|    }
  267|  36.7k|    if (!igraph_vector_int_isininterval(edges, 0, igraph_vcount(graph) - 1)) {
  ------------------
  |  Branch (267:9): [True: 0, False: 36.7k]
  ------------------
  268|      0|        IGRAPH_ERROR("Out-of-range vertex IDs when adding edges.", IGRAPH_EINVVID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  269|      0|    }
  270|       |
  271|       |    /* from & to */
  272|  36.7k|    IGRAPH_SAFE_ADD(no_of_edges, edges_to_add, &new_no_of_edges);
  ------------------
  |  |   47|  36.7k|    do { \
  |  |   48|  36.7k|        igraph_integer_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  36.7k|        igraph_integer_t _safe_sum; \
  |  |   50|  36.7k|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 36.7k]
  |  |  ------------------
  |  |   51|      0|            IGRAPH_ERRORF("Overflow when adding %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  469|      0|    do { \
  |  |  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  472|      0|        return igraph_errno; \
  |  |  |  |  473|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|        } \
  |  |   53|  36.7k|        *(res) = _safe_sum; \
  |  |   54|  36.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  273|  36.7k|    if (new_no_of_edges > IGRAPH_ECOUNT_MAX) {
  ------------------
  |  |  121|  36.7k|#define IGRAPH_ECOUNT_MAX (IGRAPH_INTEGER_MAX/2)
  |  |  ------------------
  |  |  |  |   77|  36.7k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  |  |  ------------------
  ------------------
  |  Branch (273:9): [True: 0, False: 36.7k]
  ------------------
  274|      0|        IGRAPH_ERRORF("Maximum edge count (%" IGRAPH_PRId ") exceeded.", IGRAPH_ERANGE,
  ------------------
  |  |  469|      0|    do { \
  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  472|      0|        return igraph_errno; \
  |  |  473|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  275|      0|                      IGRAPH_ECOUNT_MAX);
  276|      0|    }
  277|  36.7k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->from, no_of_edges + edges_to_add));
  ------------------
  |  |  648|  36.7k|    do { \
  |  |  649|  36.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  36.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  36.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 36.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  36.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  278|  36.7k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->to, no_of_edges + edges_to_add));
  ------------------
  |  |  648|  36.7k|    do { \
  |  |  649|  36.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  36.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  36.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 36.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  36.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  279|       |
  280|  1.24M|    while (i < edges_to_add * 2) {
  ------------------
  |  Branch (280:12): [True: 1.20M, False: 36.7k]
  ------------------
  281|  1.20M|        if (directed || VECTOR(*edges)[i] > VECTOR(*edges)[i + 1]) {
  ------------------
  |  |   65|  1.20M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (directed || VECTOR(*edges)[i] > VECTOR(*edges)[i + 1]) {
  ------------------
  |  |   65|  1.20M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (281:13): [True: 0, False: 1.20M]
  |  Branch (281:25): [True: 405k, False: 799k]
  ------------------
  282|   405k|            igraph_vector_int_push_back(&graph->from, VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   65|   405k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  283|   405k|            igraph_vector_int_push_back(&graph->to,   VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   65|   405k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  284|   799k|        } else {
  285|   799k|            igraph_vector_int_push_back(&graph->to,   VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   65|   799k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  286|   799k|            igraph_vector_int_push_back(&graph->from, VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   65|   799k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  287|   799k|        }
  288|  1.20M|    }
  289|       |
  290|       |    /* If an error occurs while the edges are being added, we make the necessary fixup
  291|       |     * to ensure that the graph is still in a consistent state when this function returns.
  292|       |     * The graph may already be on the finally stack when calling this function. We use
  293|       |     * a separate finally stack level to avoid its destructor from being called on error,
  294|       |     * so that the fixup can succeed.
  295|       |     */
  296|       |
  297|  36.7k|#define CHECK_ERR(expr) \
  298|  36.7k|    do { \
  299|  36.7k|        igraph_error_t err = (expr); \
  300|  36.7k|        if (err != IGRAPH_SUCCESS) { \
  301|  36.7k|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  302|  36.7k|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  303|  36.7k|            IGRAPH_FINALLY_EXIT(); \
  304|  36.7k|            IGRAPH_ERROR("Cannot add edges.", err); \
  305|  36.7k|        } \
  306|  36.7k|    } while (0)
  307|       |
  308|       |    /* oi & ii */
  309|  36.7k|    IGRAPH_FINALLY_ENTER();
  310|  36.7k|    {
  311|  36.7k|        CHECK_ERR(igraph_vector_int_init(&newoi, no_of_edges));
  ------------------
  |  |  298|  36.7k|    do { \
  |  |  299|  36.7k|        igraph_error_t err = (expr); \
  |  |  300|  36.7k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (300:13): [True: 0, False: 36.7k]
  |  |  ------------------
  |  |  301|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  302|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  303|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  304|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  305|      0|        } \
  |  |  306|  36.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (306:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  312|  36.7k|        IGRAPH_FINALLY(igraph_vector_int_destroy, &newoi);
  ------------------
  |  |  591|  36.7k|    do { \
  |  |  592|  36.7k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  36.7k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  36.7k|         * incorrect destructor function with the pointer */ \
  |  |  595|  36.7k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  36.7k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  36.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  313|  36.7k|        CHECK_ERR(igraph_vector_int_init(&newii, no_of_edges));
  ------------------
  |  |  298|  36.7k|    do { \
  |  |  299|  36.7k|        igraph_error_t err = (expr); \
  |  |  300|  36.7k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (300:13): [True: 0, False: 36.7k]
  |  |  ------------------
  |  |  301|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  302|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  303|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  304|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  305|      0|        } \
  |  |  306|  36.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (306:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  314|  36.7k|        IGRAPH_FINALLY(igraph_vector_int_destroy, &newii);
  ------------------
  |  |  591|  36.7k|    do { \
  |  |  592|  36.7k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  36.7k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  36.7k|         * incorrect destructor function with the pointer */ \
  |  |  595|  36.7k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  36.7k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  36.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  315|  36.7k|        CHECK_ERR(igraph_vector_int_pair_order(&graph->from, &graph->to, &newoi, graph->n));
  ------------------
  |  |  298|  36.7k|    do { \
  |  |  299|  36.7k|        igraph_error_t err = (expr); \
  |  |  300|  36.7k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (300:13): [True: 0, False: 36.7k]
  |  |  ------------------
  |  |  301|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  302|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  303|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  304|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  305|      0|        } \
  |  |  306|  36.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (306:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  316|  36.7k|        CHECK_ERR(igraph_vector_int_pair_order(&graph->to, &graph->from, &newii, graph->n));
  ------------------
  |  |  298|  36.7k|    do { \
  |  |  299|  36.7k|        igraph_error_t err = (expr); \
  |  |  300|  36.7k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (300:13): [True: 0, False: 36.7k]
  |  |  ------------------
  |  |  301|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  302|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  303|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  304|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  305|      0|        } \
  |  |  306|  36.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (306:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  317|       |
  318|       |        /* Attributes */
  319|  36.7k|        if (graph->attr) {
  ------------------
  |  Branch (319:13): [True: 0, False: 36.7k]
  ------------------
  320|       |            /* TODO: Does this keep the attribute table in a consistent state upon failure? */
  321|      0|            CHECK_ERR(igraph_i_attribute_add_edges(graph, edges, attr));
  ------------------
  |  |  298|      0|    do { \
  |  |  299|      0|        igraph_error_t err = (expr); \
  |  |  300|      0|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (300:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  301|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  302|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  303|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  304|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  305|      0|        } \
  |  |  306|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (306:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  322|      0|        }
  323|       |
  324|       |        /* os & is, its length does not change, error safe */
  325|  36.7k|        igraph_i_create_start_vectors(&graph->os, &graph->from, &newoi, graph->n);
  326|  36.7k|        igraph_i_create_start_vectors(&graph->is, &graph->to, &newii, graph->n);
  327|       |
  328|       |        /* everything went fine */
  329|  36.7k|        igraph_vector_int_destroy(&graph->oi);
  330|  36.7k|        igraph_vector_int_destroy(&graph->ii);
  331|  36.7k|        IGRAPH_FINALLY_CLEAN(2);
  332|       |
  333|  36.7k|        graph->oi = newoi;
  334|  36.7k|        graph->ii = newii;
  335|  36.7k|    }
  336|      0|    IGRAPH_FINALLY_EXIT();
  337|       |
  338|  36.7k|#undef CHECK_ERR
  339|       |
  340|       |    /* modification successful, clear the cached properties of the graph.
  341|       |     *
  342|       |     * Adding one or more edges cannot make a strongly or weakly connected
  343|       |     * graph disconnected, so we keep those flags if they are cached as true.
  344|       |     *
  345|       |     * Adding one or more edges may turn a DAG into a non-DAG or a forest into
  346|       |     * a non-forest, so we can keep those flags only if they are cached as
  347|       |     * false.
  348|       |     *
  349|       |     * Also, adding one or more edges does not change HAS_LOOP, HAS_MULTI and
  350|       |     * HAS_MUTUAL if they were already true.
  351|       |     */
  352|  36.7k|    igraph_i_property_cache_invalidate_conditionally(
  353|  36.7k|        graph,
  354|  36.7k|        /* keep_always = */ 0,
  355|       |        /* keep_when_false = */
  356|  36.7k|        (1 << IGRAPH_PROP_IS_DAG) | (1 << IGRAPH_PROP_IS_FOREST),
  357|       |        /* keep_when_true = */
  358|  36.7k|        (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED) |
  359|  36.7k|        (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  360|  36.7k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  361|  36.7k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  362|  36.7k|        (1 << IGRAPH_PROP_HAS_MUTUAL)
  363|  36.7k|    );
  364|       |
  365|  36.7k|    return IGRAPH_SUCCESS;
  366|  36.7k|}
igraph_add_vertices:
  390|  38.7k|) {
  391|  38.7k|    igraph_integer_t ec = igraph_ecount(graph);
  392|  38.7k|    igraph_integer_t vc = igraph_vcount(graph);
  393|  38.7k|    igraph_integer_t new_vc;
  394|  38.7k|    igraph_integer_t i;
  395|       |
  396|  38.7k|    if (nv < 0) {
  ------------------
  |  Branch (396:9): [True: 0, False: 38.7k]
  ------------------
  397|      0|        IGRAPH_ERROR("Cannot add negative number of vertices.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  398|      0|    }
  399|       |
  400|  38.7k|    IGRAPH_SAFE_ADD(graph->n, nv, &new_vc);
  ------------------
  |  |   47|  38.7k|    do { \
  |  |   48|  38.7k|        igraph_integer_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  38.7k|        igraph_integer_t _safe_sum; \
  |  |   50|  38.7k|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 38.7k]
  |  |  ------------------
  |  |   51|      0|            IGRAPH_ERRORF("Overflow when adding %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  469|      0|    do { \
  |  |  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  472|      0|        return igraph_errno; \
  |  |  |  |  473|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|        } \
  |  |   53|  38.7k|        *(res) = _safe_sum; \
  |  |   54|  38.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  401|  38.7k|    if (new_vc > IGRAPH_VCOUNT_MAX) {
  ------------------
  |  |  105|  38.7k|#define IGRAPH_VCOUNT_MAX (IGRAPH_INTEGER_MAX-1)
  |  |  ------------------
  |  |  |  |   77|  38.7k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  |  |  ------------------
  ------------------
  |  Branch (401:9): [True: 0, False: 38.7k]
  ------------------
  402|      0|        IGRAPH_ERRORF("Maximum vertex count (%" IGRAPH_PRId ") exceeded.", IGRAPH_ERANGE,
  ------------------
  |  |  469|      0|    do { \
  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  472|      0|        return igraph_errno; \
  |  |  473|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  403|      0|                      IGRAPH_VCOUNT_MAX);
  404|      0|    }
  405|  38.7k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->os, new_vc + 1));
  ------------------
  |  |  648|  38.7k|    do { \
  |  |  649|  38.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  38.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  38.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 38.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  38.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  406|  38.7k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->is, new_vc + 1));
  ------------------
  |  |  648|  38.7k|    do { \
  |  |  649|  38.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  38.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  38.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 38.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  38.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  407|       |
  408|  38.7k|    igraph_vector_int_resize(&graph->os, new_vc + 1); /* reserved */
  409|  38.7k|    igraph_vector_int_resize(&graph->is, new_vc + 1); /* reserved */
  410|  5.97M|    for (i = graph->n + 1; i < new_vc + 1; i++) {
  ------------------
  |  Branch (410:28): [True: 5.93M, False: 38.7k]
  ------------------
  411|  5.93M|        VECTOR(graph->os)[i] = ec;
  ------------------
  |  |   65|  5.93M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  412|  5.93M|        VECTOR(graph->is)[i] = ec;
  ------------------
  |  |   65|  5.93M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  413|  5.93M|    }
  414|       |
  415|  38.7k|    graph->n += nv;
  416|       |
  417|       |    /* Add attributes if necessary. This section is protected with
  418|       |     * FINALLY_ENTER/EXIT so that the graph would not be accidentally
  419|       |     * free upon error until it could be restored to a consistant state. */
  420|       |
  421|  38.7k|    if (graph->attr) {
  ------------------
  |  Branch (421:9): [True: 0, False: 38.7k]
  ------------------
  422|      0|        igraph_error_t err;
  423|      0|        IGRAPH_FINALLY_ENTER();
  424|      0|        err = igraph_i_attribute_add_vertices(graph, nv, attr);
  425|      0|        if (err != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (425:13): [True: 0, False: 0]
  ------------------
  426|       |            /* Restore original vertex count on failure */
  427|      0|            graph->n = vc;
  428|      0|            igraph_vector_int_resize(&graph->os, vc + 1); /* shrinks */
  429|      0|            igraph_vector_int_resize(&graph->is, vc + 1); /* shrinks */
  430|      0|        }
  431|      0|        IGRAPH_FINALLY_EXIT();
  432|      0|        if (err != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (432:13): [True: 0, False: 0]
  ------------------
  433|      0|            IGRAPH_ERROR("Cannot add vertices.", err);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  434|      0|        }
  435|      0|    }
  436|       |
  437|       |    /* modification successful, clear the cached properties of the graph.
  438|       |     *
  439|       |     * Adding one or more nodes does not change the following cached properties:
  440|       |     *
  441|       |     * - IGRAPH_PROP_HAS_LOOP
  442|       |     * - IGRAPH_PROP_HAS_MULTI
  443|       |     * - IGRAPH_PROP_HAS_MUTUAL
  444|       |     * - IGRAPH_PROP_IS_DAG (adding a node does not create/destroy cycles)
  445|       |     * - IGRAPH_PROP_IS_FOREST (same)
  446|       |     *
  447|       |     * Adding one or more nodes without any edges incident on them is sure to
  448|       |     * make the graph disconnected (weakly or strongly), so we can keep the
  449|       |     * connectivity-related properties if they are currently cached as false.
  450|       |     * (Actually, even if they weren't cached as false, we could still set them
  451|       |     * to false, but we don't have that functionality yet). The only exception
  452|       |     * is when the graph had zero vertices and gained only one vertex, because
  453|       |     * it then becomes connected. That's why we have the condition below in the
  454|       |     * keep_when_false section.
  455|       |     */
  456|  38.7k|    igraph_i_property_cache_invalidate_conditionally(
  457|  38.7k|        graph,
  458|       |        /* keep_always = */
  459|  38.7k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  460|  38.7k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  461|  38.7k|        (1 << IGRAPH_PROP_HAS_MUTUAL) |
  462|  38.7k|        (1 << IGRAPH_PROP_IS_DAG) |
  463|  38.7k|        (1 << IGRAPH_PROP_IS_FOREST),
  464|       |        /* keep_when_false = */
  465|  38.7k|        igraph_vcount(graph) >= 2 ? (
  ------------------
  |  Branch (465:9): [True: 38.1k, False: 595]
  ------------------
  466|  38.1k|            (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  467|  38.1k|            (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED)
  468|  38.1k|        ) : 0,
  469|       |        /* keep_when_true = */
  470|  38.7k|        0
  471|  38.7k|    );
  472|       |
  473|  38.7k|    return IGRAPH_SUCCESS;
  474|  38.7k|}
igraph_delete_edges:
  499|  6.61k|igraph_error_t igraph_delete_edges(igraph_t *graph, igraph_es_t edges) {
  500|  6.61k|    igraph_integer_t no_of_edges = igraph_ecount(graph);
  501|  6.61k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  502|  6.61k|    igraph_integer_t edges_to_remove = 0;
  503|  6.61k|    igraph_integer_t remaining_edges;
  504|  6.61k|    igraph_eit_t eit;
  505|       |
  506|  6.61k|    igraph_vector_int_t newfrom, newto;
  507|  6.61k|    igraph_vector_int_t newoi, newii;
  508|       |
  509|  6.61k|    igraph_bool_t *mark;
  510|  6.61k|    igraph_integer_t i, j;
  511|       |
  512|  6.61k|    mark = IGRAPH_CALLOC(no_of_edges, igraph_bool_t);
  ------------------
  |  |   38|  6.61k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  13.2k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 6.61k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 6.61k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 6.52k, False: 94]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  513|  6.61k|    IGRAPH_CHECK_OOM(mark, "Cannot delete edges.");
  ------------------
  |  |  701|  6.61k|    do { \
  |  |  702|  6.61k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  6.61k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.61k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  6.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  514|  6.61k|    IGRAPH_FINALLY(igraph_free, mark);
  ------------------
  |  |  591|  6.61k|    do { \
  |  |  592|  6.61k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  6.61k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  6.61k|         * incorrect destructor function with the pointer */ \
  |  |  595|  6.61k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  6.61k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  6.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  515|       |
  516|  6.61k|    IGRAPH_CHECK(igraph_eit_create(graph, edges, &eit));
  ------------------
  |  |  648|  6.61k|    do { \
  |  |  649|  6.61k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  6.61k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  6.61k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.61k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  6.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  517|  6.61k|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  591|  6.61k|    do { \
  |  |  592|  6.61k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  6.61k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  6.61k|         * incorrect destructor function with the pointer */ \
  |  |  595|  6.61k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  6.61k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  6.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  518|       |
  519|  84.7k|    for (IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  392|  6.61k|#define IGRAPH_EIT_RESET(eit) ((eit).pos = (eit).start)
  ------------------
                  for (IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  370|  84.7k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                  for (IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  358|  78.1k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (519:33): [True: 78.1k, False: 6.61k]
  ------------------
  520|  78.1k|        igraph_integer_t e = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  404|  78.1k|    (igraph_integer_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (404:25): [True: 46.6k, False: 31.4k]
  |  |  ------------------
  |  |  405|  78.1k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   65|  31.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  521|  78.1k|        if (! mark[e]) {
  ------------------
  |  Branch (521:13): [True: 78.1k, False: 0]
  ------------------
  522|  78.1k|            edges_to_remove++;
  523|  78.1k|            mark[e] = true;
  524|  78.1k|        }
  525|  78.1k|    }
  526|  6.61k|    remaining_edges = no_of_edges - edges_to_remove;
  527|       |
  528|       |    /* We don't need the iterator any more */
  529|  6.61k|    igraph_eit_destroy(&eit);
  530|  6.61k|    IGRAPH_FINALLY_CLEAN(1);
  531|       |
  532|  6.61k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newfrom, remaining_edges);
  ------------------
  |  |  124|  6.61k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  6.61k|    do { \
  |  |  |  |  649|  6.61k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  6.61k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  6.61k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.61k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  6.61k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  6.61k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  6.61k|    do { \
  |  |  |  |  592|  6.61k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  6.61k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  6.61k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  6.61k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  6.61k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  6.61k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  533|  6.61k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newto, remaining_edges);
  ------------------
  |  |  124|  6.61k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  6.61k|    do { \
  |  |  |  |  649|  6.61k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  6.61k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  6.61k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.61k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  6.61k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  6.61k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  6.61k|    do { \
  |  |  |  |  592|  6.61k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  6.61k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  6.61k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  6.61k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  6.61k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  6.61k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  534|       |
  535|       |    /* Actually remove the edges, move from pos i to pos j in newfrom/newto */
  536|   137k|    for (i = 0, j = 0; j < remaining_edges; i++) {
  ------------------
  |  Branch (536:24): [True: 131k, False: 6.61k]
  ------------------
  537|   131k|        if (! mark[i]) {
  ------------------
  |  Branch (537:13): [True: 106k, False: 24.8k]
  ------------------
  538|   106k|            VECTOR(newfrom)[j] = VECTOR(graph->from)[i];
  ------------------
  |  |   65|   106k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newfrom)[j] = VECTOR(graph->from)[i];
  ------------------
  |  |   65|   106k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  539|   106k|            VECTOR(newto)[j] = VECTOR(graph->to)[i];
  ------------------
  |  |   65|   106k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newto)[j] = VECTOR(graph->to)[i];
  ------------------
  |  |   65|   106k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  540|   106k|            j++;
  541|   106k|        }
  542|   131k|    }
  543|       |
  544|       |    /* Create index, this might require additional memory */
  545|  6.61k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newoi, remaining_edges);
  ------------------
  |  |  124|  6.61k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  6.61k|    do { \
  |  |  |  |  649|  6.61k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  6.61k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  6.61k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.61k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  6.61k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  6.61k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  6.61k|    do { \
  |  |  |  |  592|  6.61k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  6.61k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  6.61k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  6.61k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  6.61k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  6.61k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  546|  6.61k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newii, remaining_edges);
  ------------------
  |  |  124|  6.61k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  6.61k|    do { \
  |  |  |  |  649|  6.61k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  6.61k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  6.61k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.61k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  6.61k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  6.61k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  6.61k|    do { \
  |  |  |  |  592|  6.61k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  6.61k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  6.61k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  6.61k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  6.61k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  6.61k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  547|  6.61k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newfrom, &newto, &newoi, no_of_nodes));
  ------------------
  |  |  648|  6.61k|    do { \
  |  |  649|  6.61k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  6.61k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  6.61k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.61k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  6.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  548|  6.61k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newto, &newfrom, &newii, no_of_nodes));
  ------------------
  |  |  648|  6.61k|    do { \
  |  |  649|  6.61k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  6.61k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  6.61k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.61k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  6.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  549|       |
  550|       |    /* Edge attributes, we need an index that gives the IDs of the
  551|       |       original edges for every new edge.
  552|       |    */
  553|  6.61k|    if (graph->attr) {
  ------------------
  |  Branch (553:9): [True: 0, False: 6.61k]
  ------------------
  554|      0|        igraph_vector_int_t idx;
  555|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&idx, remaining_edges);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  556|      0|        for (i = 0, j = 0; i < no_of_edges; i++) {
  ------------------
  |  Branch (556:28): [True: 0, False: 0]
  ------------------
  557|      0|            if (! mark[i]) {
  ------------------
  |  Branch (557:17): [True: 0, False: 0]
  ------------------
  558|      0|                VECTOR(idx)[j++] = i;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  559|      0|            }
  560|      0|        }
  561|      0|        IGRAPH_CHECK(igraph_i_attribute_permute_edges(graph, graph, &idx));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  562|      0|        igraph_vector_int_destroy(&idx);
  563|      0|        IGRAPH_FINALLY_CLEAN(1);
  564|      0|    }
  565|       |
  566|       |    /* Ok, we've all memory needed, free the old structure  */
  567|  6.61k|    igraph_vector_int_destroy(&graph->from);
  568|  6.61k|    igraph_vector_int_destroy(&graph->to);
  569|  6.61k|    igraph_vector_int_destroy(&graph->oi);
  570|  6.61k|    igraph_vector_int_destroy(&graph->ii);
  571|  6.61k|    graph->from = newfrom;
  572|  6.61k|    graph->to = newto;
  573|  6.61k|    graph->oi = newoi;
  574|  6.61k|    graph->ii = newii;
  575|  6.61k|    IGRAPH_FINALLY_CLEAN(4);
  576|       |
  577|  6.61k|    IGRAPH_FREE(mark);
  ------------------
  |  |   41|  6.61k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  578|  6.61k|    IGRAPH_FINALLY_CLEAN(1);
  579|       |
  580|       |    /* Create start vectors, no memory is needed for this */
  581|  6.61k|    igraph_i_create_start_vectors(&graph->os, &graph->from, &graph->oi, no_of_nodes);
  582|  6.61k|    igraph_i_create_start_vectors(&graph->is, &graph->to,   &graph->ii, no_of_nodes);
  583|       |
  584|       |    /* modification successful, clear the cached properties of the graph.
  585|       |     *
  586|       |     * Deleting one or more edges cannot make a directed acyclic graph cyclic,
  587|       |     * or an undirected forest into a cyclic graph, so we keep those flags if
  588|       |     * they are cached as true.
  589|       |     *
  590|       |     * Similarly, deleting one or more edges cannot make a disconnected graph
  591|       |     * connected, so we keep the connectivity flags if they are cached as false.
  592|       |     *
  593|       |     * Also, if the graph had no loop edges before the deletion, it will have
  594|       |     * no loop edges after the deletion either. The same applies to reciprocal
  595|       |     * edges or multiple edges as well.
  596|       |     */
  597|  6.61k|    igraph_i_property_cache_invalidate_conditionally(
  598|  6.61k|        graph,
  599|  6.61k|        /* keep_always = */ 0,
  600|       |        /* keep_when_false = */
  601|  6.61k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  602|  6.61k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  603|  6.61k|        (1 << IGRAPH_PROP_HAS_MUTUAL) |
  604|  6.61k|        (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  605|  6.61k|        (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED),
  606|       |        /* keep_when_true = */
  607|  6.61k|        (1 << IGRAPH_PROP_IS_DAG) |
  608|  6.61k|        (1 << IGRAPH_PROP_IS_FOREST)
  609|  6.61k|    );
  610|       |
  611|       |    /* Nothing to deallocate... */
  612|  6.61k|    return IGRAPH_SUCCESS;
  613|  6.61k|}
igraph_delete_vertices_map:
  647|  2.27k|) {
  648|  2.27k|    igraph_integer_t no_of_edges = igraph_ecount(graph);
  649|  2.27k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  650|  2.27k|    igraph_vector_int_t edge_recoding, vertex_recoding;
  651|  2.27k|    igraph_vector_int_t *my_vertex_recoding = &vertex_recoding;
  652|  2.27k|    igraph_vit_t vit;
  653|  2.27k|    igraph_t newgraph;
  654|  2.27k|    igraph_integer_t i, j;
  655|  2.27k|    igraph_integer_t remaining_vertices, remaining_edges;
  656|       |
  657|  2.27k|    if (map) {
  ------------------
  |  Branch (657:9): [True: 243, False: 2.02k]
  ------------------
  658|    243|        my_vertex_recoding = map;
  659|    243|        IGRAPH_CHECK(igraph_vector_int_resize(map, no_of_nodes));
  ------------------
  |  |  648|    243|    do { \
  |  |  649|    243|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    243|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    243|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 243]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    243|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  660|    243|        igraph_vector_int_null(map);
  661|  2.02k|    } else {
  662|  2.02k|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vertex_recoding, no_of_nodes);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  663|  2.02k|    }
  664|       |
  665|  2.27k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edge_recoding, no_of_edges);
  ------------------
  |  |  124|  2.27k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.27k|    do { \
  |  |  |  |  649|  2.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.27k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.27k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.27k|    do { \
  |  |  |  |  592|  2.27k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.27k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.27k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.27k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.27k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.27k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  666|       |
  667|  2.27k|    IGRAPH_CHECK(igraph_vit_create(graph, vertices, &vit));
  ------------------
  |  |  648|  2.27k|    do { \
  |  |  649|  2.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  668|  2.27k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  591|  2.27k|    do { \
  |  |  592|  2.27k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.27k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.27k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.27k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.27k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  669|       |
  670|       |    /* mark the vertices to delete */
  671|  11.1k|    for (; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit) ) {
  ------------------
  |  |  180|  11.1k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit) ) {
  ------------------
  |  |  168|  8.88k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (671:12): [True: 8.88k, False: 2.27k]
  ------------------
  672|  8.88k|        igraph_integer_t vertex = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  215|  8.88k|    ((igraph_integer_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (215:25): [True: 2.02k, False: 6.85k]
  |  |  ------------------
  |  |  216|  8.88k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   65|  6.85k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  673|  8.88k|        if (vertex < 0 || vertex >= no_of_nodes) {
  ------------------
  |  Branch (673:13): [True: 0, False: 8.88k]
  |  Branch (673:27): [True: 0, False: 8.88k]
  ------------------
  674|      0|            IGRAPH_ERROR("Cannot delete vertices.", IGRAPH_EINVVID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  675|      0|        }
  676|  8.88k|        VECTOR(*my_vertex_recoding)[vertex] = 1;
  ------------------
  |  |   65|  8.88k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  677|  8.88k|    }
  678|       |    /* create vertex recoding vector */
  679|   379k|    for (remaining_vertices = 0, i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (679:41): [True: 377k, False: 2.27k]
  ------------------
  680|   377k|        if (VECTOR(*my_vertex_recoding)[i] == 0) {
  ------------------
  |  |   65|   377k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (680:13): [True: 368k, False: 8.88k]
  ------------------
  681|   368k|            VECTOR(*my_vertex_recoding)[i] = remaining_vertices;
  ------------------
  |  |   65|   368k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  682|   368k|            remaining_vertices++;
  683|   368k|        } else {
  684|  8.88k|            VECTOR(*my_vertex_recoding)[i] = -1;
  ------------------
  |  |   65|  8.88k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  685|  8.88k|        }
  686|   377k|    }
  687|       |    /* create edge recoding vector */
  688|  70.4k|    for (remaining_edges = 0, i = 0; i < no_of_edges; i++) {
  ------------------
  |  Branch (688:38): [True: 68.1k, False: 2.27k]
  ------------------
  689|  68.1k|        igraph_integer_t from = VECTOR(graph->from)[i];
  ------------------
  |  |   65|  68.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  690|  68.1k|        igraph_integer_t to = VECTOR(graph->to)[i];
  ------------------
  |  |   65|  68.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  691|  68.1k|        if (VECTOR(*my_vertex_recoding)[from] >= 0 &&
  ------------------
  |  |   65|  68.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (691:13): [True: 67.5k, False: 640]
  ------------------
  692|  68.1k|            VECTOR(*my_vertex_recoding)[to  ] >= 0) {
  ------------------
  |  |   65|  67.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (692:13): [True: 63.7k, False: 3.78k]
  ------------------
  693|  63.7k|            VECTOR(edge_recoding)[i] = remaining_edges + 1;
  ------------------
  |  |   65|  63.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  694|  63.7k|            remaining_edges++;
  695|  63.7k|        }
  696|  68.1k|    }
  697|       |
  698|       |    /* start creating the graph */
  699|  2.27k|    memset(&newgraph, 0, sizeof(igraph_t));
  700|  2.27k|    newgraph.n = remaining_vertices;
  701|  2.27k|    newgraph.directed = graph->directed;
  702|       |
  703|       |    /* allocate vectors */
  704|  2.27k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.from, remaining_edges);
  ------------------
  |  |  124|  2.27k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.27k|    do { \
  |  |  |  |  649|  2.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.27k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.27k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.27k|    do { \
  |  |  |  |  592|  2.27k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.27k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.27k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.27k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.27k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.27k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  705|  2.27k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.to, remaining_edges);
  ------------------
  |  |  124|  2.27k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.27k|    do { \
  |  |  |  |  649|  2.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.27k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.27k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.27k|    do { \
  |  |  |  |  592|  2.27k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.27k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.27k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.27k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.27k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.27k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  706|  2.27k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.oi, remaining_edges);
  ------------------
  |  |  124|  2.27k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.27k|    do { \
  |  |  |  |  649|  2.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.27k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.27k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.27k|    do { \
  |  |  |  |  592|  2.27k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.27k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.27k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.27k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.27k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.27k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  707|  2.27k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.ii, remaining_edges);
  ------------------
  |  |  124|  2.27k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.27k|    do { \
  |  |  |  |  649|  2.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.27k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.27k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.27k|    do { \
  |  |  |  |  592|  2.27k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.27k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.27k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.27k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.27k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.27k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  708|  2.27k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.os, remaining_vertices + 1);
  ------------------
  |  |  124|  2.27k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.27k|    do { \
  |  |  |  |  649|  2.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.27k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.27k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.27k|    do { \
  |  |  |  |  592|  2.27k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.27k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.27k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.27k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.27k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.27k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  709|  2.27k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.is, remaining_vertices + 1);
  ------------------
  |  |  124|  2.27k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.27k|    do { \
  |  |  |  |  649|  2.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.27k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.27k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.27k|    do { \
  |  |  |  |  592|  2.27k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.27k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.27k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.27k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.27k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.27k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  710|       |
  711|       |    /* Add the edges */
  712|  69.3k|    for (i = 0, j = 0; j < remaining_edges; i++) {
  ------------------
  |  Branch (712:24): [True: 67.0k, False: 2.27k]
  ------------------
  713|  67.0k|        if (VECTOR(edge_recoding)[i] > 0) {
  ------------------
  |  |   65|  67.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (713:13): [True: 63.7k, False: 3.32k]
  ------------------
  714|  63.7k|            igraph_integer_t from = VECTOR(graph->from)[i];
  ------------------
  |  |   65|  63.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  715|  63.7k|            igraph_integer_t to = VECTOR(graph->to  )[i];
  ------------------
  |  |   65|  63.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  716|  63.7k|            VECTOR(newgraph.from)[j] = VECTOR(*my_vertex_recoding)[from];
  ------------------
  |  |   65|  63.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newgraph.from)[j] = VECTOR(*my_vertex_recoding)[from];
  ------------------
  |  |   65|  63.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  717|  63.7k|            VECTOR(newgraph.to  )[j] = VECTOR(*my_vertex_recoding)[to];
  ------------------
  |  |   65|  63.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newgraph.to  )[j] = VECTOR(*my_vertex_recoding)[to];
  ------------------
  |  |   65|  63.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  718|  63.7k|            j++;
  719|  63.7k|        }
  720|  67.0k|    }
  721|       |
  722|       |    /* update oi & ii */
  723|  2.27k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newgraph.from, &newgraph.to, &newgraph.oi,
  ------------------
  |  |  648|  2.27k|    do { \
  |  |  649|  2.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  724|  2.27k|                                         remaining_vertices));
  725|  2.27k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newgraph.to, &newgraph.from, &newgraph.ii,
  ------------------
  |  |  648|  2.27k|    do { \
  |  |  649|  2.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  726|  2.27k|                                         remaining_vertices));
  727|       |
  728|  2.27k|    IGRAPH_CHECK(igraph_i_create_start_vectors(&newgraph.os, &newgraph.from,
  ------------------
  |  |  648|  2.27k|    do { \
  |  |  649|  2.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  729|  2.27k|                                       &newgraph.oi, remaining_vertices));
  730|  2.27k|    IGRAPH_CHECK(igraph_i_create_start_vectors(&newgraph.is, &newgraph.to,
  ------------------
  |  |  648|  2.27k|    do { \
  |  |  649|  2.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  731|  2.27k|                                       &newgraph.ii, remaining_vertices));
  732|       |
  733|  2.27k|    newgraph.cache = IGRAPH_CALLOC(1, igraph_i_property_cache_t);
  ------------------
  |  |   38|  2.27k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  4.54k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  |  Branch (36:24): [Folded - Ignored]
  |  |  |  |  |  Branch (36:66): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  734|  2.27k|    IGRAPH_CHECK_OOM(newgraph.cache, "Cannot delete vertices.");
  ------------------
  |  |  701|  2.27k|    do { \
  |  |  702|  2.27k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  735|  2.27k|    IGRAPH_FINALLY(igraph_free, newgraph.cache);
  ------------------
  |  |  591|  2.27k|    do { \
  |  |  592|  2.27k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.27k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.27k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.27k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.27k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  736|  2.27k|    IGRAPH_CHECK(igraph_i_property_cache_init(newgraph.cache));
  ------------------
  |  |  648|  2.27k|    do { \
  |  |  649|  2.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  737|  2.27k|    IGRAPH_FINALLY(igraph_i_property_cache_destroy, newgraph.cache);
  ------------------
  |  |  591|  2.27k|    do { \
  |  |  592|  2.27k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.27k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.27k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.27k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.27k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  738|       |
  739|       |    /* attributes */
  740|  2.27k|    IGRAPH_CHECK(igraph_i_attribute_copy(
  ------------------
  |  |  648|  2.27k|    do { \
  |  |  649|  2.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  741|  2.27k|        &newgraph, graph, /* graph= */ true, /* vertex= */ false, /* edge= */ false
  742|  2.27k|    ));
  743|       |
  744|       |    /* at this point igraph_destroy can take over the responsibility of
  745|       |     * deallocating the graph */
  746|  2.27k|    IGRAPH_FINALLY_CLEAN(8);    /* 2 for the property cache, 6 for the vectors */
  747|  2.27k|    IGRAPH_FINALLY(igraph_destroy, &newgraph);
  ------------------
  |  |  591|  2.27k|    do { \
  |  |  592|  2.27k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.27k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.27k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.27k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.27k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  748|       |
  749|  2.27k|    if (newgraph.attr) {
  ------------------
  |  Branch (749:9): [True: 0, False: 2.27k]
  ------------------
  750|      0|        igraph_vector_int_t iidx;
  751|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&iidx, remaining_vertices);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  752|      0|        for (i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (752:21): [True: 0, False: 0]
  ------------------
  753|      0|            igraph_integer_t jj = VECTOR(*my_vertex_recoding)[i];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  754|      0|            if (jj >= 0) {
  ------------------
  |  Branch (754:17): [True: 0, False: 0]
  ------------------
  755|      0|                VECTOR(iidx)[ jj ] = i;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  756|      0|            }
  757|      0|        }
  758|      0|        IGRAPH_CHECK(igraph_i_attribute_permute_vertices(graph, &newgraph, &iidx));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  759|      0|        IGRAPH_CHECK(igraph_vector_int_resize(&iidx, remaining_edges));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  760|      0|        for (i = 0; i < no_of_edges; i++) {
  ------------------
  |  Branch (760:21): [True: 0, False: 0]
  ------------------
  761|      0|            igraph_integer_t jj = VECTOR(edge_recoding)[i];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  762|      0|            if (jj != 0) {
  ------------------
  |  Branch (762:17): [True: 0, False: 0]
  ------------------
  763|      0|                VECTOR(iidx)[ jj - 1 ] = i;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  764|      0|            }
  765|      0|        }
  766|      0|        IGRAPH_CHECK(igraph_i_attribute_permute_edges(graph, &newgraph, &iidx));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  767|      0|        igraph_vector_int_destroy(&iidx);
  768|      0|        IGRAPH_FINALLY_CLEAN(1);
  769|      0|    }
  770|       |
  771|  2.27k|    igraph_vit_destroy(&vit);
  772|  2.27k|    igraph_vector_int_destroy(&edge_recoding);
  773|  2.27k|    igraph_destroy(graph);
  774|  2.27k|    *graph = newgraph;
  775|       |
  776|  2.27k|    IGRAPH_FINALLY_CLEAN(3);
  777|       |
  778|  2.27k|    if (invmap) {
  ------------------
  |  Branch (778:9): [True: 0, False: 2.27k]
  ------------------
  779|      0|        IGRAPH_CHECK(igraph_vector_int_resize(invmap, remaining_vertices));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  780|      0|        for (i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (780:21): [True: 0, False: 0]
  ------------------
  781|      0|            igraph_integer_t newid = VECTOR(*my_vertex_recoding)[i];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  782|      0|            if (newid >= 0) {
  ------------------
  |  Branch (782:17): [True: 0, False: 0]
  ------------------
  783|      0|                VECTOR(*invmap)[newid] = i;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  784|      0|            }
  785|      0|        }
  786|      0|    }
  787|       |
  788|  2.27k|    if (!map) {
  ------------------
  |  Branch (788:9): [True: 2.02k, False: 243]
  ------------------
  789|  2.02k|        igraph_vector_int_destroy(my_vertex_recoding);
  790|  2.02k|        IGRAPH_FINALLY_CLEAN(1);
  791|  2.02k|    }
  792|       |
  793|       |    /* modification successful, clear the cached properties of the graph.
  794|       |     *
  795|       |     * Deleting one or more vertices cannot make a directed acyclic graph cyclic,
  796|       |     * or an undirected forest into a cyclic graph, so we keep those flags if
  797|       |     * they are cached as true.
  798|       |     *
  799|       |     * Also, if the graph had no loop edges before the deletion, it will have
  800|       |     * no loop edges after the deletion either. The same applies to reciprocal
  801|       |     * edges or multiple edges as well.
  802|       |     */
  803|  2.27k|    igraph_i_property_cache_invalidate_conditionally(
  804|  2.27k|        graph,
  805|  2.27k|        /* keep_always = */ 0,
  806|       |        /* keep_when_false = */
  807|  2.27k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  808|  2.27k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  809|  2.27k|        (1 << IGRAPH_PROP_HAS_MUTUAL),
  810|       |        /* keep_when_true = */
  811|  2.27k|        (1 << IGRAPH_PROP_IS_DAG) |
  812|  2.27k|        (1 << IGRAPH_PROP_IS_FOREST)
  813|  2.27k|    );
  814|       |
  815|  2.27k|    return IGRAPH_SUCCESS;
  816|  2.27k|}
igraph_vcount:
  828|  7.24M|igraph_integer_t igraph_vcount(const igraph_t *graph) {
  829|  7.24M|    return graph->n;
  830|  7.24M|}
igraph_ecount:
  842|   153k|igraph_integer_t igraph_ecount(const igraph_t *graph) {
  843|   153k|    return igraph_vector_int_size(&graph->from);
  844|   153k|}
igraph_neighbors:
  880|  4.23M|        igraph_neimode_t mode) {
  881|  4.23M|    if (!igraph_is_directed(graph) || mode == IGRAPH_ALL) {
  ------------------
  |  Branch (881:9): [True: 4.23M, False: 0]
  |  Branch (881:39): [True: 0, False: 0]
  ------------------
  882|  4.23M|        return igraph_i_neighbors(graph, neis, pnode, mode, IGRAPH_LOOPS_TWICE, IGRAPH_MULTIPLE);
  883|  4.23M|    } else {
  884|      0|        return igraph_i_neighbors(graph, neis, pnode, mode, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE);
  885|      0|    }
  886|  4.23M|}
igraph_i_neighbors:
  889|  4.23M|        igraph_neimode_t mode, igraph_loops_t loops, igraph_multiple_t multiple) {
  890|  4.23M|#define DEDUPLICATE_IF_NEEDED(vertex, n)                                                 \
  891|  4.23M|    if (should_filter_duplicates) {                                                        \
  892|  4.23M|        if (                                                                               \
  893|  4.23M|            (loops == IGRAPH_NO_LOOPS && vertex == pnode) ||                               \
  894|  4.23M|            (loops == IGRAPH_LOOPS_ONCE && vertex == pnode && last_added == pnode)         \
  895|  4.23M|        ) {                                                                                \
  896|  4.23M|            length -= n;                                                                   \
  897|  4.23M|            if (loops == IGRAPH_LOOPS_ONCE) {                                              \
  898|  4.23M|                last_added = -1;                                                           \
  899|  4.23M|            }                                                                              \
  900|  4.23M|            continue;                                                                      \
  901|  4.23M|        } else if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {               \
  902|  4.23M|            length -= n;                                                                   \
  903|  4.23M|            continue;                                                                      \
  904|  4.23M|        } else {                                                                           \
  905|  4.23M|            last_added = vertex;                                                           \
  906|  4.23M|        }                                                                                  \
  907|  4.23M|    }
  908|       |
  909|  4.23M|    igraph_integer_t length = 0, idx = 0;
  910|  4.23M|    igraph_integer_t i, j;
  911|       |
  912|  4.23M|    igraph_integer_t node = pnode;
  913|  4.23M|    igraph_integer_t last_added = -1;
  914|  4.23M|    igraph_bool_t should_filter_duplicates;
  915|       |
  916|  4.23M|    if (node < 0 || node > igraph_vcount(graph) - 1) {
  ------------------
  |  Branch (916:9): [True: 0, False: 4.23M]
  |  Branch (916:21): [True: 0, False: 4.23M]
  ------------------
  917|      0|        IGRAPH_ERROR("Given vertex is not in the graph.", IGRAPH_EINVVID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  918|      0|    }
  919|  4.23M|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (919:9): [True: 4.23M, False: 2.02k]
  |  Branch (919:31): [True: 4.23M, False: 0]
  ------------------
  920|  4.23M|            mode != IGRAPH_ALL) {
  ------------------
  |  Branch (920:13): [True: 0, False: 4.23M]
  ------------------
  921|      0|        IGRAPH_ERROR("Mode should be either IGRAPH_OUT, IGRAPH_IN or IGRAPH_ALL.", IGRAPH_EINVMODE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  922|      0|    }
  923|       |
  924|  4.23M|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (924:9): [True: 4.23M, False: 0]
  ------------------
  925|  4.23M|        mode = IGRAPH_ALL;
  926|  4.23M|    }
  927|       |
  928|  4.23M|    if (mode != IGRAPH_ALL && loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (928:9): [True: 0, False: 4.23M]
  |  Branch (928:31): [True: 0, False: 0]
  ------------------
  929|      0|        IGRAPH_ERROR("For a directed graph (with directions not ignored), "
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  930|      0|                     "IGRAPH_LOOPS_TWICE does not make sense.", IGRAPH_EINVAL);
  931|      0|    }
  932|       |    /* Calculate needed space first & allocate it */
  933|       |    /* Note that 'mode' is treated as a bit field here; it's okay because
  934|       |     * IGRAPH_ALL = IGRAPH_IN | IGRAPH_OUT, bit-wise */
  935|  4.23M|    if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (935:9): [True: 4.23M, False: 0]
  ------------------
  936|  4.23M|        length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   65|  4.23M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   65|  4.23M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  937|  4.23M|    }
  938|  4.23M|    if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (938:9): [True: 4.23M, False: 0]
  ------------------
  939|  4.23M|        length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   65|  4.23M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   65|  4.23M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  940|  4.23M|    }
  941|       |
  942|  4.23M|    IGRAPH_CHECK(igraph_vector_int_resize(neis, length));
  ------------------
  |  |  648|  4.23M|    do { \
  |  |  649|  4.23M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  4.23M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  4.23M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.23M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  4.23M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  943|       |
  944|       |    /* The loops below produce an ordering what is consistent with the
  945|       |     * ordering returned by igraph_neighbors(), and this should be preserved.
  946|       |     * We are dealing with two sorted lists; one for the successors and one
  947|       |     * for the predecessors. If we have requested only one of them, we have
  948|       |     * an easy job. If we have requested both, we need to merge the two lists
  949|       |     * to ensure that the output is sorted by the vertex IDs of the "other"
  950|       |     * endpoint of the affected edges. We don't need to merge if the graph
  951|       |     * is undirected, because in that case the data structure guarantees that
  952|       |     * the "out-edges" contain only (u, v) pairs where u <= v and the
  953|       |     * "in-edges" contains the rest, so the result is sorted even without
  954|       |     * merging. */
  955|  4.23M|    if (!igraph_is_directed(graph) || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (955:9): [True: 4.23M, False: 0]
  |  Branch (955:39): [True: 0, False: 0]
  ------------------
  956|       |        /* graph is undirected or we did not ask for both directions in a
  957|       |         * directed graph; this is the easy case */
  958|       |
  959|  4.23M|        should_filter_duplicates = !(multiple == IGRAPH_MULTIPLE &&
  ------------------
  |  Branch (959:38): [True: 4.23M, False: 0]
  ------------------
  960|  4.23M|                ((!igraph_is_directed(graph) && loops == IGRAPH_LOOPS_TWICE) ||
  ------------------
  |  Branch (960:19): [True: 4.23M, False: 0]
  |  Branch (960:49): [True: 4.23M, False: 0]
  ------------------
  961|  4.23M|                 (igraph_is_directed(graph) && loops != IGRAPH_NO_LOOPS)));
  ------------------
  |  Branch (961:19): [True: 0, False: 0]
  |  Branch (961:48): [True: 0, False: 0]
  ------------------
  962|       |
  963|  4.23M|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (963:13): [True: 4.23M, False: 0]
  ------------------
  964|  4.23M|            j = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   65|  4.23M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  965|  5.34M|            for (i = VECTOR(graph->os)[node]; i < j; i++) {
  ------------------
  |  |   65|  4.23M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (965:47): [True: 1.10M, False: 4.23M]
  ------------------
  966|  1.10M|                igraph_integer_t to = VECTOR(graph->to)[ VECTOR(graph->oi)[i] ];
  ------------------
  |  |   65|  1.10M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_integer_t to = VECTOR(graph->to)[ VECTOR(graph->oi)[i] ];
  ------------------
  |  |   65|  1.10M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  967|  1.10M|                DEDUPLICATE_IF_NEEDED(to, 1);
  ------------------
  |  |  891|  1.10M|    if (should_filter_duplicates) {                                                        \
  |  |  ------------------
  |  |  |  Branch (891:9): [True: 0, False: 1.10M]
  |  |  ------------------
  |  |  892|      0|        if (                                                                               \
  |  |  893|      0|            (loops == IGRAPH_NO_LOOPS && vertex == pnode) ||                               \
  |  |  ------------------
  |  |  |  Branch (893:14): [True: 0, False: 0]
  |  |  |  Branch (893:42): [True: 0, False: 0]
  |  |  ------------------
  |  |  894|      0|            (loops == IGRAPH_LOOPS_ONCE && vertex == pnode && last_added == pnode)         \
  |  |  ------------------
  |  |  |  Branch (894:14): [True: 0, False: 0]
  |  |  |  Branch (894:44): [True: 0, False: 0]
  |  |  |  Branch (894:63): [True: 0, False: 0]
  |  |  ------------------
  |  |  895|      0|        ) {                                                                                \
  |  |  896|      0|            length -= n;                                                                   \
  |  |  897|      0|            if (loops == IGRAPH_LOOPS_ONCE) {                                              \
  |  |  ------------------
  |  |  |  Branch (897:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  898|      0|                last_added = -1;                                                           \
  |  |  899|      0|            }                                                                              \
  |  |  900|      0|            continue;                                                                      \
  |  |  901|      0|        } else if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {               \
  |  |  ------------------
  |  |  |  Branch (901:20): [True: 0, False: 0]
  |  |  |  Branch (901:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|            length -= n;                                                                   \
  |  |  903|      0|            continue;                                                                      \
  |  |  904|      0|        } else {                                                                           \
  |  |  905|      0|            last_added = vertex;                                                           \
  |  |  906|      0|        }                                                                                  \
  |  |  907|      0|    }
  ------------------
  968|  1.10M|                VECTOR(*neis)[idx++] = to;
  ------------------
  |  |   65|  1.10M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  969|  1.10M|            }
  970|  4.23M|        }
  971|       |
  972|  4.23M|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (972:13): [True: 4.23M, False: 0]
  ------------------
  973|  4.23M|            j = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   65|  4.23M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  974|  5.31M|            for (i = VECTOR(graph->is)[node]; i < j; i++) {
  ------------------
  |  |   65|  4.23M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (974:47): [True: 1.07M, False: 4.23M]
  ------------------
  975|  1.07M|                igraph_integer_t from = VECTOR(graph->from)[ VECTOR(graph->ii)[i] ];
  ------------------
  |  |   65|  1.07M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_integer_t from = VECTOR(graph->from)[ VECTOR(graph->ii)[i] ];
  ------------------
  |  |   65|  1.07M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  976|  1.07M|                DEDUPLICATE_IF_NEEDED(from, 1);
  ------------------
  |  |  891|  1.07M|    if (should_filter_duplicates) {                                                        \
  |  |  ------------------
  |  |  |  Branch (891:9): [True: 0, False: 1.07M]
  |  |  ------------------
  |  |  892|      0|        if (                                                                               \
  |  |  893|      0|            (loops == IGRAPH_NO_LOOPS && vertex == pnode) ||                               \
  |  |  ------------------
  |  |  |  Branch (893:14): [True: 0, False: 0]
  |  |  |  Branch (893:42): [True: 0, False: 0]
  |  |  ------------------
  |  |  894|      0|            (loops == IGRAPH_LOOPS_ONCE && vertex == pnode && last_added == pnode)         \
  |  |  ------------------
  |  |  |  Branch (894:14): [True: 0, False: 0]
  |  |  |  Branch (894:44): [True: 0, False: 0]
  |  |  |  Branch (894:63): [True: 0, False: 0]
  |  |  ------------------
  |  |  895|      0|        ) {                                                                                \
  |  |  896|      0|            length -= n;                                                                   \
  |  |  897|      0|            if (loops == IGRAPH_LOOPS_ONCE) {                                              \
  |  |  ------------------
  |  |  |  Branch (897:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  898|      0|                last_added = -1;                                                           \
  |  |  899|      0|            }                                                                              \
  |  |  900|      0|            continue;                                                                      \
  |  |  901|      0|        } else if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {               \
  |  |  ------------------
  |  |  |  Branch (901:20): [True: 0, False: 0]
  |  |  |  Branch (901:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|            length -= n;                                                                   \
  |  |  903|      0|            continue;                                                                      \
  |  |  904|      0|        } else {                                                                           \
  |  |  905|      0|            last_added = vertex;                                                           \
  |  |  906|      0|        }                                                                                  \
  |  |  907|      0|    }
  ------------------
  977|  1.07M|                VECTOR(*neis)[idx++] = from;
  ------------------
  |  |   65|  1.07M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  978|  1.07M|            }
  979|  4.23M|        }
  980|  4.23M|    } else {
  981|       |        /* Both in- and out- neighbors in a directed graph,
  982|       |           we need to merge the two 'vectors' so the result is
  983|       |           correctly ordered. */
  984|      0|        igraph_integer_t j1 = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  985|      0|        igraph_integer_t j2 = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  986|      0|        igraph_integer_t i1 = VECTOR(graph->os)[node];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  987|      0|        igraph_integer_t i2 = VECTOR(graph->is)[node];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  988|      0|        igraph_integer_t eid1, eid2;
  989|      0|        igraph_integer_t n1, n2;
  990|       |
  991|      0|        should_filter_duplicates = !(multiple == IGRAPH_MULTIPLE &&
  ------------------
  |  Branch (991:38): [True: 0, False: 0]
  ------------------
  992|      0|                loops == IGRAPH_LOOPS_TWICE);
  ------------------
  |  Branch (992:17): [True: 0, False: 0]
  ------------------
  993|       |
  994|      0|        while (i1 < j1 && i2 < j2) {
  ------------------
  |  Branch (994:16): [True: 0, False: 0]
  |  Branch (994:27): [True: 0, False: 0]
  ------------------
  995|      0|            eid1 = VECTOR(graph->oi)[i1];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  996|      0|            eid2 = VECTOR(graph->ii)[i2];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  997|      0|            n1 = VECTOR(graph->to)[eid1];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  998|      0|            n2 = VECTOR(graph->from)[eid2];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  999|      0|            if (n1 < n2) {
  ------------------
  |  Branch (999:17): [True: 0, False: 0]
  ------------------
 1000|      0|                i1++;
 1001|      0|                DEDUPLICATE_IF_NEEDED(n1, 1);
  ------------------
  |  |  891|      0|    if (should_filter_duplicates) {                                                        \
  |  |  ------------------
  |  |  |  Branch (891:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  892|      0|        if (                                                                               \
  |  |  893|      0|            (loops == IGRAPH_NO_LOOPS && vertex == pnode) ||                               \
  |  |  ------------------
  |  |  |  Branch (893:14): [True: 0, False: 0]
  |  |  |  Branch (893:42): [True: 0, False: 0]
  |  |  ------------------
  |  |  894|      0|            (loops == IGRAPH_LOOPS_ONCE && vertex == pnode && last_added == pnode)         \
  |  |  ------------------
  |  |  |  Branch (894:14): [True: 0, False: 0]
  |  |  |  Branch (894:44): [True: 0, False: 0]
  |  |  |  Branch (894:63): [True: 0, False: 0]
  |  |  ------------------
  |  |  895|      0|        ) {                                                                                \
  |  |  896|      0|            length -= n;                                                                   \
  |  |  897|      0|            if (loops == IGRAPH_LOOPS_ONCE) {                                              \
  |  |  ------------------
  |  |  |  Branch (897:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  898|      0|                last_added = -1;                                                           \
  |  |  899|      0|            }                                                                              \
  |  |  900|      0|            continue;                                                                      \
  |  |  901|      0|        } else if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {               \
  |  |  ------------------
  |  |  |  Branch (901:20): [True: 0, False: 0]
  |  |  |  Branch (901:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|            length -= n;                                                                   \
  |  |  903|      0|            continue;                                                                      \
  |  |  904|      0|        } else {                                                                           \
  |  |  905|      0|            last_added = vertex;                                                           \
  |  |  906|      0|        }                                                                                  \
  |  |  907|      0|    }
  ------------------
 1002|      0|                VECTOR(*neis)[idx++] = n1;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1003|      0|            } else if (n1 > n2) {
  ------------------
  |  Branch (1003:24): [True: 0, False: 0]
  ------------------
 1004|      0|                i2++;
 1005|      0|                DEDUPLICATE_IF_NEEDED(n2, 1);
  ------------------
  |  |  891|      0|    if (should_filter_duplicates) {                                                        \
  |  |  ------------------
  |  |  |  Branch (891:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  892|      0|        if (                                                                               \
  |  |  893|      0|            (loops == IGRAPH_NO_LOOPS && vertex == pnode) ||                               \
  |  |  ------------------
  |  |  |  Branch (893:14): [True: 0, False: 0]
  |  |  |  Branch (893:42): [True: 0, False: 0]
  |  |  ------------------
  |  |  894|      0|            (loops == IGRAPH_LOOPS_ONCE && vertex == pnode && last_added == pnode)         \
  |  |  ------------------
  |  |  |  Branch (894:14): [True: 0, False: 0]
  |  |  |  Branch (894:44): [True: 0, False: 0]
  |  |  |  Branch (894:63): [True: 0, False: 0]
  |  |  ------------------
  |  |  895|      0|        ) {                                                                                \
  |  |  896|      0|            length -= n;                                                                   \
  |  |  897|      0|            if (loops == IGRAPH_LOOPS_ONCE) {                                              \
  |  |  ------------------
  |  |  |  Branch (897:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  898|      0|                last_added = -1;                                                           \
  |  |  899|      0|            }                                                                              \
  |  |  900|      0|            continue;                                                                      \
  |  |  901|      0|        } else if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {               \
  |  |  ------------------
  |  |  |  Branch (901:20): [True: 0, False: 0]
  |  |  |  Branch (901:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|            length -= n;                                                                   \
  |  |  903|      0|            continue;                                                                      \
  |  |  904|      0|        } else {                                                                           \
  |  |  905|      0|            last_added = vertex;                                                           \
  |  |  906|      0|        }                                                                                  \
  |  |  907|      0|    }
  ------------------
 1006|      0|                VECTOR(*neis)[idx++] = n2;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1007|      0|            } else {
 1008|      0|                i1++;
 1009|      0|                i2++;
 1010|      0|                DEDUPLICATE_IF_NEEDED(n1, 2);
  ------------------
  |  |  891|      0|    if (should_filter_duplicates) {                                                        \
  |  |  ------------------
  |  |  |  Branch (891:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  892|      0|        if (                                                                               \
  |  |  893|      0|            (loops == IGRAPH_NO_LOOPS && vertex == pnode) ||                               \
  |  |  ------------------
  |  |  |  Branch (893:14): [True: 0, False: 0]
  |  |  |  Branch (893:42): [True: 0, False: 0]
  |  |  ------------------
  |  |  894|      0|            (loops == IGRAPH_LOOPS_ONCE && vertex == pnode && last_added == pnode)         \
  |  |  ------------------
  |  |  |  Branch (894:14): [True: 0, False: 0]
  |  |  |  Branch (894:44): [True: 0, False: 0]
  |  |  |  Branch (894:63): [True: 0, False: 0]
  |  |  ------------------
  |  |  895|      0|        ) {                                                                                \
  |  |  896|      0|            length -= n;                                                                   \
  |  |  897|      0|            if (loops == IGRAPH_LOOPS_ONCE) {                                              \
  |  |  ------------------
  |  |  |  Branch (897:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  898|      0|                last_added = -1;                                                           \
  |  |  899|      0|            }                                                                              \
  |  |  900|      0|            continue;                                                                      \
  |  |  901|      0|        } else if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {               \
  |  |  ------------------
  |  |  |  Branch (901:20): [True: 0, False: 0]
  |  |  |  Branch (901:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|            length -= n;                                                                   \
  |  |  903|      0|            continue;                                                                      \
  |  |  904|      0|        } else {                                                                           \
  |  |  905|      0|            last_added = vertex;                                                           \
  |  |  906|      0|        }                                                                                  \
  |  |  907|      0|    }
  ------------------
 1011|      0|                VECTOR(*neis)[idx++] = n1;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1012|      0|                if (should_filter_duplicates && ((loops == IGRAPH_LOOPS_ONCE && n1 == pnode && last_added == pnode) ||
  ------------------
  |  Branch (1012:21): [True: 0, False: 0]
  |  Branch (1012:51): [True: 0, False: 0]
  |  Branch (1012:81): [True: 0, False: 0]
  |  Branch (1012:96): [True: 0, False: 0]
  ------------------
 1013|      0|                        (multiple == IGRAPH_NO_MULTIPLE))) {
  ------------------
  |  Branch (1013:25): [True: 0, False: 0]
  ------------------
 1014|      0|                    length--;
 1015|      0|                    if (loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (1015:25): [True: 0, False: 0]
  ------------------
 1016|      0|                        last_added = -1;
 1017|      0|                    }
 1018|      0|                    continue;
 1019|      0|                }
 1020|      0|                VECTOR(*neis)[idx++] = n2;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1021|      0|            }
 1022|      0|        }
 1023|       |
 1024|      0|        while (i1 < j1) {
  ------------------
  |  Branch (1024:16): [True: 0, False: 0]
  ------------------
 1025|      0|            eid1 = VECTOR(graph->oi)[i1++];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1026|      0|            igraph_integer_t to = VECTOR(graph->to)[eid1];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1027|      0|            DEDUPLICATE_IF_NEEDED(to, 1);
  ------------------
  |  |  891|      0|    if (should_filter_duplicates) {                                                        \
  |  |  ------------------
  |  |  |  Branch (891:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  892|      0|        if (                                                                               \
  |  |  893|      0|            (loops == IGRAPH_NO_LOOPS && vertex == pnode) ||                               \
  |  |  ------------------
  |  |  |  Branch (893:14): [True: 0, False: 0]
  |  |  |  Branch (893:42): [True: 0, False: 0]
  |  |  ------------------
  |  |  894|      0|            (loops == IGRAPH_LOOPS_ONCE && vertex == pnode && last_added == pnode)         \
  |  |  ------------------
  |  |  |  Branch (894:14): [True: 0, False: 0]
  |  |  |  Branch (894:44): [True: 0, False: 0]
  |  |  |  Branch (894:63): [True: 0, False: 0]
  |  |  ------------------
  |  |  895|      0|        ) {                                                                                \
  |  |  896|      0|            length -= n;                                                                   \
  |  |  897|      0|            if (loops == IGRAPH_LOOPS_ONCE) {                                              \
  |  |  ------------------
  |  |  |  Branch (897:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  898|      0|                last_added = -1;                                                           \
  |  |  899|      0|            }                                                                              \
  |  |  900|      0|            continue;                                                                      \
  |  |  901|      0|        } else if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {               \
  |  |  ------------------
  |  |  |  Branch (901:20): [True: 0, False: 0]
  |  |  |  Branch (901:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|            length -= n;                                                                   \
  |  |  903|      0|            continue;                                                                      \
  |  |  904|      0|        } else {                                                                           \
  |  |  905|      0|            last_added = vertex;                                                           \
  |  |  906|      0|        }                                                                                  \
  |  |  907|      0|    }
  ------------------
 1028|      0|            VECTOR(*neis)[idx++] = to;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1029|      0|        }
 1030|       |
 1031|      0|        while (i2 < j2) {
  ------------------
  |  Branch (1031:16): [True: 0, False: 0]
  ------------------
 1032|      0|            eid2 = VECTOR(graph->ii)[i2++];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1033|      0|            igraph_integer_t from = VECTOR(graph->from)[eid2];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1034|      0|            DEDUPLICATE_IF_NEEDED(from, 1);
  ------------------
  |  |  891|      0|    if (should_filter_duplicates) {                                                        \
  |  |  ------------------
  |  |  |  Branch (891:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  892|      0|        if (                                                                               \
  |  |  893|      0|            (loops == IGRAPH_NO_LOOPS && vertex == pnode) ||                               \
  |  |  ------------------
  |  |  |  Branch (893:14): [True: 0, False: 0]
  |  |  |  Branch (893:42): [True: 0, False: 0]
  |  |  ------------------
  |  |  894|      0|            (loops == IGRAPH_LOOPS_ONCE && vertex == pnode && last_added == pnode)         \
  |  |  ------------------
  |  |  |  Branch (894:14): [True: 0, False: 0]
  |  |  |  Branch (894:44): [True: 0, False: 0]
  |  |  |  Branch (894:63): [True: 0, False: 0]
  |  |  ------------------
  |  |  895|      0|        ) {                                                                                \
  |  |  896|      0|            length -= n;                                                                   \
  |  |  897|      0|            if (loops == IGRAPH_LOOPS_ONCE) {                                              \
  |  |  ------------------
  |  |  |  Branch (897:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  898|      0|                last_added = -1;                                                           \
  |  |  899|      0|            }                                                                              \
  |  |  900|      0|            continue;                                                                      \
  |  |  901|      0|        } else if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {               \
  |  |  ------------------
  |  |  |  Branch (901:20): [True: 0, False: 0]
  |  |  |  Branch (901:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|            length -= n;                                                                   \
  |  |  903|      0|            continue;                                                                      \
  |  |  904|      0|        } else {                                                                           \
  |  |  905|      0|            last_added = vertex;                                                           \
  |  |  906|      0|        }                                                                                  \
  |  |  907|      0|    }
  ------------------
 1035|      0|            VECTOR(*neis)[idx++] = from;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1036|      0|        }
 1037|       |
 1038|      0|    }
 1039|  4.23M|    IGRAPH_CHECK(igraph_vector_int_resize(neis, length));
  ------------------
  |  |  648|  4.23M|    do { \
  |  |  649|  4.23M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  4.23M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  4.23M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.23M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  4.23M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1040|       |
 1041|  4.23M|    return IGRAPH_SUCCESS;
 1042|  4.23M|#undef DEDUPLICATE_IF_NEEDED
 1043|  4.23M|}
igraph_is_directed:
 1108|  22.4M|igraph_bool_t igraph_is_directed(const igraph_t *graph) {
 1109|  22.4M|    return graph->directed;
 1110|  22.4M|}
igraph_degree_1:
 1138|  6.08k|                               igraph_integer_t vid, igraph_neimode_t mode, igraph_bool_t loops) {
 1139|       |
 1140|  6.08k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1140:9): [True: 6.08k, False: 0]
  ------------------
 1141|  6.08k|        mode = IGRAPH_ALL;
 1142|  6.08k|    }
 1143|       |
 1144|  6.08k|    *deg = 0;
 1145|  6.08k|    if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1145:9): [True: 6.08k, False: 0]
  ------------------
 1146|  6.08k|        *deg += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   65|  6.08k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      *deg += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   65|  6.08k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1147|  6.08k|    }
 1148|  6.08k|    if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1148:9): [True: 6.08k, False: 0]
  ------------------
 1149|  6.08k|        *deg += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   65|  6.08k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      *deg += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   65|  6.08k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1150|  6.08k|    }
 1151|  6.08k|    if (! loops) {
  ------------------
  |  Branch (1151:9): [True: 4.05k, False: 2.02k]
  ------------------
 1152|       |        /* When loops should not be counted, we remove their contribution from the
 1153|       |         * previously computed degree. */
 1154|  4.05k|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1154:13): [True: 4.05k, False: 0]
  ------------------
 1155|  13.3k|            for (igraph_integer_t i = VECTOR(graph->os)[vid]; i < VECTOR(graph->os)[vid + 1]; i++) {
  ------------------
  |  |   65|  4.05k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          for (igraph_integer_t i = VECTOR(graph->os)[vid]; i < VECTOR(graph->os)[vid + 1]; i++) {
  ------------------
  |  |   65|  13.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1155:63): [True: 9.24k, False: 4.05k]
  ------------------
 1156|  9.24k|                if (VECTOR(graph->to)[ VECTOR(graph->oi)[i] ] == vid) {
  ------------------
  |  |   65|  9.24k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (VECTOR(graph->to)[ VECTOR(graph->oi)[i] ] == vid) {
  ------------------
  |  |   65|  9.24k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1156:21): [True: 9.24k, False: 0]
  ------------------
 1157|  9.24k|                    *deg -= 1;
 1158|  9.24k|                }
 1159|  9.24k|            }
 1160|  4.05k|        }
 1161|  4.05k|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1161:13): [True: 4.05k, False: 0]
  ------------------
 1162|  23.7k|            for (igraph_integer_t i = VECTOR(graph->is)[vid]; i < VECTOR(graph->is)[vid + 1]; i++) {
  ------------------
  |  |   65|  4.05k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          for (igraph_integer_t i = VECTOR(graph->is)[vid]; i < VECTOR(graph->is)[vid + 1]; i++) {
  ------------------
  |  |   65|  23.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1162:63): [True: 19.6k, False: 4.05k]
  ------------------
 1163|  19.6k|                if (VECTOR(graph->from)[ VECTOR(graph->ii)[i] ] == vid) {
  ------------------
  |  |   65|  19.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (VECTOR(graph->from)[ VECTOR(graph->ii)[i] ] == vid) {
  ------------------
  |  |   65|  19.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1163:21): [True: 9.24k, False: 10.4k]
  ------------------
 1164|  9.24k|                    *deg -= 1;
 1165|  9.24k|                }
 1166|  19.6k|            }
 1167|  4.05k|        }
 1168|  4.05k|    }
 1169|       |
 1170|  6.08k|    return IGRAPH_SUCCESS;
 1171|  6.08k|}
igraph_degree:
 1218|  30.3k|                  igraph_neimode_t mode, igraph_bool_t loops) {
 1219|       |
 1220|  30.3k|    igraph_integer_t nodes_to_calc;
 1221|  30.3k|    igraph_integer_t i, j;
 1222|  30.3k|    igraph_vit_t vit;
 1223|       |
 1224|  30.3k|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  648|  30.3k|    do { \
  |  |  649|  30.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  30.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  30.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 30.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  30.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1225|  30.3k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  591|  30.3k|    do { \
  |  |  592|  30.3k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  30.3k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  30.3k|         * incorrect destructor function with the pointer */ \
  |  |  595|  30.3k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  30.3k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  30.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1226|       |
 1227|  30.3k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1227:9): [True: 30.3k, False: 0]
  |  Branch (1227:31): [True: 30.3k, False: 0]
  |  Branch (1227:52): [True: 0, False: 30.3k]
  ------------------
 1228|      0|        IGRAPH_ERROR("Invalid mode for degree calculation.", IGRAPH_EINVMODE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1229|      0|    }
 1230|       |
 1231|  30.3k|    if (! loops) {
  ------------------
  |  Branch (1231:9): [True: 4.66k, False: 25.7k]
  ------------------
 1232|       |        /* If the graph is known not to have loops, we can use the faster
 1233|       |         * loops == true code path, which has O(1) complexity instead of of O(d). */
 1234|  4.66k|        if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (1234:13): [True: 4.59k, False: 74]
  ------------------
 1235|  4.66k|            !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (1235:13): [True: 2.73k, False: 1.86k]
  ------------------
 1236|  2.73k|            loops = true;
 1237|  2.73k|        }
 1238|  4.66k|    }
 1239|       |
 1240|  30.3k|    nodes_to_calc = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  191|  30.3k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
 1241|  30.3k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1241:9): [True: 30.3k, False: 0]
  ------------------
 1242|  30.3k|        mode = IGRAPH_ALL;
 1243|  30.3k|    }
 1244|       |
 1245|  30.3k|    IGRAPH_CHECK(igraph_vector_int_resize(res, nodes_to_calc));
  ------------------
  |  |  648|  30.3k|    do { \
  |  |  649|  30.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  30.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  30.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 30.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  30.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1246|  30.3k|    igraph_vector_int_null(res);
 1247|       |
 1248|  30.3k|    if (loops) {
  ------------------
  |  Branch (1248:9): [True: 28.4k, False: 1.93k]
  ------------------
 1249|  28.4k|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1249:13): [True: 28.4k, False: 0]
  ------------------
 1250|  28.4k|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  202|  28.4k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1251|  4.81M|                 !IGRAPH_VIT_END(vit);
  ------------------
  |  |  180|  4.81M|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1251:18): [True: 4.78M, False: 28.4k]
  ------------------
 1252|  4.78M|                 IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  168|  4.78M|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1253|  4.78M|                igraph_integer_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  215|  4.78M|    ((igraph_integer_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (215:25): [True: 4.78M, False: 0]
  |  |  ------------------
  |  |  216|  4.78M|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1254|  4.78M|                VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   65|  4.78M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   65|  4.78M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   65|  4.78M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1255|  4.78M|            }
 1256|  28.4k|        }
 1257|  28.4k|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1257:13): [True: 28.4k, False: 0]
  ------------------
 1258|  28.4k|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  202|  28.4k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1259|  4.81M|                 !IGRAPH_VIT_END(vit);
  ------------------
  |  |  180|  4.81M|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1259:18): [True: 4.78M, False: 28.4k]
  ------------------
 1260|  4.78M|                 IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  168|  4.78M|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1261|  4.78M|                igraph_integer_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  215|  4.78M|    ((igraph_integer_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (215:25): [True: 4.78M, False: 0]
  |  |  ------------------
  |  |  216|  4.78M|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1262|  4.78M|                VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   65|  4.78M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   65|  4.78M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   65|  4.78M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1263|  4.78M|            }
 1264|  28.4k|        }
 1265|  28.4k|    } else if (igraph_vs_is_all(&vids)) { /* no loops, calculating degree for all vertices */
  ------------------
  |  Branch (1265:16): [True: 1.93k, False: 0]
  ------------------
 1266|       |        // When calculating degree for all vertices, iterating over edges is faster
 1267|  1.93k|        igraph_integer_t no_of_edges = igraph_ecount(graph);
 1268|       |
 1269|  1.93k|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1269:13): [True: 1.93k, False: 0]
  ------------------
 1270|  80.2k|            for (igraph_integer_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (1270:45): [True: 78.2k, False: 1.93k]
  ------------------
 1271|  78.2k|                igraph_integer_t from = IGRAPH_FROM(graph, edge);
  ------------------
  |  |  113|  78.2k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  78.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1272|  78.2k|                if (from != IGRAPH_TO(graph, edge)) {
  ------------------
  |  |  126|  78.2k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  78.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1272:21): [True: 35.3k, False: 42.9k]
  ------------------
 1273|  35.3k|                    VECTOR(*res)[from]++;
  ------------------
  |  |   65|  35.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1274|  35.3k|                }
 1275|  78.2k|            }
 1276|  1.93k|        }
 1277|  1.93k|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1277:13): [True: 1.93k, False: 0]
  ------------------
 1278|  80.2k|            for (igraph_integer_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (1278:45): [True: 78.2k, False: 1.93k]
  ------------------
 1279|  78.2k|                igraph_integer_t to = IGRAPH_TO(graph, edge);
  ------------------
  |  |  126|  78.2k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  78.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1280|  78.2k|                if (IGRAPH_FROM(graph, edge) != to) {
  ------------------
  |  |  113|  78.2k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  78.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1280:21): [True: 35.3k, False: 42.9k]
  ------------------
 1281|  35.3k|                    VECTOR(*res)[to]++;
  ------------------
  |  |   65|  35.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1282|  35.3k|                }
 1283|  78.2k|            }
 1284|  1.93k|        }
 1285|  1.93k|    } else { /* no loops */
 1286|      0|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1286:13): [True: 0, False: 0]
  ------------------
 1287|      0|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  202|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1288|      0|                 !IGRAPH_VIT_END(vit);
  ------------------
  |  |  180|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1288:18): [True: 0, False: 0]
  ------------------
 1289|      0|                 IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  168|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1290|      0|                igraph_integer_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  215|      0|    ((igraph_integer_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (215:25): [True: 0, False: 0]
  |  |  ------------------
  |  |  216|      0|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1291|      0|                VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1292|      0|                for (j = VECTOR(graph->os)[vid];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1293|      0|                     j < VECTOR(graph->os)[vid + 1]; j++) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1293:22): [True: 0, False: 0]
  ------------------
 1294|      0|                    if (VECTOR(graph->to)[ VECTOR(graph->oi)[j] ] == vid) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  if (VECTOR(graph->to)[ VECTOR(graph->oi)[j] ] == vid) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1294:25): [True: 0, False: 0]
  ------------------
 1295|      0|                        VECTOR(*res)[i] -= 1;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1296|      0|                    }
 1297|      0|                }
 1298|      0|            }
 1299|      0|        }
 1300|      0|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1300:13): [True: 0, False: 0]
  ------------------
 1301|      0|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  202|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1302|      0|                 !IGRAPH_VIT_END(vit);
  ------------------
  |  |  180|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1302:18): [True: 0, False: 0]
  ------------------
 1303|      0|                 IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  168|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1304|      0|                igraph_integer_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  215|      0|    ((igraph_integer_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (215:25): [True: 0, False: 0]
  |  |  ------------------
  |  |  216|      0|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1305|      0|                VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1306|      0|                for (j = VECTOR(graph->is)[vid];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1307|      0|                     j < VECTOR(graph->is)[vid + 1]; j++) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1307:22): [True: 0, False: 0]
  ------------------
 1308|      0|                    if (VECTOR(graph->from)[ VECTOR(graph->ii)[j] ] == vid) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  if (VECTOR(graph->from)[ VECTOR(graph->ii)[j] ] == vid) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1308:25): [True: 0, False: 0]
  ------------------
 1309|      0|                        VECTOR(*res)[i] -= 1;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1310|      0|                    }
 1311|      0|                }
 1312|      0|            }
 1313|      0|        }
 1314|      0|    }  /* loops */
 1315|       |
 1316|  30.3k|    igraph_vit_destroy(&vit);
 1317|  30.3k|    IGRAPH_FINALLY_CLEAN(1);
 1318|       |
 1319|  30.3k|    return IGRAPH_SUCCESS;
 1320|  30.3k|}
igraph_get_eid:
 1421|  3.32k|                   igraph_bool_t directed, igraph_bool_t error) {
 1422|       |
 1423|  3.32k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
 1424|       |
 1425|  3.32k|    if (from < 0 || to < 0 || from >= no_of_nodes || to >= no_of_nodes) {
  ------------------
  |  Branch (1425:9): [True: 0, False: 3.32k]
  |  Branch (1425:21): [True: 0, False: 3.32k]
  |  Branch (1425:31): [True: 0, False: 3.32k]
  |  Branch (1425:54): [True: 0, False: 3.32k]
  ------------------
 1426|      0|        IGRAPH_ERROR("Cannot get edge ID.", IGRAPH_EINVVID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1427|      0|    }
 1428|       |
 1429|  3.32k|    *eid = -1;
 1430|  3.32k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (1430:9): [True: 0, False: 3.32k]
  ------------------
 1431|       |
 1432|       |        /* Directed graph */
 1433|      0|        FIND_DIRECTED_EDGE(graph, from, to, eid);
  ------------------
  |  | 1364|      0|    do { \
  |  | 1365|      0|        igraph_integer_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1366|      0|        igraph_integer_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1367|      0|        igraph_integer_t N = end; \
  |  | 1368|      0|        igraph_integer_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1369|      0|        igraph_integer_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1370|      0|        igraph_integer_t N2 = end2; \
  |  | 1371|      0|        igraph_integer_t *nullpointer = NULL; \
  |  | 1372|      0|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1372:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1373|      0|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1344|      0|    do { \
  |  |  |  | 1345|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1345:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1346|      0|            igraph_integer_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1347|      0|            igraph_integer_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1348|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1348:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1349|      0|                (start) = mid+1; \
  |  |  |  | 1350|      0|            } else { \
  |  |  |  | 1351|      0|                (end) = mid; \
  |  |  |  | 1352|      0|            } \
  |  |  |  | 1353|      0|        } \
  |  |  |  | 1354|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1354:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1355|      0|            igraph_integer_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1356|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1356:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1357|      0|                *(result) = e; \
  |  |  |  | 1358|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1358:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1359|      0|            } \
  |  |  |  | 1360|      0|        } \
  |  |  |  | 1361|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1361:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1374|      0|        } else { \
  |  | 1375|      0|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1344|      0|    do { \
  |  |  |  | 1345|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1345:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1346|      0|            igraph_integer_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1347|      0|            igraph_integer_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1348|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1348:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1349|      0|                (start) = mid+1; \
  |  |  |  | 1350|      0|            } else { \
  |  |  |  | 1351|      0|                (end) = mid; \
  |  |  |  | 1352|      0|            } \
  |  |  |  | 1353|      0|        } \
  |  |  |  | 1354|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1354:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1355|      0|            igraph_integer_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1356|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1356:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1357|      0|                *(result) = e; \
  |  |  |  | 1358|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1358:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1359|      0|            } \
  |  |  |  | 1360|      0|        } \
  |  |  |  | 1361|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1361:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1376|      0|        } \
  |  | 1377|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1377:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1434|      0|        if (!directed && *eid < 0) {
  ------------------
  |  Branch (1434:13): [True: 0, False: 0]
  |  Branch (1434:26): [True: 0, False: 0]
  ------------------
 1435|      0|            FIND_DIRECTED_EDGE(graph, to, from, eid);
  ------------------
  |  | 1364|      0|    do { \
  |  | 1365|      0|        igraph_integer_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1366|      0|        igraph_integer_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1367|      0|        igraph_integer_t N = end; \
  |  | 1368|      0|        igraph_integer_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1369|      0|        igraph_integer_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1370|      0|        igraph_integer_t N2 = end2; \
  |  | 1371|      0|        igraph_integer_t *nullpointer = NULL; \
  |  | 1372|      0|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1372:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1373|      0|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1344|      0|    do { \
  |  |  |  | 1345|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1345:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1346|      0|            igraph_integer_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1347|      0|            igraph_integer_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1348|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1348:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1349|      0|                (start) = mid+1; \
  |  |  |  | 1350|      0|            } else { \
  |  |  |  | 1351|      0|                (end) = mid; \
  |  |  |  | 1352|      0|            } \
  |  |  |  | 1353|      0|        } \
  |  |  |  | 1354|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1354:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1355|      0|            igraph_integer_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1356|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1356:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1357|      0|                *(result) = e; \
  |  |  |  | 1358|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1358:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1359|      0|            } \
  |  |  |  | 1360|      0|        } \
  |  |  |  | 1361|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1361:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1374|      0|        } else { \
  |  | 1375|      0|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1344|      0|    do { \
  |  |  |  | 1345|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1345:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1346|      0|            igraph_integer_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1347|      0|            igraph_integer_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1348|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1348:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1349|      0|                (start) = mid+1; \
  |  |  |  | 1350|      0|            } else { \
  |  |  |  | 1351|      0|                (end) = mid; \
  |  |  |  | 1352|      0|            } \
  |  |  |  | 1353|      0|        } \
  |  |  |  | 1354|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1354:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1355|      0|            igraph_integer_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1356|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1356:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1357|      0|                *(result) = e; \
  |  |  |  | 1358|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1358:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1359|      0|            } \
  |  |  |  | 1360|      0|        } \
  |  |  |  | 1361|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1361:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1376|      0|        } \
  |  | 1377|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1377:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1436|      0|        }
 1437|       |
 1438|  3.32k|    } else {
 1439|       |
 1440|       |        /* Undirected graph, they only have one mode */
 1441|  3.32k|        FIND_UNDIRECTED_EDGE(graph, from, to, eid);
  ------------------
  |  | 1380|  3.32k|    do { \
  |  | 1381|  3.32k|        igraph_integer_t xfrom1 = from > to ? from : to; \
  |  |  ------------------
  |  |  |  Branch (1381:35): [True: 1.19k, False: 2.12k]
  |  |  ------------------
  |  | 1382|  3.32k|        igraph_integer_t xto1 = from > to ? to : from; \
  |  |  ------------------
  |  |  |  Branch (1382:33): [True: 1.19k, False: 2.12k]
  |  |  ------------------
  |  | 1383|  3.32k|        FIND_DIRECTED_EDGE(graph, xfrom1, xto1, eid); \
  |  |  ------------------
  |  |  |  | 1364|  3.32k|    do { \
  |  |  |  | 1365|  3.32k|        igraph_integer_t start = VECTOR(graph->os)[xfrom]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  3.32k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1366|  3.32k|        igraph_integer_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  3.32k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1367|  3.32k|        igraph_integer_t N = end; \
  |  |  |  | 1368|  3.32k|        igraph_integer_t start2 = VECTOR(graph->is)[xto]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  3.32k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1369|  3.32k|        igraph_integer_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  3.32k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1370|  3.32k|        igraph_integer_t N2 = end2; \
  |  |  |  | 1371|  3.32k|        igraph_integer_t *nullpointer = NULL; \
  |  |  |  | 1372|  3.32k|        if (end-start < end2-start2) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1372:13): [True: 1.05k, False: 2.27k]
  |  |  |  |  ------------------
  |  |  |  | 1373|  1.05k|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, eid, nullpointer); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1344|  1.05k|    do { \
  |  |  |  |  |  | 1345|  1.43k|        while ((start) < (end)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1345:16): [True: 380, False: 1.05k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1346|    380|            igraph_integer_t mid =(start)+((end)-(start))/2; \
  |  |  |  |  |  | 1347|    380|            igraph_integer_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    380|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1348|    380|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    380|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1348:17): [True: 64, False: 316]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1349|     64|                (start) = mid+1; \
  |  |  |  |  |  | 1350|    316|            } else { \
  |  |  |  |  |  | 1351|    316|                (end) = mid; \
  |  |  |  |  |  | 1352|    316|            } \
  |  |  |  |  |  | 1353|    380|        } \
  |  |  |  |  |  | 1354|  1.05k|        if ((start) < (N)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1354:13): [True: 256, False: 799]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1355|    256|            igraph_integer_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    256|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1356|    256|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    256|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1356:17): [True: 93, False: 163]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1357|     93|                *(result) = e; \
  |  |  |  |  |  | 1358|     93|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1358:21): [True: 0, False: 93]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1359|     93|            } \
  |  |  |  |  |  | 1360|    256|        } \
  |  |  |  |  |  | 1361|  1.05k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1361:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1374|  2.27k|        } else { \
  |  |  |  | 1375|  2.27k|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, eid, nullpointer); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1344|  2.27k|    do { \
  |  |  |  |  |  | 1345|  3.62k|        while ((start) < (end)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1345:16): [True: 1.35k, False: 2.27k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1346|  1.35k|            igraph_integer_t mid =(start)+((end)-(start))/2; \
  |  |  |  |  |  | 1347|  1.35k|            igraph_integer_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|  1.35k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1348|  1.35k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|  1.35k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1348:17): [True: 825, False: 525]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1349|    825|                (start) = mid+1; \
  |  |  |  |  |  | 1350|    825|            } else { \
  |  |  |  |  |  | 1351|    525|                (end) = mid; \
  |  |  |  |  |  | 1352|    525|            } \
  |  |  |  |  |  | 1353|  1.35k|        } \
  |  |  |  |  |  | 1354|  2.27k|        if ((start) < (N)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1354:13): [True: 498, False: 1.77k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1355|    498|            igraph_integer_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    498|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1356|    498|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    498|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1356:17): [True: 88, False: 410]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1357|     88|                *(result) = e; \
  |  |  |  |  |  | 1358|     88|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1358:21): [True: 0, False: 88]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1359|     88|            } \
  |  |  |  |  |  | 1360|    498|        } \
  |  |  |  |  |  | 1361|  2.27k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1361:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1376|  2.27k|        } \
  |  |  |  | 1377|  3.32k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1377:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1384|  3.32k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1384:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1442|       |
 1443|  3.32k|    }
 1444|       |
 1445|  3.32k|    if (*eid < 0) {
  ------------------
  |  Branch (1445:9): [True: 3.14k, False: 181]
  ------------------
 1446|  3.14k|        if (error) {
  ------------------
  |  Branch (1446:13): [True: 0, False: 3.14k]
  ------------------
 1447|      0|            IGRAPH_ERROR("Cannot get edge ID, no such edge.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1448|      0|        }
 1449|  3.14k|    }
 1450|       |
 1451|  3.32k|    return IGRAPH_SUCCESS;
 1452|  3.32k|}
igraph_get_eids:
 1499|  2.01k|                    igraph_bool_t directed, igraph_bool_t error) {
 1500|       |
 1501|  2.01k|    igraph_integer_t n = pairs ? igraph_vector_int_size(pairs) : 0;
  ------------------
  |  Branch (1501:26): [True: 2.01k, False: 0]
  ------------------
 1502|  2.01k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
 1503|  2.01k|    igraph_integer_t i;
 1504|  2.01k|    igraph_integer_t eid = -1;
 1505|       |
 1506|  2.01k|    if (n == 0) {
  ------------------
  |  Branch (1506:9): [True: 0, False: 2.01k]
  ------------------
 1507|      0|        igraph_vector_int_clear(eids);
 1508|      0|        return IGRAPH_SUCCESS;
 1509|      0|    }
 1510|       |
 1511|  2.01k|    if (n % 2 != 0) {
  ------------------
  |  Branch (1511:9): [True: 0, False: 2.01k]
  ------------------
 1512|      0|        IGRAPH_ERROR("Cannot get edge IDs, invalid length of vertex pair vector.",
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1513|      0|                     IGRAPH_EINVAL);
 1514|      0|    }
 1515|       |
 1516|  2.01k|    if (!igraph_vector_int_isininterval(pairs, 0, no_of_nodes - 1)) {
  ------------------
  |  Branch (1516:9): [True: 0, False: 2.01k]
  ------------------
 1517|      0|        IGRAPH_ERROR("Cannot get edge IDs, invalid vertex ID.", IGRAPH_EINVVID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1518|      0|    }
 1519|       |
 1520|  2.01k|    IGRAPH_CHECK(igraph_vector_int_resize(eids, n / 2));
  ------------------
  |  |  648|  2.01k|    do { \
  |  |  649|  2.01k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.01k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1521|       |
 1522|  2.01k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (1522:9): [True: 0, False: 2.01k]
  ------------------
 1523|      0|        for (i = 0; i < n / 2; i++) {
  ------------------
  |  Branch (1523:21): [True: 0, False: 0]
  ------------------
 1524|      0|            igraph_integer_t from = VECTOR(*pairs)[2 * i];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1525|      0|            igraph_integer_t to = VECTOR(*pairs)[2 * i + 1];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1526|       |
 1527|      0|            eid = -1;
 1528|      0|            FIND_DIRECTED_EDGE(graph, from, to, &eid);
  ------------------
  |  | 1364|      0|    do { \
  |  | 1365|      0|        igraph_integer_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1366|      0|        igraph_integer_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1367|      0|        igraph_integer_t N = end; \
  |  | 1368|      0|        igraph_integer_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1369|      0|        igraph_integer_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1370|      0|        igraph_integer_t N2 = end2; \
  |  | 1371|      0|        igraph_integer_t *nullpointer = NULL; \
  |  | 1372|      0|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1372:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1373|      0|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1344|      0|    do { \
  |  |  |  | 1345|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1345:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1346|      0|            igraph_integer_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1347|      0|            igraph_integer_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1348|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1348:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1349|      0|                (start) = mid+1; \
  |  |  |  | 1350|      0|            } else { \
  |  |  |  | 1351|      0|                (end) = mid; \
  |  |  |  | 1352|      0|            } \
  |  |  |  | 1353|      0|        } \
  |  |  |  | 1354|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1354:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1355|      0|            igraph_integer_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1356|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1356:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1357|      0|                *(result) = e; \
  |  |  |  | 1358|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1358:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1359|      0|            } \
  |  |  |  | 1360|      0|        } \
  |  |  |  | 1361|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1361:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1374|      0|        } else { \
  |  | 1375|      0|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1344|      0|    do { \
  |  |  |  | 1345|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1345:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1346|      0|            igraph_integer_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1347|      0|            igraph_integer_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1348|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1348:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1349|      0|                (start) = mid+1; \
  |  |  |  | 1350|      0|            } else { \
  |  |  |  | 1351|      0|                (end) = mid; \
  |  |  |  | 1352|      0|            } \
  |  |  |  | 1353|      0|        } \
  |  |  |  | 1354|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1354:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1355|      0|            igraph_integer_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1356|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1356:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1357|      0|                *(result) = e; \
  |  |  |  | 1358|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1358:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1359|      0|            } \
  |  |  |  | 1360|      0|        } \
  |  |  |  | 1361|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1361:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1376|      0|        } \
  |  | 1377|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1377:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1529|      0|            if (!directed && eid < 0) {
  ------------------
  |  Branch (1529:17): [True: 0, False: 0]
  |  Branch (1529:30): [True: 0, False: 0]
  ------------------
 1530|      0|                FIND_DIRECTED_EDGE(graph, to, from, &eid);
  ------------------
  |  | 1364|      0|    do { \
  |  | 1365|      0|        igraph_integer_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1366|      0|        igraph_integer_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1367|      0|        igraph_integer_t N = end; \
  |  | 1368|      0|        igraph_integer_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1369|      0|        igraph_integer_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1370|      0|        igraph_integer_t N2 = end2; \
  |  | 1371|      0|        igraph_integer_t *nullpointer = NULL; \
  |  | 1372|      0|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1372:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1373|      0|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1344|      0|    do { \
  |  |  |  | 1345|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1345:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1346|      0|            igraph_integer_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1347|      0|            igraph_integer_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1348|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1348:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1349|      0|                (start) = mid+1; \
  |  |  |  | 1350|      0|            } else { \
  |  |  |  | 1351|      0|                (end) = mid; \
  |  |  |  | 1352|      0|            } \
  |  |  |  | 1353|      0|        } \
  |  |  |  | 1354|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1354:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1355|      0|            igraph_integer_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1356|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1356:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1357|      0|                *(result) = e; \
  |  |  |  | 1358|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1358:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1359|      0|            } \
  |  |  |  | 1360|      0|        } \
  |  |  |  | 1361|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1361:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1374|      0|        } else { \
  |  | 1375|      0|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1344|      0|    do { \
  |  |  |  | 1345|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1345:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1346|      0|            igraph_integer_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1347|      0|            igraph_integer_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1348|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1348:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1349|      0|                (start) = mid+1; \
  |  |  |  | 1350|      0|            } else { \
  |  |  |  | 1351|      0|                (end) = mid; \
  |  |  |  | 1352|      0|            } \
  |  |  |  | 1353|      0|        } \
  |  |  |  | 1354|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1354:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1355|      0|            igraph_integer_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1356|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1356:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1357|      0|                *(result) = e; \
  |  |  |  | 1358|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1358:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1359|      0|            } \
  |  |  |  | 1360|      0|        } \
  |  |  |  | 1361|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1361:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1376|      0|        } \
  |  | 1377|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1377:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1531|      0|            }
 1532|       |
 1533|      0|            VECTOR(*eids)[i] = eid;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1534|      0|            if (eid < 0 && error) {
  ------------------
  |  Branch (1534:17): [True: 0, False: 0]
  |  Branch (1534:28): [True: 0, False: 0]
  ------------------
 1535|      0|                IGRAPH_ERROR("Cannot get edge ID, no such edge.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1536|      0|            }
 1537|      0|        }
 1538|  2.01k|    } else {
 1539|  80.6k|        for (i = 0; i < n / 2; i++) {
  ------------------
  |  Branch (1539:21): [True: 78.5k, False: 2.01k]
  ------------------
 1540|  78.5k|            igraph_integer_t from = VECTOR(*pairs)[2 * i];
  ------------------
  |  |   65|  78.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1541|  78.5k|            igraph_integer_t to = VECTOR(*pairs)[2 * i + 1];
  ------------------
  |  |   65|  78.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1542|       |
 1543|  78.5k|            eid = -1;
 1544|  78.5k|            FIND_UNDIRECTED_EDGE(graph, from, to, &eid);
  ------------------
  |  | 1380|  78.5k|    do { \
  |  | 1381|  78.5k|        igraph_integer_t xfrom1 = from > to ? from : to; \
  |  |  ------------------
  |  |  |  Branch (1381:35): [True: 0, False: 78.5k]
  |  |  ------------------
  |  | 1382|  78.5k|        igraph_integer_t xto1 = from > to ? to : from; \
  |  |  ------------------
  |  |  |  Branch (1382:33): [True: 0, False: 78.5k]
  |  |  ------------------
  |  | 1383|  78.5k|        FIND_DIRECTED_EDGE(graph, xfrom1, xto1, eid); \
  |  |  ------------------
  |  |  |  | 1364|  78.5k|    do { \
  |  |  |  | 1365|  78.5k|        igraph_integer_t start = VECTOR(graph->os)[xfrom]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  78.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1366|  78.5k|        igraph_integer_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  78.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1367|  78.5k|        igraph_integer_t N = end; \
  |  |  |  | 1368|  78.5k|        igraph_integer_t start2 = VECTOR(graph->is)[xto]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  78.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1369|  78.5k|        igraph_integer_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  78.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1370|  78.5k|        igraph_integer_t N2 = end2; \
  |  |  |  | 1371|  78.5k|        igraph_integer_t *nullpointer = NULL; \
  |  |  |  | 1372|  78.5k|        if (end-start < end2-start2) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1372:13): [True: 38.5k, False: 40.0k]
  |  |  |  |  ------------------
  |  |  |  | 1373|  38.5k|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, eid, nullpointer); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1344|  38.5k|    do { \
  |  |  |  |  |  | 1345|   139k|        while ((start) < (end)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1345:16): [True: 100k, False: 38.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1346|   100k|            igraph_integer_t mid =(start)+((end)-(start))/2; \
  |  |  |  |  |  | 1347|   100k|            igraph_integer_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|   100k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1348|   100k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|   100k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1348:17): [True: 3.71k, False: 97.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1349|  3.71k|                (start) = mid+1; \
  |  |  |  |  |  | 1350|  97.1k|            } else { \
  |  |  |  |  |  | 1351|  97.1k|                (end) = mid; \
  |  |  |  |  |  | 1352|  97.1k|            } \
  |  |  |  |  |  | 1353|   100k|        } \
  |  |  |  |  |  | 1354|  38.5k|        if ((start) < (N)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1354:13): [True: 37.3k, False: 1.27k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1355|  37.3k|            igraph_integer_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|  37.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1356|  37.3k|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|  37.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1356:17): [True: 37.2k, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1357|  37.2k|                *(result) = e; \
  |  |  |  |  |  | 1358|  37.2k|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1358:21): [True: 0, False: 37.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1359|  37.2k|            } \
  |  |  |  |  |  | 1360|  37.3k|        } \
  |  |  |  |  |  | 1361|  38.5k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1361:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1374|  40.0k|        } else { \
  |  |  |  | 1375|  40.0k|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, eid, nullpointer); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1344|  40.0k|    do { \
  |  |  |  |  |  | 1345|   149k|        while ((start) < (end)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1345:16): [True: 109k, False: 40.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1346|   109k|            igraph_integer_t mid =(start)+((end)-(start))/2; \
  |  |  |  |  |  | 1347|   109k|            igraph_integer_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|   109k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1348|   109k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|   109k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1348:17): [True: 7.38k, False: 101k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1349|  7.38k|                (start) = mid+1; \
  |  |  |  |  |  | 1350|   101k|            } else { \
  |  |  |  |  |  | 1351|   101k|                (end) = mid; \
  |  |  |  |  |  | 1352|   101k|            } \
  |  |  |  |  |  | 1353|   109k|        } \
  |  |  |  |  |  | 1354|  40.0k|        if ((start) < (N)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1354:13): [True: 37.9k, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1355|  37.9k|            igraph_integer_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|  37.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1356|  37.9k|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|  37.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1356:17): [True: 37.8k, False: 134]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1357|  37.8k|                *(result) = e; \
  |  |  |  |  |  | 1358|  37.8k|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1358:21): [True: 0, False: 37.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1359|  37.8k|            } \
  |  |  |  |  |  | 1360|  37.9k|        } \
  |  |  |  |  |  | 1361|  40.0k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1361:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1376|  40.0k|        } \
  |  |  |  | 1377|  78.5k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1377:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1384|  78.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1384:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1545|  78.5k|            VECTOR(*eids)[i] = eid;
  ------------------
  |  |   65|  78.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1546|  78.5k|            if (eid < 0 && error) {
  ------------------
  |  Branch (1546:17): [True: 3.48k, False: 75.1k]
  |  Branch (1546:28): [True: 0, False: 3.48k]
  ------------------
 1547|      0|                IGRAPH_ERROR("Cannot get edge ID, no such edge.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1548|      0|            }
 1549|  78.5k|        }
 1550|  2.01k|    }
 1551|       |
 1552|  2.01k|    return IGRAPH_SUCCESS;
 1553|  2.01k|}
igraph_get_all_eids_between:
 1615|  4.02k|) {
 1616|  4.02k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
 1617|       |
 1618|  4.02k|    if (source < 0 || source >= no_of_nodes) {
  ------------------
  |  Branch (1618:9): [True: 0, False: 4.02k]
  |  Branch (1618:23): [True: 0, False: 4.02k]
  ------------------
 1619|      0|        IGRAPH_ERROR("Cannot get edge IDs, invalid source vertex ID.", IGRAPH_EINVVID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1620|      0|    }
 1621|       |
 1622|  4.02k|    if (target < 0 || target >= no_of_nodes) {
  ------------------
  |  Branch (1622:9): [True: 0, False: 4.02k]
  |  Branch (1622:23): [True: 0, False: 4.02k]
  ------------------
 1623|      0|        IGRAPH_ERROR("Cannot get edge IDs, invalid target vertex ID.", IGRAPH_EINVVID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1624|      0|    }
 1625|       |
 1626|  4.02k|    igraph_vector_int_clear(eids);
 1627|       |
 1628|  4.02k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (1628:9): [True: 0, False: 4.02k]
  ------------------
 1629|       |        /* look in the specified direction first */
 1630|      0|        FIND_ALL_DIRECTED_EDGES(graph, source, target, eids);
  ------------------
  |  | 1559|      0|    do { \
  |  | 1560|      0|        igraph_integer_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1561|      0|        igraph_integer_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1562|      0|        igraph_integer_t N = end; \
  |  | 1563|      0|        igraph_integer_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1564|      0|        igraph_integer_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1565|      0|        igraph_integer_t N2 = end2; \
  |  | 1566|      0|        igraph_integer_t eid = -1; \
  |  | 1567|      0|        igraph_integer_t pos = -1; \
  |  | 1568|      0|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1568:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1569|      0|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, &eid, &pos); \
  |  |  ------------------
  |  |  |  | 1344|      0|    do { \
  |  |  |  | 1345|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1345:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1346|      0|            igraph_integer_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1347|      0|            igraph_integer_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1348|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1348:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1349|      0|                (start) = mid+1; \
  |  |  |  | 1350|      0|            } else { \
  |  |  |  | 1351|      0|                (end) = mid; \
  |  |  |  | 1352|      0|            } \
  |  |  |  | 1353|      0|        } \
  |  |  |  | 1354|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1354:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1355|      0|            igraph_integer_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1356|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1356:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1357|      0|                *(result) = e; \
  |  |  |  | 1358|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1358:21): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  | 1359|      0|            } \
  |  |  |  | 1360|      0|        } \
  |  |  |  | 1361|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1361:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1570|      0|            while (pos >= 0 && pos < N) { \
  |  |  ------------------
  |  |  |  Branch (1570:20): [True: 0, False: 0]
  |  |  |  Branch (1570:32): [True: 0, False: 0]
  |  |  ------------------
  |  | 1571|      0|                eid = VECTOR(graph->oi)[pos++]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1572|      0|                if (VECTOR(graph->to)[eid] != xto) { break; } \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  |  Branch (1572:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1573|      0|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1574|      0|            } \
  |  | 1575|      0|        } else { \
  |  | 1576|      0|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, &eid, &pos); \
  |  |  ------------------
  |  |  |  | 1344|      0|    do { \
  |  |  |  | 1345|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1345:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1346|      0|            igraph_integer_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1347|      0|            igraph_integer_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1348|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1348:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1349|      0|                (start) = mid+1; \
  |  |  |  | 1350|      0|            } else { \
  |  |  |  | 1351|      0|                (end) = mid; \
  |  |  |  | 1352|      0|            } \
  |  |  |  | 1353|      0|        } \
  |  |  |  | 1354|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1354:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1355|      0|            igraph_integer_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1356|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1356:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1357|      0|                *(result) = e; \
  |  |  |  | 1358|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1358:21): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  | 1359|      0|            } \
  |  |  |  | 1360|      0|        } \
  |  |  |  | 1361|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1361:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1577|      0|            while (pos >= 0 && pos < N2) { \
  |  |  ------------------
  |  |  |  Branch (1577:20): [True: 0, False: 0]
  |  |  |  Branch (1577:32): [True: 0, False: 0]
  |  |  ------------------
  |  | 1578|      0|                eid = VECTOR(graph->ii)[pos++]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1579|      0|                if (VECTOR(graph->from)[eid] != xfrom) { break; } \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  |  Branch (1579:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1580|      0|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1581|      0|            } \
  |  | 1582|      0|        } \
  |  | 1583|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1583:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1631|      0|        if (!directed) {
  ------------------
  |  Branch (1631:13): [True: 0, False: 0]
  ------------------
 1632|       |            /* look in the reverse direction as well */
 1633|      0|            FIND_ALL_DIRECTED_EDGES(graph, target, source, eids);
  ------------------
  |  | 1559|      0|    do { \
  |  | 1560|      0|        igraph_integer_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1561|      0|        igraph_integer_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1562|      0|        igraph_integer_t N = end; \
  |  | 1563|      0|        igraph_integer_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1564|      0|        igraph_integer_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1565|      0|        igraph_integer_t N2 = end2; \
  |  | 1566|      0|        igraph_integer_t eid = -1; \
  |  | 1567|      0|        igraph_integer_t pos = -1; \
  |  | 1568|      0|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1568:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1569|      0|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, &eid, &pos); \
  |  |  ------------------
  |  |  |  | 1344|      0|    do { \
  |  |  |  | 1345|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1345:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1346|      0|            igraph_integer_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1347|      0|            igraph_integer_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1348|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1348:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1349|      0|                (start) = mid+1; \
  |  |  |  | 1350|      0|            } else { \
  |  |  |  | 1351|      0|                (end) = mid; \
  |  |  |  | 1352|      0|            } \
  |  |  |  | 1353|      0|        } \
  |  |  |  | 1354|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1354:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1355|      0|            igraph_integer_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1356|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1356:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1357|      0|                *(result) = e; \
  |  |  |  | 1358|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1358:21): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  | 1359|      0|            } \
  |  |  |  | 1360|      0|        } \
  |  |  |  | 1361|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1361:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1570|      0|            while (pos >= 0 && pos < N) { \
  |  |  ------------------
  |  |  |  Branch (1570:20): [True: 0, False: 0]
  |  |  |  Branch (1570:32): [True: 0, False: 0]
  |  |  ------------------
  |  | 1571|      0|                eid = VECTOR(graph->oi)[pos++]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1572|      0|                if (VECTOR(graph->to)[eid] != xto) { break; } \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  |  Branch (1572:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1573|      0|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1574|      0|            } \
  |  | 1575|      0|        } else { \
  |  | 1576|      0|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, &eid, &pos); \
  |  |  ------------------
  |  |  |  | 1344|      0|    do { \
  |  |  |  | 1345|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1345:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1346|      0|            igraph_integer_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1347|      0|            igraph_integer_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1348|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1348:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1349|      0|                (start) = mid+1; \
  |  |  |  | 1350|      0|            } else { \
  |  |  |  | 1351|      0|                (end) = mid; \
  |  |  |  | 1352|      0|            } \
  |  |  |  | 1353|      0|        } \
  |  |  |  | 1354|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1354:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1355|      0|            igraph_integer_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1356|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1356:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1357|      0|                *(result) = e; \
  |  |  |  | 1358|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1358:21): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  | 1359|      0|            } \
  |  |  |  | 1360|      0|        } \
  |  |  |  | 1361|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1361:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1577|      0|            while (pos >= 0 && pos < N2) { \
  |  |  ------------------
  |  |  |  Branch (1577:20): [True: 0, False: 0]
  |  |  |  Branch (1577:32): [True: 0, False: 0]
  |  |  ------------------
  |  | 1578|      0|                eid = VECTOR(graph->ii)[pos++]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1579|      0|                if (VECTOR(graph->from)[eid] != xfrom) { break; } \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  |  Branch (1579:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1580|      0|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1581|      0|            } \
  |  | 1582|      0|        } \
  |  | 1583|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1583:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1634|      0|        }
 1635|  4.02k|    } else {
 1636|  4.02k|        FIND_ALL_UNDIRECTED_EDGES(graph, source, target, eids);
  ------------------
  |  | 1586|  4.02k|    do { \
  |  | 1587|  4.02k|        igraph_integer_t xfrom1 = from > to ? from : to; \
  |  |  ------------------
  |  |  |  Branch (1587:35): [True: 2.01k, False: 2.01k]
  |  |  ------------------
  |  | 1588|  4.02k|        igraph_integer_t xto1 = from > to ? to : from; \
  |  |  ------------------
  |  |  |  Branch (1588:33): [True: 2.01k, False: 2.01k]
  |  |  ------------------
  |  | 1589|  4.02k|        FIND_ALL_DIRECTED_EDGES(graph, xfrom1, xto1, eidvec); \
  |  |  ------------------
  |  |  |  | 1559|  4.02k|    do { \
  |  |  |  | 1560|  4.02k|        igraph_integer_t start = VECTOR(graph->os)[xfrom]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  4.02k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1561|  4.02k|        igraph_integer_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  4.02k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1562|  4.02k|        igraph_integer_t N = end; \
  |  |  |  | 1563|  4.02k|        igraph_integer_t start2 = VECTOR(graph->is)[xto]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  4.02k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1564|  4.02k|        igraph_integer_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  4.02k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1565|  4.02k|        igraph_integer_t N2 = end2; \
  |  |  |  | 1566|  4.02k|        igraph_integer_t eid = -1; \
  |  |  |  | 1567|  4.02k|        igraph_integer_t pos = -1; \
  |  |  |  | 1568|  4.02k|        if (end-start < end2-start2) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1568:13): [True: 2.24k, False: 1.78k]
  |  |  |  |  ------------------
  |  |  |  | 1569|  2.24k|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, &eid, &pos); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1344|  2.24k|    do { \
  |  |  |  |  |  | 1345|  3.49k|        while ((start) < (end)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1345:16): [True: 1.25k, False: 2.24k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1346|  1.25k|            igraph_integer_t mid =(start)+((end)-(start))/2; \
  |  |  |  |  |  | 1347|  1.25k|            igraph_integer_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|  1.25k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1348|  1.25k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|  1.25k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1348:17): [True: 0, False: 1.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1349|      0|                (start) = mid+1; \
  |  |  |  |  |  | 1350|  1.25k|            } else { \
  |  |  |  |  |  | 1351|  1.25k|                (end) = mid; \
  |  |  |  |  |  | 1352|  1.25k|            } \
  |  |  |  |  |  | 1353|  1.25k|        } \
  |  |  |  |  |  | 1354|  2.24k|        if ((start) < (N)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1354:13): [True: 585, False: 1.65k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1355|    585|            igraph_integer_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    585|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1356|    585|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    585|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1356:17): [True: 573, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1357|    573|                *(result) = e; \
  |  |  |  |  |  | 1358|    573|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1358:21): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1359|    573|            } \
  |  |  |  |  |  | 1360|    585|        } \
  |  |  |  |  |  | 1361|  2.24k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1361:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1570|  9.74k|            while (pos >= 0 && pos < N) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1570:20): [True: 8.07k, False: 1.66k]
  |  |  |  |  |  Branch (1570:32): [True: 7.53k, False: 545]
  |  |  |  |  ------------------
  |  |  |  | 1571|  7.53k|                eid = VECTOR(graph->oi)[pos++]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  7.53k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1572|  7.53k|                if (VECTOR(graph->to)[eid] != xto) { break; } \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  7.53k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1572:21): [True: 28, False: 7.50k]
  |  |  |  |  ------------------
  |  |  |  | 1573|  7.53k|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  648|  7.50k|    do { \
  |  |  |  |  |  |  649|  7.50k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  |  |  650|  7.50k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  604|  7.50k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 7.50k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  652|      0|        } \
  |  |  |  |  |  |  653|  7.50k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1574|  7.50k|            } \
  |  |  |  | 1575|  2.24k|        } else { \
  |  |  |  | 1576|  1.78k|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, &eid, &pos); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1344|  1.78k|    do { \
  |  |  |  |  |  | 1345|  2.31k|        while ((start) < (end)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1345:16): [True: 531, False: 1.78k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1346|    531|            igraph_integer_t mid =(start)+((end)-(start))/2; \
  |  |  |  |  |  | 1347|    531|            igraph_integer_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    531|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1348|    531|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    531|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1348:17): [True: 47, False: 484]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1349|     47|                (start) = mid+1; \
  |  |  |  |  |  | 1350|    484|            } else { \
  |  |  |  |  |  | 1351|    484|                (end) = mid; \
  |  |  |  |  |  | 1352|    484|            } \
  |  |  |  |  |  | 1353|    531|        } \
  |  |  |  |  |  | 1354|  1.78k|        if ((start) < (N)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1354:13): [True: 202, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1355|    202|            igraph_integer_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    202|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1356|    202|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    202|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1356:17): [True: 189, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1357|    189|                *(result) = e; \
  |  |  |  |  |  | 1358|    189|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1358:21): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1359|    189|            } \
  |  |  |  |  |  | 1360|    202|        } \
  |  |  |  |  |  | 1361|  1.78k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1361:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1577|  4.67k|            while (pos >= 0 && pos < N2) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1577:20): [True: 3.07k, False: 1.59k]
  |  |  |  |  |  Branch (1577:32): [True: 2.91k, False: 165]
  |  |  |  |  ------------------
  |  |  |  | 1578|  2.91k|                eid = VECTOR(graph->ii)[pos++]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  2.91k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1579|  2.91k|                if (VECTOR(graph->from)[eid] != xfrom) { break; } \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  2.91k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1579:21): [True: 24, False: 2.88k]
  |  |  |  |  ------------------
  |  |  |  | 1580|  2.91k|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  648|  2.88k|    do { \
  |  |  |  |  |  |  649|  2.88k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  |  |  650|  2.88k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  604|  2.88k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.88k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  652|      0|        } \
  |  |  |  |  |  |  653|  2.88k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1581|  2.88k|            } \
  |  |  |  | 1582|  1.78k|        } \
  |  |  |  | 1583|  4.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1583:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1590|  4.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1590:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1637|  4.02k|    }
 1638|       |
 1639|  4.02k|    return IGRAPH_SUCCESS;
 1640|  4.02k|}
igraph_incident:
 1667|  2.67M|        igraph_neimode_t mode) {
 1668|  2.67M|    if (!igraph_is_directed(graph) || mode == IGRAPH_ALL) {
  ------------------
  |  Branch (1668:9): [True: 2.67M, False: 0]
  |  Branch (1668:39): [True: 0, False: 0]
  ------------------
 1669|  2.67M|        return igraph_i_incident(graph, eids, pnode, mode, IGRAPH_LOOPS_TWICE);
 1670|  2.67M|    } else {
 1671|      0|        return igraph_i_incident(graph, eids, pnode, mode, IGRAPH_LOOPS_ONCE);
 1672|      0|    }
 1673|  2.67M|}
igraph_i_incident:
 1676|  2.67M|        igraph_neimode_t mode, igraph_loops_t loops) {
 1677|  2.67M|    igraph_integer_t length = 0, idx = 0;
 1678|  2.67M|    igraph_integer_t i, j;
 1679|  2.67M|    igraph_integer_t node = pnode;
 1680|  2.67M|    igraph_bool_t directed = igraph_is_directed(graph);
 1681|       |
 1682|  2.67M|    if (node < 0 || node > igraph_vcount(graph) - 1) {
  ------------------
  |  Branch (1682:9): [True: 0, False: 2.67M]
  |  Branch (1682:21): [True: 0, False: 2.67M]
  ------------------
 1683|      0|        IGRAPH_ERROR("Given vertex is not in the graph.", IGRAPH_EINVVID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1684|      0|    }
 1685|  2.67M|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (1685:9): [True: 2.64M, False: 28.5k]
  |  Branch (1685:31): [True: 2.64M, False: 0]
  ------------------
 1686|  2.67M|        mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1686:9): [True: 0, False: 2.64M]
  ------------------
 1687|      0|        IGRAPH_ERROR("Mode should be either IGRAPH_OUT, IGRAPH_IN or IGRAPH_ALL.", IGRAPH_EINVMODE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1688|      0|    }
 1689|       |
 1690|  2.67M|    if (!directed) {
  ------------------
  |  Branch (1690:9): [True: 2.67M, False: 0]
  ------------------
 1691|  2.67M|        mode = IGRAPH_ALL;
 1692|  2.67M|    }
 1693|       |
 1694|  2.67M|    if (mode != IGRAPH_ALL && loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1694:9): [True: 0, False: 2.67M]
  |  Branch (1694:31): [True: 0, False: 0]
  ------------------
 1695|      0|        IGRAPH_ERROR("For a directed graph (with directions not ignored), "
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1696|      0|                     "IGRAPH_LOOPS_TWICE does not make sense.", IGRAPH_EINVAL);
 1697|      0|    }
 1698|       |
 1699|       |    /* Calculate needed space first & allocate it */
 1700|       |    /* Note that 'mode' is treated as a bit field here; it's okay because
 1701|       |     * IGRAPH_ALL = IGRAPH_IN | IGRAPH_OUT, bit-wise */
 1702|  2.67M|    if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1702:9): [True: 2.67M, False: 0]
  ------------------
 1703|  2.67M|        length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   65|  2.67M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   65|  2.67M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1704|  2.67M|    }
 1705|  2.67M|    if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1705:9): [True: 2.67M, False: 0]
  ------------------
 1706|  2.67M|        length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   65|  2.67M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   65|  2.67M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1707|  2.67M|    }
 1708|       |
 1709|  2.67M|    IGRAPH_CHECK(igraph_vector_int_resize(eids, length));
  ------------------
  |  |  648|  2.67M|    do { \
  |  |  649|  2.67M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.67M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.67M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.67M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.67M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1710|       |
 1711|       |    /* The loops below produce an ordering what is consistent with the
 1712|       |     * ordering returned by igraph_neighbors(), and this should be preserved.
 1713|       |     * We are dealing with two sorted lists; one for the successors and one
 1714|       |     * for the predecessors. If we have requested only one of them, we have
 1715|       |     * an easy job. If we have requested both, we need to merge the two lists
 1716|       |     * to ensure that the output is sorted by the vertex IDs of the "other"
 1717|       |     * endpoint of the affected edges */
 1718|  2.67M|    if (!directed || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1718:9): [True: 2.67M, False: 0]
  |  Branch (1718:22): [True: 0, False: 0]
  ------------------
 1719|       |        /* We did not ask for both directions; this is the easy case */
 1720|       |
 1721|  2.67M|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1721:13): [True: 2.67M, False: 0]
  ------------------
 1722|  2.67M|            j = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   65|  2.67M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1723|  3.47M|            for (i = VECTOR(graph->os)[node]; i < j; i++) {
  ------------------
  |  |   65|  2.67M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1723:47): [True: 804k, False: 2.67M]
  ------------------
 1724|   804k|                igraph_integer_t edge = VECTOR(graph->oi)[i];
  ------------------
  |  |   65|   804k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1725|   804k|                igraph_integer_t other = VECTOR(graph->to)[edge];
  ------------------
  |  |   65|   804k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1726|   804k|                if (loops == IGRAPH_NO_LOOPS && other == pnode) {
  ------------------
  |  Branch (1726:21): [True: 0, False: 804k]
  |  Branch (1726:49): [True: 0, False: 0]
  ------------------
 1727|      0|                    length--;
 1728|   804k|                } else {
 1729|   804k|                    VECTOR(*eids)[idx++] = edge;
  ------------------
  |  |   65|   804k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1730|   804k|                }
 1731|   804k|            }
 1732|  2.67M|        }
 1733|       |
 1734|  2.67M|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1734:13): [True: 2.67M, False: 0]
  ------------------
 1735|  2.67M|            j = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   65|  2.67M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1736|  3.44M|            for (i = VECTOR(graph->is)[node]; i < j; i++) {
  ------------------
  |  |   65|  2.67M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1736:47): [True: 774k, False: 2.67M]
  ------------------
 1737|   774k|                igraph_integer_t edge = VECTOR(graph->ii)[i];
  ------------------
  |  |   65|   774k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1738|   774k|                igraph_integer_t other = VECTOR(graph->from)[edge];
  ------------------
  |  |   65|   774k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1739|   774k|                if ((loops == IGRAPH_NO_LOOPS || (loops == IGRAPH_LOOPS_ONCE && !directed)) && other == pnode) {
  ------------------
  |  Branch (1739:22): [True: 0, False: 774k]
  |  Branch (1739:51): [True: 0, False: 774k]
  |  Branch (1739:81): [True: 0, False: 0]
  |  Branch (1739:96): [True: 0, False: 0]
  ------------------
 1740|      0|                    length--;
 1741|   774k|                } else {
 1742|   774k|                    VECTOR(*eids)[idx++] = edge;
  ------------------
  |  |   65|   774k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1743|   774k|                }
 1744|   774k|            }
 1745|  2.67M|        }
 1746|  2.67M|    } else {
 1747|       |        /* both in- and out- neighbors in a directed graph,
 1748|       |           we need to merge the two 'vectors' */
 1749|      0|        igraph_integer_t j1 = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1750|      0|        igraph_integer_t j2 = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1751|      0|        igraph_integer_t i1 = VECTOR(graph->os)[node];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1752|      0|        igraph_integer_t i2 = VECTOR(graph->is)[node];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1753|      0|        igraph_integer_t eid1, eid2;
 1754|      0|        igraph_integer_t n1, n2;
 1755|      0|        igraph_bool_t seen_loop_edge = false;
 1756|       |
 1757|      0|        while (i1 < j1 && i2 < j2) {
  ------------------
  |  Branch (1757:16): [True: 0, False: 0]
  |  Branch (1757:27): [True: 0, False: 0]
  ------------------
 1758|      0|            eid1 = VECTOR(graph->oi)[i1];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1759|      0|            eid2 = VECTOR(graph->ii)[i2];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1760|      0|            n1 = VECTOR(graph->to)[eid1];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1761|      0|            n2 = VECTOR(graph->from)[eid2];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1762|      0|            if (n1 < n2) {
  ------------------
  |  Branch (1762:17): [True: 0, False: 0]
  ------------------
 1763|      0|                i1++;
 1764|      0|                VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1765|      0|            } else if (n1 > n2) {
  ------------------
  |  Branch (1765:24): [True: 0, False: 0]
  ------------------
 1766|      0|                i2++;
 1767|      0|                VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1768|      0|            } else if (n1 != pnode) {
  ------------------
  |  Branch (1768:24): [True: 0, False: 0]
  ------------------
 1769|       |                /* multiple edge */
 1770|      0|                i1++;
 1771|      0|                i2++;
 1772|      0|                VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1773|      0|                VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1774|      0|            } else {
 1775|       |                /* loop edge */
 1776|      0|                i1++;
 1777|      0|                i2++;
 1778|      0|                if (loops == IGRAPH_NO_LOOPS) {
  ------------------
  |  Branch (1778:21): [True: 0, False: 0]
  ------------------
 1779|      0|                    length -= 2;
 1780|      0|                } else if (loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (1780:28): [True: 0, False: 0]
  ------------------
 1781|      0|                    length--;
 1782|      0|                    if (!seen_loop_edge) {
  ------------------
  |  Branch (1782:25): [True: 0, False: 0]
  ------------------
 1783|      0|                        VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1784|      0|                    } else {
 1785|      0|                        VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1786|      0|                    }
 1787|      0|                    seen_loop_edge = !seen_loop_edge;
 1788|      0|                } else {
 1789|      0|                    VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1790|      0|                    VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1791|      0|                }
 1792|      0|            }
 1793|      0|        }
 1794|       |
 1795|      0|        while (i1 < j1) {
  ------------------
  |  Branch (1795:16): [True: 0, False: 0]
  ------------------
 1796|      0|            eid1 = VECTOR(graph->oi)[i1++];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1797|      0|            VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1798|      0|        }
 1799|       |
 1800|      0|        while (i2 < j2) {
  ------------------
  |  Branch (1800:16): [True: 0, False: 0]
  ------------------
 1801|      0|            eid2 = VECTOR(graph->ii)[i2++];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1802|      0|            VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1803|      0|        }
 1804|      0|    }
 1805|  2.67M|    IGRAPH_CHECK(igraph_vector_int_resize(eids, length));
  ------------------
  |  |  648|  2.67M|    do { \
  |  |  649|  2.67M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.67M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.67M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.67M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.67M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1806|  2.67M|    return IGRAPH_SUCCESS;
 1807|  2.67M|#undef DEDUPLICATE_IF_NEEDED
 1808|  2.67M|}
type_indexededgelist.c:igraph_i_create_start_vectors:
 1051|  91.3k|        igraph_vector_int_t *iindex, igraph_integer_t nodes) {
 1052|       |
 1053|  91.3k|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
 1054|       |
 1055|  91.3k|    igraph_integer_t no_of_nodes;
 1056|  91.3k|    igraph_integer_t no_of_edges;
 1057|  91.3k|    igraph_integer_t i, j, idx;
 1058|       |
 1059|  91.3k|    no_of_nodes = nodes;
 1060|  91.3k|    no_of_edges = igraph_vector_int_size(el);
 1061|       |
 1062|       |    /* result */
 1063|       |
 1064|  91.3k|    IGRAPH_CHECK(igraph_vector_int_resize(res, nodes + 1));
  ------------------
  |  |  648|  91.3k|    do { \
  |  |  649|  91.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  91.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  91.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 91.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  91.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1065|       |
 1066|       |    /* create the index */
 1067|       |
 1068|  91.3k|    if (no_of_edges == 0) {
  ------------------
  |  Branch (1068:9): [True: 4.58k, False: 86.7k]
  ------------------
 1069|       |        /* empty graph */
 1070|  4.58k|        igraph_vector_int_null(res);
 1071|  86.7k|    } else {
 1072|  86.7k|        idx = -1;
 1073|  2.37M|        for (i = 0; i <= EDGE(0); i++) {
  ------------------
  |  | 1053|  2.37M|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|  2.37M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|  2.37M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1073:21): [True: 2.28M, False: 86.7k]
  ------------------
 1074|  2.28M|            idx++; VECTOR(*res)[idx] = 0;
  ------------------
  |  |   65|  2.28M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1075|  2.28M|        }
 1076|  2.85M|        for (i = 1; i < no_of_edges; i++) {
  ------------------
  |  Branch (1076:21): [True: 2.76M, False: 86.7k]
  ------------------
 1077|  2.76M|            igraph_integer_t n = EDGE(i) - EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1053|  2.76M|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|  2.76M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|  2.76M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                          igraph_integer_t n = EDGE(i) - EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1053|  2.76M|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|  2.76M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|  2.76M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1078|  12.2M|            for (j = 0; j < n; j++) {
  ------------------
  |  Branch (1078:25): [True: 9.45M, False: 2.76M]
  ------------------
 1079|  9.45M|                idx++; VECTOR(*res)[idx] = i;
  ------------------
  |  |   65|  9.45M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1080|  9.45M|            }
 1081|  2.76M|        }
 1082|  86.7k|        j = EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1053|  86.7k|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|  86.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|  86.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1083|  3.66M|        for (i = 0; i < no_of_nodes - j; i++) {
  ------------------
  |  Branch (1083:21): [True: 3.57M, False: 86.7k]
  ------------------
 1084|  3.57M|            idx++; VECTOR(*res)[idx] = no_of_edges;
  ------------------
  |  |   65|  3.57M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1085|  3.57M|        }
 1086|  86.7k|    }
 1087|       |
 1088|       |    /* clean */
 1089|       |
 1090|  91.3k|# undef EDGE
 1091|  91.3k|    return IGRAPH_SUCCESS;
 1092|  91.3k|}

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

igraph_qsort:
  264|   700k|{
  265|   700k|	local_qsort(a, n, es, cmp, NULL);
  266|   700k|}
qsort.c:local_qsort:
  121|   703k|{
  122|   703k|	char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
  123|   703k|	size_t d1, d2;
  124|   703k|	int cmp_result;
  125|   703k|	int swap_cnt;
  126|       |
  127|       |    /* if there are less than 2 elements, then sorting is not needed */
  128|   703k|    if (IGRAPH_UNLIKELY(n < 2))
  ------------------
  |  |  604|   703k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  ------------------
  |  |  |  Branch (604:32): [True: 674k, False: 29.0k]
  |  |  ------------------
  ------------------
  129|   674k|        return;
  130|  34.0k|loop:
  131|  34.0k|	swap_cnt = 0;
  132|  34.0k|	if (n < 7) {
  ------------------
  |  Branch (132:6): [True: 27.2k, False: 6.70k]
  ------------------
  133|  71.6k|		for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
  ------------------
  |  Branch (133:29): [True: 44.3k, False: 27.2k]
  ------------------
  134|  44.3k|			for (pl = pm;
  135|  71.7k|			     pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
  ------------------
  |  |   95|  58.3k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (135:9): [True: 58.3k, False: 13.3k]
  |  Branch (135:27): [True: 27.3k, False: 31.0k]
  ------------------
  136|  44.3k|			     pl -= es)
  137|  27.3k|				swapfunc(pl, pl - es, es);
  138|  27.2k|		return;
  139|  27.2k|	}
  140|  6.70k|	pm = (char *)a + (n / 2) * es;
  141|  6.70k|	if (n > 7) {
  ------------------
  |  Branch (141:6): [True: 5.59k, False: 1.11k]
  ------------------
  142|  5.59k|		pl = a;
  143|  5.59k|		pn = (char *)a + (n - 1) * es;
  144|  5.59k|		if (n > 40) {
  ------------------
  |  Branch (144:7): [True: 871, False: 4.72k]
  ------------------
  145|    871|			size_t d = (n / 8) * es;
  146|       |
  147|    871|			pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk);
  148|    871|			pm = med3(pm - d, pm, pm + d, cmp, thunk);
  149|    871|			pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk);
  150|    871|		}
  151|  5.59k|		pm = med3(pl, pm, pn, cmp, thunk);
  152|  5.59k|	}
  153|  6.70k|	swapfunc(a, pm, es);
  154|  6.70k|	pa = pb = (char *)a + es;
  155|       |
  156|  6.70k|	pc = pd = (char *)a + (n - 1) * es;
  157|  18.1k|	for (;;) {
  158|   103k|		while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) {
  ------------------
  |  |   95|   100k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (158:10): [True: 100k, False: 3.03k]
  |  Branch (158:22): [True: 85.4k, False: 15.1k]
  ------------------
  159|  85.4k|			if (cmp_result == 0) {
  ------------------
  |  Branch (159:8): [True: 58.4k, False: 26.9k]
  ------------------
  160|  58.4k|				swap_cnt = 1;
  161|  58.4k|				swapfunc(pa, pb, es);
  162|  58.4k|				pa += es;
  163|  58.4k|			}
  164|  85.4k|			pb += es;
  165|  85.4k|		}
  166|  66.5k|		while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) {
  ------------------
  |  |   95|  59.8k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (166:10): [True: 59.8k, False: 6.70k]
  |  Branch (166:22): [True: 48.3k, False: 11.4k]
  ------------------
  167|  48.3k|			if (cmp_result == 0) {
  ------------------
  |  Branch (167:8): [True: 7.00k, False: 41.3k]
  ------------------
  168|  7.00k|				swap_cnt = 1;
  169|  7.00k|				swapfunc(pc, pd, es);
  170|  7.00k|				pd -= es;
  171|  7.00k|			}
  172|  48.3k|			pc -= es;
  173|  48.3k|		}
  174|  18.1k|		if (pb > pc)
  ------------------
  |  Branch (174:7): [True: 6.70k, False: 11.4k]
  ------------------
  175|  6.70k|			break;
  176|  11.4k|		swapfunc(pb, pc, es);
  177|  11.4k|		swap_cnt = 1;
  178|  11.4k|		pb += es;
  179|  11.4k|		pc -= es;
  180|  11.4k|	}
  181|  6.70k|	if (swap_cnt == 0) {  /* Switch to insertion sort */
  ------------------
  |  Branch (181:6): [True: 455, False: 6.24k]
  ------------------
  182|  6.64k|		for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
  ------------------
  |  Branch (182:29): [True: 6.18k, False: 455]
  ------------------
  183|  6.18k|			for (pl = pm;
  184|  15.7k|			     pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
  ------------------
  |  |   95|  14.8k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (184:9): [True: 14.8k, False: 916]
  |  Branch (184:27): [True: 9.59k, False: 5.27k]
  ------------------
  185|  9.59k|			     pl -= es)
  186|  9.59k|				swapfunc(pl, pl - es, es);
  187|    455|		return;
  188|    455|	}
  189|       |
  190|  6.24k|	pn = (char *)a + n * es;
  191|  6.24k|	d1 = MIN(pa - (char *)a, pb - pa);
  ------------------
  |  |   69|  6.24k|#define	MIN(a, b)	((a) < (b) ? a : b)
  |  |  ------------------
  |  |  |  Branch (69:20): [True: 3.29k, False: 2.95k]
  |  |  ------------------
  ------------------
  192|  6.24k|	vecswap(a, pb - d1, d1);
  ------------------
  |  |   88|  6.24k|	if ((n) > 0) swapfunc(a, b, n)
  |  |  ------------------
  |  |  |  Branch (88:6): [True: 4.46k, False: 1.78k]
  |  |  ------------------
  ------------------
  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|  6.24k|	d1 = MIN(pd - pc, pn - pd - (ptrdiff_t)es);
  ------------------
  |  |   69|  6.24k|#define	MIN(a, b)	((a) < (b) ? a : b)
  |  |  ------------------
  |  |  |  Branch (69:20): [True: 309, False: 5.94k]
  |  |  ------------------
  ------------------
  199|  6.24k|	vecswap(pb, pn - d1, d1);
  ------------------
  |  |   88|  6.24k|	if ((n) > 0) swapfunc(a, b, n)
  |  |  ------------------
  |  |  |  Branch (88:6): [True: 596, False: 5.65k]
  |  |  ------------------
  ------------------
  200|       |
  201|  6.24k|	d1 = pb - pa;
  202|  6.24k|	d2 = pd - pc;
  203|  6.24k|	if (d1 <= d2) {
  ------------------
  |  Branch (203:6): [True: 4.42k, False: 1.82k]
  ------------------
  204|       |		/* Recurse on left partition, then iterate on right partition */
  205|  4.42k|		if (d1 > es) {
  ------------------
  |  Branch (205:7): [True: 1.69k, False: 2.72k]
  ------------------
  206|  1.69k|			local_qsort(a, d1 / es, es, cmp, thunk);
  207|  1.69k|		}
  208|  4.42k|		if (d2 > es) {
  ------------------
  |  Branch (208:7): [True: 3.13k, False: 1.28k]
  ------------------
  209|       |			/* Iterate rather than recurse to save stack space */
  210|       |			/* qsort(pn - d2, d2 / es, es, cmp); */
  211|  3.13k|			a = pn - d2;
  212|  3.13k|			n = d2 / es;
  213|  3.13k|			goto loop;
  214|  3.13k|		}
  215|  4.42k|	} else {
  216|       |		/* Recurse on right partition, then iterate on left partition */
  217|  1.82k|		if (d2 > es) {
  ------------------
  |  Branch (217:7): [True: 1.33k, False: 498]
  ------------------
  218|  1.33k|			local_qsort(pn - d2, d2 / es, es, cmp, thunk);
  219|  1.33k|		}
  220|  1.82k|		if (d1 > es) {
  ------------------
  |  Branch (220:7): [True: 1.78k, False: 47]
  ------------------
  221|       |			/* Iterate rather than recurse to save stack space */
  222|       |			/* qsort(a, d1 / es, es, cmp); */
  223|  1.78k|			n = d1 / es;
  224|  1.78k|			goto loop;
  225|  1.78k|		}
  226|  1.82k|	}
  227|  6.24k|}
qsort.c:swapfunc:
   77|   125k|{
   78|   125k|	char t;
   79|       |
   80|  1.02M|	do {
   81|  1.02M|		t = *a;
   82|  1.02M|		*a++ = *b;
   83|  1.02M|		*b++ = t;
   84|  1.02M|	} while (--es > 0);
  ------------------
  |  Branch (84:11): [True: 899k, False: 125k]
  ------------------
   85|   125k|}
qsort.c:med3:
  104|  8.20k|{
  105|  8.20k|	return CMP(thunk, a, b) < 0 ?
  ------------------
  |  |   95|  8.20k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (105:9): [True: 3.77k, False: 4.42k]
  ------------------
  106|  3.77k|	       (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
  ------------------
  |  |   95|  3.77k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
              	       (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
  ------------------
  |  |   95|  2.52k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (106:10): [True: 1.25k, False: 2.52k]
  |  Branch (106:38): [True: 902, False: 1.62k]
  ------------------
  107|  8.20k|	      :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
  ------------------
  |  |   95|  4.42k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
              	      :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
  ------------------
  |  |   95|  3.80k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (107:10): [True: 621, False: 3.80k]
  |  Branch (107:38): [True: 574, False: 3.23k]
  ------------------
  108|  8.20k|}

igraph_i_safe_vector_int_sum:
   35|  31.2k|igraph_error_t igraph_i_safe_vector_int_sum(const igraph_vector_int_t *vec, igraph_integer_t *res) {
   36|  31.2k|    const igraph_integer_t n = igraph_vector_int_size(vec);
   37|  31.2k|    igraph_integer_t sum = 0;
   38|  5.49M|    for (igraph_integer_t i=0; i < n; ++i) {
  ------------------
  |  Branch (38:32): [True: 5.46M, False: 31.2k]
  ------------------
   39|  5.46M|        IGRAPH_SAFE_ADD(sum, VECTOR(*vec)[i], &sum);
  ------------------
  |  |   47|  5.46M|    do { \
  |  |   48|  5.46M|        igraph_integer_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  5.46M|        igraph_integer_t _safe_sum; \
  |  |   50|  5.46M|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 5.46M]
  |  |  ------------------
  |  |   51|      0|            IGRAPH_ERRORF("Overflow when adding %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  469|      0|    do { \
  |  |  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  472|      0|        return igraph_errno; \
  |  |  |  |  473|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|        } \
  |  |   53|  5.46M|        *(res) = _safe_sum; \
  |  |   54|  5.46M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   40|  5.46M|    }
   41|  31.2k|    *res = sum;
   42|  31.2k|    return IGRAPH_SUCCESS;
   43|  31.2k|}

igraph_maximum_cardinality_search:
   70|  2.02k|                                      igraph_vector_int_t *alpham1) {
   71|       |
   72|  2.02k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
   73|  2.02k|    igraph_vector_int_t size;
   74|  2.02k|    igraph_vector_int_t head, next, prev; /* doubly linked list with head */
   75|  2.02k|    igraph_integer_t i;
   76|  2.02k|    igraph_adjlist_t adjlist;
   77|       |
   78|       |    /***************/
   79|       |    /* local j, v; */
   80|       |    /***************/
   81|       |
   82|  2.02k|    igraph_integer_t j, v;
   83|       |
   84|  2.02k|    if (no_of_nodes == 0) {
  ------------------
  |  Branch (84:9): [True: 1, False: 2.02k]
  ------------------
   85|      1|        igraph_vector_int_clear(alpha);
   86|      1|        if (alpham1) {
  ------------------
  |  Branch (86:13): [True: 1, False: 0]
  ------------------
   87|      1|            igraph_vector_int_clear(alpham1);
   88|      1|        }
   89|      1|        return IGRAPH_SUCCESS;
   90|      1|    }
   91|       |
   92|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&size, no_of_nodes);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   93|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&head, no_of_nodes);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   94|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&next, no_of_nodes);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   95|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&prev, no_of_nodes);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   96|       |
   97|  2.02k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, IGRAPH_ALL, IGRAPH_NO_LOOPS, IGRAPH_NO_MULTIPLE));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   98|  2.02k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  591|  2.02k|    do { \
  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   99|       |
  100|  2.02k|    IGRAPH_CHECK(igraph_vector_int_resize(alpha, no_of_nodes));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  101|  2.02k|    if (alpham1) {
  ------------------
  |  Branch (101:9): [True: 2.02k, False: 0]
  ------------------
  102|  2.02k|        IGRAPH_CHECK(igraph_vector_int_resize(alpham1, no_of_nodes));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  103|  2.02k|    }
  104|       |
  105|       |    /***********************************************/
  106|       |    /* for i in [0,n-1] -> set(i) := emptyset rof; */
  107|       |    /***********************************************/
  108|       |
  109|       |    /* nothing to do, 'head' contains all zeros */
  110|       |
  111|       |    /*********************************************************/
  112|       |    /* for v in vertices -> size(v):=0; add v to set(0) rof; */
  113|       |    /*********************************************************/
  114|       |
  115|  2.02k|    VECTOR(head)[0] = 1;
  ------------------
  |  |   65|  2.02k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  116|   351k|    for (v = 0; v < no_of_nodes; v++) {
  ------------------
  |  Branch (116:17): [True: 349k, False: 2.02k]
  ------------------
  117|   349k|        VECTOR(next)[v] = v + 2;
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  118|   349k|        VECTOR(prev)[v] = v;
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  119|   349k|    }
  120|  2.02k|    VECTOR(next)[no_of_nodes - 1] = 0;
  ------------------
  |  |   65|  2.02k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  121|       |    /* size is already all zero */
  122|       |
  123|       |    /***************/
  124|       |    /* i:=n; j:=0; */
  125|       |    /***************/
  126|       |
  127|  2.02k|    i = no_of_nodes; j = 0;
  128|       |
  129|       |    /**************/
  130|       |    /* do i>=1 -> */
  131|       |    /**************/
  132|       |
  133|   351k|    while (i >= 1) {
  ------------------
  |  Branch (133:12): [True: 349k, False: 2.02k]
  ------------------
  134|   349k|        igraph_integer_t x, k, len;
  135|   349k|        igraph_vector_int_t *neis;
  136|       |
  137|       |        /********************************/
  138|       |        /* v :=  delete any from set(j) */
  139|       |        /********************************/
  140|       |
  141|   349k|        v = VECTOR(head)[j] - 1;
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  142|   349k|        x = VECTOR(next)[v];
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  143|   349k|        VECTOR(head)[j] = x;
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  144|   349k|        if (x != 0) {
  ------------------
  |  Branch (144:13): [True: 335k, False: 14.1k]
  ------------------
  145|   335k|            VECTOR(prev)[x - 1] = 0;
  ------------------
  |  |   65|   335k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  146|   335k|        }
  147|       |
  148|       |        /*************************************************/
  149|       |        /* alpha(v) := i; alpham1(i) := v; size(v) := -1 */
  150|       |        /*************************************************/
  151|       |
  152|   349k|        VECTOR(*alpha)[v] = i - 1;
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  153|   349k|        if (alpham1) {
  ------------------
  |  Branch (153:13): [True: 349k, False: 0]
  ------------------
  154|   349k|            VECTOR(*alpham1)[i - 1] = v;
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  155|   349k|        }
  156|   349k|        VECTOR(size)[v] = -1;
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  157|       |
  158|       |        /********************************************/
  159|       |        /* for {v,w} in E such that size(w) >= 0 -> */
  160|       |        /********************************************/
  161|       |
  162|   349k|        neis = igraph_adjlist_get(&adjlist, v);
  ------------------
  |  |   78|   349k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_integer_t)(no)])
  ------------------
  163|   349k|        len = igraph_vector_int_size(neis);
  164|   451k|        for (k = 0; k < len; k++) {
  ------------------
  |  Branch (164:21): [True: 101k, False: 349k]
  ------------------
  165|   101k|            igraph_integer_t w = VECTOR(*neis)[k];
  ------------------
  |  |   65|   101k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  166|   101k|            igraph_integer_t ws = VECTOR(size)[w];
  ------------------
  |  |   65|   101k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  167|   101k|            if (ws >= 0) {
  ------------------
  |  Branch (167:17): [True: 50.9k, False: 50.9k]
  ------------------
  168|       |
  169|       |                /******************************/
  170|       |                /* delete w from set(size(w)) */
  171|       |                /******************************/
  172|       |
  173|  50.9k|                igraph_integer_t nw = VECTOR(next)[w];
  ------------------
  |  |   65|  50.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  174|  50.9k|                igraph_integer_t pw = VECTOR(prev)[w];
  ------------------
  |  |   65|  50.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  175|  50.9k|                if (nw != 0) {
  ------------------
  |  Branch (175:21): [True: 47.2k, False: 3.64k]
  ------------------
  176|  47.2k|                    VECTOR(prev)[nw - 1] = pw;
  ------------------
  |  |   65|  47.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  177|  47.2k|                }
  178|  50.9k|                if (pw != 0) {
  ------------------
  |  Branch (178:21): [True: 47.8k, False: 3.10k]
  ------------------
  179|  47.8k|                    VECTOR(next)[pw - 1] = nw;
  ------------------
  |  |   65|  47.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  180|  47.8k|                } else {
  181|  3.10k|                    VECTOR(head)[ws] = nw;
  ------------------
  |  |   65|  3.10k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  182|  3.10k|                }
  183|       |
  184|       |                /******************************/
  185|       |                /* size(w) := size(w)+1       */
  186|       |                /******************************/
  187|       |
  188|  50.9k|                VECTOR(size)[w] += 1;
  ------------------
  |  |   65|  50.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  189|       |
  190|       |                /******************************/
  191|       |                /* add w to set(size(w))      */
  192|       |                /******************************/
  193|       |
  194|  50.9k|                ws = VECTOR(size)[w];
  ------------------
  |  |   65|  50.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  195|  50.9k|                nw = VECTOR(head)[ws];
  ------------------
  |  |   65|  50.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  196|  50.9k|                VECTOR(next)[w] = nw;
  ------------------
  |  |   65|  50.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  197|  50.9k|                VECTOR(prev)[w] = 0;
  ------------------
  |  |   65|  50.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  198|  50.9k|                if (nw != 0) {
  ------------------
  |  Branch (198:21): [True: 37.9k, False: 12.9k]
  ------------------
  199|  37.9k|                    VECTOR(prev)[nw - 1] = w + 1;
  ------------------
  |  |   65|  37.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  200|  37.9k|                }
  201|  50.9k|                VECTOR(head)[ws] = w + 1;
  ------------------
  |  |   65|  50.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  202|       |
  203|  50.9k|            }
  204|   101k|        }
  205|       |
  206|       |        /***********************/
  207|       |        /* i := i-1; j := j+1; */
  208|       |        /***********************/
  209|       |
  210|   349k|        i -= 1;
  211|   349k|        j += 1;
  212|       |
  213|       |        /*********************************************/
  214|       |        /* do j>=0 and set(j)=emptyset -> j:=j-1; od */
  215|       |        /*********************************************/
  216|       |
  217|   349k|        if (j < no_of_nodes) {
  ------------------
  |  Branch (217:13): [True: 349k, False: 77]
  ------------------
  218|   700k|            while (j >= 0 && VECTOR(head)[j] == 0) {
  ------------------
  |  |   65|   698k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (218:20): [True: 698k, False: 1.95k]
  |  Branch (218:30): [True: 351k, False: 347k]
  ------------------
  219|   351k|                j--;
  220|   351k|            }
  221|   349k|        }
  222|   349k|    }
  223|       |
  224|  2.02k|    igraph_adjlist_destroy(&adjlist);
  225|  2.02k|    igraph_vector_int_destroy(&prev);
  226|  2.02k|    igraph_vector_int_destroy(&next);
  227|  2.02k|    igraph_vector_int_destroy(&head);
  228|  2.02k|    igraph_vector_int_destroy(&size);
  229|  2.02k|    IGRAPH_FINALLY_CLEAN(5);
  230|       |
  231|  2.02k|    return IGRAPH_SUCCESS;
  232|  2.02k|}

igraph_vertex_coloring_greedy:
  299|  4.05k|igraph_error_t igraph_vertex_coloring_greedy(const igraph_t *graph, igraph_vector_int_t *colors, igraph_coloring_greedy_t heuristic) {
  300|  4.05k|    switch (heuristic) {
  301|  2.02k|    case IGRAPH_COLORING_GREEDY_COLORED_NEIGHBORS:
  ------------------
  |  Branch (301:5): [True: 2.02k, False: 2.02k]
  ------------------
  302|  2.02k|        return igraph_i_vertex_coloring_greedy_cn(graph, colors);
  303|  2.02k|    case IGRAPH_COLORING_GREEDY_DSATUR:
  ------------------
  |  Branch (303:5): [True: 2.02k, False: 2.02k]
  ------------------
  304|  2.02k|        return igraph_i_vertex_coloring_dsatur(graph, colors);
  305|      0|    default:
  ------------------
  |  Branch (305:5): [True: 0, False: 4.05k]
  ------------------
  306|      0|        IGRAPH_ERROR("Invalid heuristic for greedy vertex coloring.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  307|  4.05k|    }
  308|  4.05k|}
coloring.c:igraph_i_vertex_coloring_greedy_cn:
   32|  2.02k|static igraph_error_t igraph_i_vertex_coloring_greedy_cn(const igraph_t *graph, igraph_vector_int_t *colors) {
   33|  2.02k|    igraph_integer_t i, vertex, maxdeg;
   34|  2.02k|    igraph_integer_t vc = igraph_vcount(graph);
   35|  2.02k|    igraph_2wheap_t cn; /* indexed heap storing number of already coloured neighbours */
   36|  2.02k|    igraph_vector_int_t neighbors, nei_colors;
   37|       |
   38|  2.02k|    IGRAPH_CHECK(igraph_vector_int_resize(colors, vc));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   39|  2.02k|    igraph_vector_int_null(colors);
   40|       |
   41|       |    /* Nothing to do for 0 or 1 vertices.
   42|       |     * Remember that colours are integers starting from 0,
   43|       |     * and the 'colors' vector is already 0-initialized above.
   44|       |     */
   45|  2.02k|    if (vc <= 1) {
  ------------------
  |  Branch (45:9): [True: 15, False: 2.01k]
  ------------------
   46|     15|        return IGRAPH_SUCCESS;
   47|     15|    }
   48|       |
   49|       |    /* find maximum degree and a corresponding vertex */
   50|  2.01k|    {
   51|  2.01k|        igraph_vector_int_t degree;
   52|       |
   53|  2.01k|        IGRAPH_VECTOR_INT_INIT_FINALLY(&degree, 0);
  ------------------
  |  |  124|  2.01k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.01k|    do { \
  |  |  |  |  649|  2.01k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.01k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.01k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.01k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.01k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.01k|    do { \
  |  |  |  |  592|  2.01k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.01k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.01k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.01k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.01k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.01k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   54|  2.01k|        IGRAPH_CHECK(igraph_degree(graph, &degree, igraph_vss_all(), IGRAPH_ALL, false));
  ------------------
  |  |  648|  2.01k|    do { \
  |  |  649|  2.01k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.01k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   55|       |
   56|  2.01k|        vertex = igraph_vector_int_which_max(&degree);
   57|  2.01k|        maxdeg = VECTOR(degree)[vertex];
  ------------------
  |  |   65|  2.01k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   58|       |
   59|  2.01k|        igraph_vector_int_destroy(&degree);
   60|  2.01k|        IGRAPH_FINALLY_CLEAN(1);
   61|  2.01k|    }
   62|       |
   63|  2.01k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&nei_colors, 0);
  ------------------
  |  |  124|  2.01k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.01k|    do { \
  |  |  |  |  649|  2.01k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.01k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.01k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.01k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.01k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.01k|    do { \
  |  |  |  |  592|  2.01k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.01k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.01k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.01k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.01k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.01k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   64|  2.01k|    IGRAPH_CHECK(igraph_vector_int_reserve(&nei_colors, maxdeg));
  ------------------
  |  |  648|  2.01k|    do { \
  |  |  649|  2.01k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.01k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   65|       |
   66|  2.01k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neighbors, 0);
  ------------------
  |  |  124|  2.01k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.01k|    do { \
  |  |  |  |  649|  2.01k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.01k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.01k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.01k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.01k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.01k|    do { \
  |  |  |  |  592|  2.01k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.01k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.01k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.01k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.01k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.01k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   67|  2.01k|    IGRAPH_CHECK(igraph_vector_int_reserve(&neighbors, maxdeg));
  ------------------
  |  |  648|  2.01k|    do { \
  |  |  649|  2.01k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.01k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   68|       |
   69|       |    /* two-way indexed heap holding number of already colored neighbors of yet-uncolored vertices */
   70|  2.01k|    IGRAPH_CHECK(igraph_2wheap_init(&cn, vc));
  ------------------
  |  |  648|  2.01k|    do { \
  |  |  649|  2.01k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.01k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   71|  2.01k|    IGRAPH_FINALLY(igraph_2wheap_destroy, &cn);
  ------------------
  |  |  591|  2.01k|    do { \
  |  |  592|  2.01k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.01k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.01k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.01k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.01k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   72|   351k|    for (i = 0; i < vc; ++i) {
  ------------------
  |  Branch (72:17): [True: 349k, False: 2.01k]
  ------------------
   73|   349k|        if (i != vertex) {
  ------------------
  |  Branch (73:13): [True: 347k, False: 2.01k]
  ------------------
   74|   347k|            igraph_2wheap_push_with_index(&cn, i, 0); /* should not fail since memory was already reserved */
   75|   347k|        }
   76|   349k|    }
   77|       |
   78|       |    /* Within this loop, a color of 0 means "uncolored", and valid color indices start at 1.
   79|       |     * At the beginning, all vertices are set as "uncolored", see the vector_int_fill() call above.
   80|       |     * Colors will be decremented to start at 0 later. */
   81|   349k|    while (true) {
   82|   349k|        IGRAPH_CHECK(igraph_neighbors(graph, &neighbors, vertex, IGRAPH_ALL));
  ------------------
  |  |  648|   349k|    do { \
  |  |  649|   349k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   349k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   349k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 349k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   349k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   83|   349k|        igraph_integer_t nei_count = igraph_vector_int_size(&neighbors);
   84|       |
   85|       |        /* Colour current vertex by finding the smallest available non-0 color.
   86|       |         * Note that self-loops are effectively skipped as they merely prevent
   87|       |         * the current vertex from being colored with the color value it presently
   88|       |         * has, which is 0 (meaning uncolored). */
   89|   349k|        {
   90|   349k|            igraph_integer_t col;
   91|       |
   92|   349k|            IGRAPH_CHECK(igraph_vector_int_resize(&nei_colors, nei_count));
  ------------------
  |  |  648|   349k|    do { \
  |  |  649|   349k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   349k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   349k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 349k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   349k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   93|   498k|            for (i = 0; i < nei_count; ++i) {
  ------------------
  |  Branch (93:25): [True: 149k, False: 349k]
  ------------------
   94|   149k|                VECTOR(nei_colors)[i] = VECTOR(*colors)[ VECTOR(neighbors)[i] ];
  ------------------
  |  |   65|   149k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(nei_colors)[i] = VECTOR(*colors)[ VECTOR(neighbors)[i] ];
  ------------------
  |  |   65|   149k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(nei_colors)[i] = VECTOR(*colors)[ VECTOR(neighbors)[i] ];
  ------------------
  |  |   65|   149k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   95|   149k|            }
   96|   349k|            igraph_vector_int_sort(&nei_colors);
   97|       |
   98|   349k|            i = 0;
   99|   349k|            col = 0;
  100|   386k|            do {
  101|   521k|                while (i < nei_count && VECTOR(nei_colors)[i] == col) {
  ------------------
  |  |   65|   184k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (101:24): [True: 184k, False: 337k]
  |  Branch (101:41): [True: 135k, False: 49.0k]
  ------------------
  102|   135k|                    i++;
  103|   135k|                }
  104|   386k|                col++;
  105|   386k|            } while (i < nei_count && VECTOR(nei_colors)[i] == col);
  ------------------
  |  |   65|  49.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (105:22): [True: 49.0k, False: 337k]
  |  Branch (105:39): [True: 36.9k, False: 12.0k]
  ------------------
  106|       |
  107|   349k|            VECTOR(*colors)[vertex] = col;
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  108|   349k|        }
  109|       |
  110|       |        /* increment number of coloured neighbours for each neighbour of vertex */
  111|   498k|        for (i = 0; i < nei_count; ++i) {
  ------------------
  |  Branch (111:21): [True: 149k, False: 349k]
  ------------------
  112|   149k|            igraph_integer_t idx = VECTOR(neighbors)[i];
  ------------------
  |  |   65|   149k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  113|   149k|            if (igraph_2wheap_has_elem(&cn, idx)) {
  ------------------
  |  Branch (113:17): [True: 59.7k, False: 89.3k]
  ------------------
  114|  59.7k|                igraph_2wheap_modify(&cn, idx, igraph_2wheap_get(&cn, idx) + 1);
  115|  59.7k|            }
  116|   149k|        }
  117|       |
  118|       |        /* stop if no more vertices left to colour */
  119|   349k|        if (igraph_2wheap_empty(&cn)) {
  ------------------
  |  Branch (119:13): [True: 2.01k, False: 347k]
  ------------------
  120|  2.01k|            break;
  121|  2.01k|        }
  122|       |
  123|   347k|        igraph_2wheap_delete_max_index(&cn, &vertex);
  124|       |
  125|   347k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|   347k|    do { \
  |  |   48|   347k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 347k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|   347k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  126|   347k|    }
  127|       |
  128|       |    /* subtract 1 from each colour value, so that colours start at 0 */
  129|  2.01k|    igraph_vector_int_add_constant(colors, -1);
  130|       |
  131|       |    /* free data structures */
  132|  2.01k|    igraph_vector_int_destroy(&neighbors);
  133|  2.01k|    igraph_vector_int_destroy(&nei_colors);
  134|  2.01k|    igraph_2wheap_destroy(&cn);
  135|  2.01k|    IGRAPH_FINALLY_CLEAN(3);
  136|       |
  137|  2.01k|    return IGRAPH_SUCCESS;
  138|  2.01k|}
coloring.c:igraph_i_vertex_coloring_dsatur:
  214|  2.02k|) {
  215|  2.02k|    igraph_integer_t vcount = igraph_vcount(graph);
  216|  2.02k|    IGRAPH_CHECK(igraph_vector_int_resize(colors, vcount));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  217|       |
  218|  2.02k|    if (vcount == 0) {
  ------------------
  |  Branch (218:9): [True: 1, False: 2.02k]
  ------------------
  219|      1|        return IGRAPH_SUCCESS;
  220|      1|    }
  221|       |
  222|  2.02k|    if (vcount == 1) {
  ------------------
  |  Branch (222:9): [True: 14, False: 2.01k]
  ------------------
  223|     14|        VECTOR(*colors)[0] = 0;
  ------------------
  |  |   65|     14|#define VECTOR(v) ((v).stor_begin)
  ------------------
  224|     14|        return IGRAPH_SUCCESS;
  225|     14|    }
  226|       |
  227|  2.01k|    igraph_vector_int_fill(colors, -1); /* -1 as a color means uncolored */
  228|       |
  229|       |    /* Multi-edges and self-loops are removed from the adjacency list in order to ensure the correct
  230|       |     * updating of a vertex's neighbors' saturation degrees when that vertex is colored. */
  231|  2.01k|    igraph_adjlist_t adjlist;
  232|  2.01k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, IGRAPH_ALL, IGRAPH_NO_LOOPS, IGRAPH_NO_MULTIPLE));
  ------------------
  |  |  648|  2.01k|    do { \
  |  |  649|  2.01k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.01k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  233|  2.01k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  591|  2.01k|    do { \
  |  |  592|  2.01k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.01k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.01k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.01k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.01k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  234|       |
  235|  2.01k|    igraph_gen2wheap_t node_degrees_heap;
  236|  2.01k|    IGRAPH_CHECK(igraph_gen2wheap_init(&node_degrees_heap, dsatur_t_compare, sizeof(dsatur_t), vcount));
  ------------------
  |  |  648|  2.01k|    do { \
  |  |  649|  2.01k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.01k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  237|  2.01k|    IGRAPH_FINALLY(igraph_gen2wheap_destroy, &node_degrees_heap);
  ------------------
  |  |  591|  2.01k|    do { \
  |  |  592|  2.01k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.01k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.01k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.01k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.01k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  238|       |
  239|   351k|    for (igraph_integer_t vertex = 0; vertex < vcount; vertex++) {
  ------------------
  |  Branch (239:39): [True: 349k, False: 2.01k]
  ------------------
  240|   349k|        dsatur_t dsatur;
  241|   349k|        dsatur.saturation_degree = 0;
  242|   349k|        dsatur.edge_degree = igraph_vector_int_size(igraph_adjlist_get(&adjlist, vertex));
  ------------------
  |  |   78|   349k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_integer_t)(no)])
  ------------------
  243|   349k|        IGRAPH_CHECK(igraph_gen2wheap_push_with_index(&node_degrees_heap, vertex, &dsatur));
  ------------------
  |  |  648|   349k|    do { \
  |  |  649|   349k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   349k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   349k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 349k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   349k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  244|   349k|    }
  245|       |
  246|  2.01k|    igraph_vector_int_t used_colors_sorted;
  247|  2.01k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&used_colors_sorted, 0);
  ------------------
  |  |  124|  2.01k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.01k|    do { \
  |  |  |  |  649|  2.01k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.01k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.01k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.01k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.01k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.01k|    do { \
  |  |  |  |  592|  2.01k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.01k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.01k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.01k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.01k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.01k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  248|       |
  249|   351k|    while (! igraph_gen2wheap_empty(&node_degrees_heap)) {
  ------------------
  |  Branch (249:12): [True: 349k, False: 2.01k]
  ------------------
  250|   349k|        igraph_integer_t node_to_color = igraph_gen2wheap_max_index(&node_degrees_heap);
  251|   349k|        igraph_vector_int_t *neighbors = igraph_adjlist_get(&adjlist, node_to_color);
  ------------------
  |  |   78|   349k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_integer_t)(no)])
  ------------------
  252|   349k|        igraph_integer_t nei_count = igraph_vector_int_size(neighbors);
  253|   349k|        igraph_vector_int_clear(&used_colors_sorted);
  254|   451k|        for (igraph_integer_t i=0; i < nei_count; i++) {
  ------------------
  |  Branch (254:36): [True: 101k, False: 349k]
  ------------------
  255|   101k|            igraph_integer_t nei = VECTOR(*neighbors)[i];
  ------------------
  |  |   65|   101k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  256|   101k|            if (VECTOR(*colors)[nei] != -1) {
  ------------------
  |  |   65|   101k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (256:17): [True: 50.9k, False: 50.9k]
  ------------------
  257|  50.9k|                IGRAPH_CHECK(igraph_vector_int_push_back(&used_colors_sorted, VECTOR(*colors)[nei]));
  ------------------
  |  |  648|  50.9k|    do { \
  |  |  649|  50.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  50.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  50.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 50.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  50.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  258|  50.9k|            }
  259|   101k|        }
  260|   349k|        igraph_vector_int_sort(&used_colors_sorted);
  261|   349k|        igraph_integer_t color = dsatur_get_first_viable_color(&used_colors_sorted);
  262|   349k|        dsatur_update_heap(&adjlist, &node_degrees_heap, neighbors, colors, color);
  263|   349k|        VECTOR(*colors)[node_to_color] = color;
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  264|       |
  265|   349k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|   349k|    do { \
  |  |   48|   349k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 349k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|   349k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  266|   349k|    }
  267|       |
  268|  2.01k|    igraph_vector_int_destroy(&used_colors_sorted);
  269|  2.01k|    igraph_gen2wheap_destroy(&node_degrees_heap);
  270|  2.01k|    igraph_adjlist_destroy(&adjlist);
  271|  2.01k|    IGRAPH_FINALLY_CLEAN(3);
  272|       |
  273|  2.01k|    return IGRAPH_SUCCESS;
  274|  2.01k|}
coloring.c:dsatur_t_compare:
  147|  2.89M|static int dsatur_t_compare(const void *left, const void *right) {
  148|  2.89M|    const dsatur_t *left_d  = left;
  149|  2.89M|    const dsatur_t *right_d = right;
  150|  2.89M|    if (left_d->saturation_degree == right_d->saturation_degree) {
  ------------------
  |  Branch (150:9): [True: 2.61M, False: 286k]
  ------------------
  151|  2.61M|        if (left_d->edge_degree == right_d->edge_degree) {
  ------------------
  |  Branch (151:13): [True: 2.04M, False: 561k]
  ------------------
  152|  2.04M|            return 0;
  153|  2.04M|        } else if (left_d->edge_degree > right_d->edge_degree) {
  ------------------
  |  Branch (153:20): [True: 110k, False: 450k]
  ------------------
  154|   110k|            return 1;
  155|   450k|        } else {
  156|   450k|            return -1;
  157|   450k|        }
  158|  2.61M|    }
  159|   286k|    return left_d->saturation_degree > right_d->saturation_degree ? 1 : -1;
  ------------------
  |  Branch (159:12): [True: 122k, False: 163k]
  ------------------
  160|  2.89M|}
coloring.c:dsatur_get_first_viable_color:
  199|   349k|static igraph_integer_t dsatur_get_first_viable_color(const igraph_vector_int_t *used_colors_sorted) {
  200|   349k|    igraph_integer_t color_count = igraph_vector_int_size(used_colors_sorted);
  201|   349k|    igraph_integer_t i = 0;
  202|   349k|    igraph_integer_t col = 0;
  203|   387k|    while (i < color_count && VECTOR(*used_colors_sorted)[i] == col) {
  ------------------
  |  |   65|  48.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (203:12): [True: 48.9k, False: 338k]
  |  Branch (203:31): [True: 37.9k, False: 11.0k]
  ------------------
  204|  77.2k|        while (i < color_count && VECTOR(*used_colors_sorted)[i] == col) {
  ------------------
  |  |   65|  41.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (204:16): [True: 41.3k, False: 35.8k]
  |  Branch (204:35): [True: 39.2k, False: 2.05k]
  ------------------
  205|  39.2k|            i++;
  206|  39.2k|        }
  207|  37.9k|        col++;
  208|  37.9k|    }
  209|   349k|    return  col;
  210|   349k|}
coloring.c:dsatur_update_heap:
  182|   349k|) {
  183|   349k|    igraph_gen2wheap_delete_max(node_degrees_heap);
  184|   349k|    igraph_integer_t nei_count = igraph_vector_int_size(neighbors);
  185|   451k|    for (igraph_integer_t i=0; i < nei_count; i++) {
  ------------------
  |  Branch (185:32): [True: 101k, False: 349k]
  ------------------
  186|   101k|        igraph_integer_t nei = VECTOR(*neighbors)[i];
  ------------------
  |  |   65|   101k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  187|   101k|        if (!igraph_gen2wheap_has_elem(node_degrees_heap, nei)) {
  ------------------
  |  Branch (187:13): [True: 50.9k, False: 50.9k]
  ------------------
  188|  50.9k|            continue;
  189|  50.9k|        }
  190|  50.9k|        dsatur_t deg_data = *((dsatur_t*) igraph_gen2wheap_get(node_degrees_heap, nei));
  191|  50.9k|        if (!dsatur_is_color_used_by_neighbour(colors, color, igraph_adjlist_get(adjlist, nei))) {
  ------------------
  |  |   78|  50.9k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_integer_t)(no)])
  ------------------
  |  Branch (191:13): [True: 49.2k, False: 1.63k]
  ------------------
  192|  49.2k|            deg_data.saturation_degree++;
  193|  49.2k|        }
  194|  50.9k|        deg_data.edge_degree--;
  195|  50.9k|        igraph_gen2wheap_modify(node_degrees_heap, nei, &deg_data);
  196|  50.9k|    }
  197|   349k|}
coloring.c:dsatur_is_color_used_by_neighbour:
  165|  50.9k|) {
  166|  50.9k|    igraph_integer_t nei_count = igraph_vector_int_size(neighbors);
  167|       |
  168|   136k|    for (igraph_integer_t i=0; i < nei_count; i++) {
  ------------------
  |  Branch (168:32): [True: 87.4k, False: 49.2k]
  ------------------
  169|  87.4k|        igraph_integer_t nei = VECTOR(*neighbors)[i];
  ------------------
  |  |   65|  87.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  170|  87.4k|        if (VECTOR(*colors)[nei] == color) {
  ------------------
  |  |   65|  87.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (170:13): [True: 1.63k, False: 85.8k]
  ------------------
  171|  1.63k|            return true;
  172|  1.63k|        }
  173|  87.4k|    }
  174|       |
  175|  49.2k|    return false;
  176|  50.9k|}

igraph_get_edgelist:
  307|    769|igraph_error_t igraph_get_edgelist(const igraph_t *graph, igraph_vector_int_t *res, igraph_bool_t bycol) {
  308|       |
  309|    769|    igraph_eit_t edgeit;
  310|    769|    igraph_integer_t no_of_edges = igraph_ecount(graph);
  311|    769|    igraph_integer_t vptr = 0;
  312|    769|    igraph_integer_t from, to;
  313|       |
  314|    769|    IGRAPH_CHECK(igraph_vector_int_resize(res, no_of_edges * 2));
  ------------------
  |  |  648|    769|    do { \
  |  |  649|    769|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    769|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    769|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 769]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    769|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  315|    769|    IGRAPH_CHECK(igraph_eit_create(graph, igraph_ess_all(IGRAPH_EDGEORDER_ID),
  ------------------
  |  |  648|    769|    do { \
  |  |  649|    769|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    769|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    769|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 769]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    769|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  316|    769|                                   &edgeit));
  317|    769|    IGRAPH_FINALLY(igraph_eit_destroy, &edgeit);
  ------------------
  |  |  591|    769|    do { \
  |  |  592|    769|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    769|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    769|         * incorrect destructor function with the pointer */ \
  |  |  595|    769|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    769|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    769|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  318|       |
  319|    769|    if (bycol) {
  ------------------
  |  Branch (319:9): [True: 0, False: 769]
  ------------------
  320|      0|        while (!IGRAPH_EIT_END(edgeit)) {
  ------------------
  |  |  370|      0|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
  |  Branch (320:16): [True: 0, False: 0]
  ------------------
  321|      0|            igraph_edge(graph, IGRAPH_EIT_GET(edgeit), &from, &to);
  ------------------
  |  |  404|      0|    (igraph_integer_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (404:25): [True: 0, False: 0]
  |  |  ------------------
  |  |  405|      0|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  322|      0|            VECTOR(*res)[vptr] = from;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  323|      0|            VECTOR(*res)[vptr + no_of_edges] = to;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  324|      0|            vptr++;
  325|      0|            IGRAPH_EIT_NEXT(edgeit);
  ------------------
  |  |  358|      0|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  326|      0|        }
  327|    769|    } else {
  328|  45.4k|        while (!IGRAPH_EIT_END(edgeit)) {
  ------------------
  |  |  370|  45.4k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
  |  Branch (328:16): [True: 44.6k, False: 769]
  ------------------
  329|  44.6k|            igraph_edge(graph, IGRAPH_EIT_GET(edgeit), &from, &to);
  ------------------
  |  |  404|  44.6k|    (igraph_integer_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (404:25): [True: 44.6k, False: 0]
  |  |  ------------------
  |  |  405|  44.6k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  330|  44.6k|            VECTOR(*res)[vptr++] = from;
  ------------------
  |  |   65|  44.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  331|  44.6k|            VECTOR(*res)[vptr++] = to;
  ------------------
  |  |   65|  44.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  332|  44.6k|            IGRAPH_EIT_NEXT(edgeit);
  ------------------
  |  |  358|  44.6k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  333|  44.6k|        }
  334|    769|    }
  335|       |
  336|    769|    igraph_eit_destroy(&edgeit);
  337|    769|    IGRAPH_FINALLY_CLEAN(1);
  338|    769|    return IGRAPH_SUCCESS;
  339|    769|}
igraph_to_prufer:
  917|    175|igraph_error_t igraph_to_prufer(const igraph_t *graph, igraph_vector_int_t* prufer) {
  918|       |    /* For generating the Prüfer sequence, we enumerate the vertices u of the tree.
  919|       |       We keep track of the degrees of all vertices, treating vertices
  920|       |       of degree 0 as removed. We maintain the invariant that all leafs
  921|       |       that are still contained in the tree are >= u.
  922|       |       If u is a leaf, we remove it and add its unique neighbor to the Prüfer
  923|       |       sequence. If the removal of u turns the neighbor into a leaf which is < u,
  924|       |       we repeat the procedure for the new leaf and so on. */
  925|    175|    igraph_integer_t u;
  926|    175|    igraph_vector_int_t degrees;
  927|    175|    igraph_vector_int_t neighbors;
  928|    175|    igraph_integer_t prufer_index = 0;
  929|    175|    igraph_integer_t n = igraph_vcount(graph);
  930|    175|    igraph_bool_t is_tree = false;
  931|       |
  932|    175|    IGRAPH_CHECK(igraph_is_tree(graph, &is_tree, NULL, IGRAPH_ALL));
  ------------------
  |  |  648|    175|    do { \
  |  |  649|    175|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    175|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    175|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 175]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    175|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  933|       |
  934|    175|    if (!is_tree) {
  ------------------
  |  Branch (934:9): [True: 0, False: 175]
  ------------------
  935|      0|        IGRAPH_ERROR("The graph must be a tree", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  936|      0|    }
  937|       |
  938|    175|    if (n < 2) {
  ------------------
  |  Branch (938:9): [True: 0, False: 175]
  ------------------
  939|      0|        IGRAPH_ERROR("The tree must have at least 2 vertices", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  940|      0|    }
  941|       |
  942|    175|    IGRAPH_CHECK(igraph_vector_int_resize(prufer, n - 2));
  ------------------
  |  |  648|    175|    do { \
  |  |  649|    175|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    175|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    175|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 175]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    175|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  943|    175|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, n);
  ------------------
  |  |  124|    175|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    175|    do { \
  |  |  |  |  649|    175|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    175|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    175|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 175]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    175|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    175|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    175|    do { \
  |  |  |  |  592|    175|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    175|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    175|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    175|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    175|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    175|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  944|    175|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neighbors, 1);
  ------------------
  |  |  124|    175|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    175|    do { \
  |  |  |  |  649|    175|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    175|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    175|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 175]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    175|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    175|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    175|    do { \
  |  |  |  |  592|    175|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    175|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    175|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    175|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    175|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    175|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  945|       |
  946|    175|    IGRAPH_CHECK(igraph_degree(graph, &degrees, igraph_vss_all(), IGRAPH_ALL, IGRAPH_NO_LOOPS));
  ------------------
  |  |  648|    175|    do { \
  |  |  649|    175|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    175|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    175|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 175]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    175|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  947|       |
  948|  4.34k|    for (u = 0; u < n; ++u) {
  ------------------
  |  Branch (948:17): [True: 4.17k, False: 175]
  ------------------
  949|  4.17k|        igraph_integer_t degree = VECTOR(degrees)[u];
  ------------------
  |  |   65|  4.17k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  950|  4.17k|        igraph_integer_t leaf = u;
  951|       |
  952|  8.16k|        while (degree == 1 && leaf <= u) {
  ------------------
  |  Branch (952:16): [True: 4.22k, False: 3.94k]
  |  Branch (952:31): [True: 3.99k, False: 224]
  ------------------
  953|  3.99k|            igraph_integer_t neighbor = 0;
  954|  3.99k|            igraph_integer_t neighbor_count = 0;
  955|       |
  956|  3.99k|            VECTOR(degrees)[leaf] = 0; /* mark leaf v as deleted */
  ------------------
  |  |   65|  3.99k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  957|       |
  958|  3.99k|            IGRAPH_CHECK(igraph_neighbors(graph, &neighbors, leaf, IGRAPH_ALL));
  ------------------
  |  |  648|  3.99k|    do { \
  |  |  649|  3.99k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  3.99k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  3.99k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 3.99k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  3.99k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  959|       |
  960|       |            /* Find the unique remaining neighbor of the leaf */
  961|  3.99k|            neighbor_count = igraph_vector_int_size(&neighbors);
  962|  6.00k|            for (igraph_integer_t i = 0; i < neighbor_count; i++) {
  ------------------
  |  Branch (962:42): [True: 6.00k, False: 0]
  ------------------
  963|  6.00k|                neighbor = VECTOR(neighbors)[i];
  ------------------
  |  |   65|  6.00k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  964|  6.00k|                if (VECTOR(degrees)[neighbor] > 0) {
  ------------------
  |  |   65|  6.00k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (964:21): [True: 3.99k, False: 2.00k]
  ------------------
  965|  3.99k|                    break;
  966|  3.99k|                }
  967|  6.00k|            }
  968|       |
  969|       |            /* remember that we have removed the leaf */
  970|  3.99k|            VECTOR(degrees)[neighbor]--;
  ------------------
  |  |   65|  3.99k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  971|  3.99k|            degree = VECTOR(degrees)[neighbor];
  ------------------
  |  |   65|  3.99k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  972|       |
  973|       |            /* Add the neighbor to the prufer sequence unless it is the last vertex
  974|       |            (i.e. degree == 0) */
  975|  3.99k|            if (degree > 0) {
  ------------------
  |  Branch (975:17): [True: 3.82k, False: 175]
  ------------------
  976|  3.82k|                VECTOR(*prufer)[prufer_index] = neighbor;
  ------------------
  |  |   65|  3.82k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  977|  3.82k|                prufer_index++;
  978|  3.82k|            }
  979|  3.99k|            leaf = neighbor;
  980|  3.99k|        }
  981|  4.17k|    }
  982|       |
  983|    175|    igraph_vector_int_destroy(&degrees);
  984|    175|    igraph_vector_int_destroy(&neighbors);
  985|    175|    IGRAPH_FINALLY_CLEAN(2);
  986|       |
  987|    175|    return IGRAPH_SUCCESS;
  988|    175|}

igraph_realize_degree_sequence:
  798|  31.2k|{
  799|  31.2k|    bool directed = indeg != NULL;
  800|       |
  801|  31.2k|    if (directed) {
  ------------------
  |  Branch (801:9): [True: 0, False: 31.2k]
  ------------------
  802|      0|        return igraph_i_realize_directed_degree_sequence(graph, outdeg, indeg, allowed_edge_types, method);
  803|  31.2k|    } else {
  804|  31.2k|        return igraph_i_realize_undirected_degree_sequence(graph, outdeg, allowed_edge_types, method);
  805|  31.2k|    }
  806|  31.2k|}
degree_sequence.cpp:_ZL43igraph_i_realize_undirected_degree_sequenceP8igraph_tPK19igraph_vector_int_tj23igraph_realize_degseq_t:
  518|  31.2k|    igraph_realize_degseq_t method) {
  519|  31.2k|    igraph_integer_t node_count = igraph_vector_int_size(deg);
  520|  31.2k|    igraph_integer_t deg_sum;
  521|       |
  522|  31.2k|    IGRAPH_CHECK(igraph_i_safe_vector_int_sum(deg, &deg_sum));
  ------------------
  |  |  648|  31.2k|    do { \
  |  |  649|  31.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  31.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  31.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 31.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  31.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  523|       |
  524|  31.2k|    if (deg_sum % 2 != 0) {
  ------------------
  |  Branch (524:9): [True: 0, False: 31.2k]
  ------------------
  525|      0|        IGRAPH_ERROR("The sum of degrees must be even for an undirected graph.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  526|      0|    }
  527|       |
  528|  31.2k|    if (node_count > 0 && igraph_vector_int_min(deg) < 0) {
  ------------------
  |  Branch (528:9): [True: 31.2k, False: 18]
  |  Branch (528:27): [True: 0, False: 31.2k]
  ------------------
  529|      0|        IGRAPH_ERROR("Vertex degrees must be non-negative.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  530|      0|    }
  531|       |
  532|  31.2k|    igraph_vector_int_t edges;
  533|  31.2k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, deg_sum);
  ------------------
  |  |  124|  31.2k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  31.2k|    do { \
  |  |  |  |  649|  31.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  31.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  31.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 31.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  31.2k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  31.2k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  31.2k|    do { \
  |  |  |  |  592|  31.2k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  31.2k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  31.2k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  31.2k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  31.2k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  31.2k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  534|       |
  535|  31.2k|    IGRAPH_HANDLE_EXCEPTIONS_BEGIN;
  ------------------
  |  |   21|  31.2k|    try {
  ------------------
  536|  31.2k|    if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) && (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW ) )
  ------------------
  |  |   30|  12.1k|#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 ) )
  ------------------
  |  |   31|  12.1k|#define IGRAPH_I_MULTI_LOOPS_SW 0x04 /* 100, more than one self-loop allowed on the same vertex   */
  ------------------
  |  Branch (536:10): [True: 12.1k, False: 19.1k]
  |  Branch (536:52): [True: 12.1k, False: 0]
  |  Branch (536:102): [True: 12.1k, False: 0]
  ------------------
  537|  12.1k|    {
  538|  12.1k|        switch (method) {
  539|  4.05k|        case IGRAPH_REALIZE_DEGSEQ_SMALLEST:
  ------------------
  |  Branch (539:9): [True: 4.05k, False: 8.11k]
  ------------------
  540|  4.05k|            IGRAPH_CHECK(igraph_i_realize_undirected_multi(deg, &edges, true, false));
  ------------------
  |  |  648|  4.05k|    do { \
  |  |  649|  4.05k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  4.05k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  4.05k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  4.05k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  541|  4.05k|            break;
  542|  4.05k|        case IGRAPH_REALIZE_DEGSEQ_LARGEST:
  ------------------
  |  Branch (542:9): [True: 4.05k, False: 8.11k]
  ------------------
  543|  4.05k|            IGRAPH_CHECK(igraph_i_realize_undirected_multi(deg, &edges, true, true));
  ------------------
  |  |  648|  4.05k|    do { \
  |  |  649|  4.05k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  4.05k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  4.05k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  4.05k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  544|  4.05k|            break;
  545|  4.05k|        case IGRAPH_REALIZE_DEGSEQ_INDEX:
  ------------------
  |  Branch (545:9): [True: 4.05k, False: 8.11k]
  ------------------
  546|  4.05k|            IGRAPH_CHECK(igraph_i_realize_undirected_multi_index(deg, &edges, true));
  ------------------
  |  |  648|  4.05k|    do { \
  |  |  649|  4.05k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  4.05k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  4.05k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  4.05k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  547|  4.05k|            break;
  548|  4.05k|        default:
  ------------------
  |  Branch (548:9): [True: 0, False: 12.1k]
  ------------------
  549|      0|            IGRAPH_ERROR("Invalid degree sequence realization method.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  550|  12.1k|        }
  551|  12.1k|    }
  552|  19.1k|    else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) )
  ------------------
  |  |   30|  19.1k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (552:15): [True: 19.1k, False: 0]
  |  Branch (552:59): [True: 9.93k, False: 9.19k]
  ------------------
  553|  9.93k|    {
  554|  9.93k|        switch (method) {
  555|  3.31k|        case IGRAPH_REALIZE_DEGSEQ_SMALLEST:
  ------------------
  |  Branch (555:9): [True: 3.31k, False: 6.62k]
  ------------------
  556|  3.31k|            IGRAPH_CHECK(igraph_i_realize_undirected_multi(deg, &edges, false, false));
  ------------------
  |  |  648|  3.31k|    do { \
  |  |  649|  3.31k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  3.31k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  3.31k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 375, False: 2.93k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|    375|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|    375|    do { \
  |  |  |  |  432|    375|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|    375|        return igraph_errno ; \
  |  |  |  |  434|    375|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|    375|        } \
  |  |  653|  3.31k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  557|  2.93k|            break;
  558|  3.31k|        case IGRAPH_REALIZE_DEGSEQ_LARGEST:
  ------------------
  |  Branch (558:9): [True: 3.31k, False: 6.62k]
  ------------------
  559|  3.31k|            IGRAPH_CHECK(igraph_i_realize_undirected_multi(deg, &edges, false, true));
  ------------------
  |  |  648|  3.31k|    do { \
  |  |  649|  3.31k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  3.31k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  3.31k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 375, False: 2.93k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|    375|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|    375|    do { \
  |  |  |  |  432|    375|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|    375|        return igraph_errno ; \
  |  |  |  |  434|    375|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|    375|        } \
  |  |  653|  3.31k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  560|  2.93k|            break;
  561|  3.31k|        case IGRAPH_REALIZE_DEGSEQ_INDEX:
  ------------------
  |  Branch (561:9): [True: 3.31k, False: 6.62k]
  ------------------
  562|  3.31k|            IGRAPH_CHECK(igraph_i_realize_undirected_multi_index(deg, &edges, false));
  ------------------
  |  |  648|  3.31k|    do { \
  |  |  649|  3.31k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  3.31k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  3.31k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 375, False: 2.93k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|    375|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|    375|    do { \
  |  |  |  |  432|    375|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|    375|        return igraph_errno ; \
  |  |  |  |  434|    375|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|    375|        } \
  |  |  653|  3.31k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  563|  2.93k|            break;
  564|  2.93k|        default:
  ------------------
  |  Branch (564:9): [True: 0, False: 9.93k]
  ------------------
  565|      0|            IGRAPH_ERROR("Invalid degree sequence realization method.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  566|  9.93k|        }
  567|  9.93k|    }
  568|  9.19k|    else if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) )
  ------------------
  |  |   31|      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) )
  ------------------
  |  |   30|      0|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (568:15): [True: 0, False: 9.19k]
  |  Branch (568:57): [True: 0, False: 0]
  |  Branch (568:109): [True: 0, False: 0]
  ------------------
  569|      0|    {
  570|      0|        IGRAPH_ERROR("Graph realization with at most one self-loop per vertex is not implemented.", IGRAPH_UNIMPLEMENTED);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  571|      0|    }
  572|  9.19k|    else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) )
  ------------------
  |  |   30|  9.19k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (572:15): [True: 9.19k, False: 0]
  |  Branch (572:59): [True: 9.19k, False: 0]
  ------------------
  573|  9.19k|    {
  574|  9.19k|        switch (method) {
  575|  3.06k|        case IGRAPH_REALIZE_DEGSEQ_SMALLEST:
  ------------------
  |  Branch (575:9): [True: 3.06k, False: 6.12k]
  ------------------
  576|  3.06k|            IGRAPH_CHECK(igraph_i_havel_hakimi(deg, &edges, false));
  ------------------
  |  |  648|  3.06k|    do { \
  |  |  649|  3.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  3.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  3.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 655, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|    655|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|    655|    do { \
  |  |  |  |  432|    655|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|    655|        return igraph_errno ; \
  |  |  |  |  434|    655|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|    655|        } \
  |  |  653|  3.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  577|  2.40k|            break;
  578|  3.06k|        case IGRAPH_REALIZE_DEGSEQ_LARGEST:
  ------------------
  |  Branch (578:9): [True: 3.06k, False: 6.12k]
  ------------------
  579|  3.06k|            IGRAPH_CHECK(igraph_i_havel_hakimi(deg, &edges, true));
  ------------------
  |  |  648|  3.06k|    do { \
  |  |  649|  3.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  3.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  3.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 655, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|    655|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|    655|    do { \
  |  |  |  |  432|    655|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|    655|        return igraph_errno ; \
  |  |  |  |  434|    655|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|    655|        } \
  |  |  653|  3.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  580|  2.40k|            break;
  581|  3.06k|        case IGRAPH_REALIZE_DEGSEQ_INDEX:
  ------------------
  |  Branch (581:9): [True: 3.06k, False: 6.12k]
  ------------------
  582|  3.06k|            IGRAPH_CHECK(igraph_i_havel_hakimi_index(deg, &edges));
  ------------------
  |  |  648|  3.06k|    do { \
  |  |  649|  3.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  3.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  3.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 655, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|    655|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|    655|    do { \
  |  |  |  |  432|    655|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|    655|        return igraph_errno ; \
  |  |  |  |  434|    655|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|    655|        } \
  |  |  653|  3.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  583|  2.40k|            break;
  584|  2.40k|        default:
  ------------------
  |  Branch (584:9): [True: 0, False: 9.19k]
  ------------------
  585|      0|            IGRAPH_ERROR("Invalid degree sequence realization method.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  586|  9.19k|        }
  587|  9.19k|    }
  588|      0|    else
  589|      0|    {
  590|       |        /* Remainig cases:
  591|       |         *  - At most one self-loop per vertex but multi-edges between distinct vertices allowed.
  592|       |         *  - At most one edge between distinct vertices but multi-self-loops allowed.
  593|       |         * These cases cannot currently be requested through the documented API,
  594|       |         * so no explanatory error message for now. */
  595|      0|        return IGRAPH_UNIMPLEMENTED;
  596|      0|    }
  597|  31.2k|    IGRAPH_HANDLE_EXCEPTIONS_END;
  ------------------
  |  |   23|  31.2k|    } \
  |  |   24|  31.2k|    catch (const std::bad_alloc &e) { IGRAPH_ERROR(e.what(), IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ } \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   25|  31.2k|    catch (const std::range_error &e) { IGRAPH_ERROR(e.what(), IGRAPH_EOVERFLOW); /* LCOV_EXCL_LINE */ } \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   26|  31.2k|    catch (const std::exception &e) { IGRAPH_ERROR(e.what(), IGRAPH_FAILURE); /* LCOV_EXCL_LINE */ } \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|  31.2k|    catch (...) { IGRAPH_ERROR("Unknown exception caught.", IGRAPH_FAILURE); /* LCOV_EXCL_LINE */ }
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  598|       |
  599|  28.2k|    IGRAPH_CHECK(igraph_create(graph, &edges, node_count, false));
  ------------------
  |  |  648|  28.2k|    do { \
  |  |  649|  28.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  28.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  28.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 28.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  28.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  600|       |
  601|  28.2k|    igraph_vector_int_destroy(&edges);
  602|  28.2k|    IGRAPH_FINALLY_CLEAN(1);
  603|       |
  604|  28.2k|    return IGRAPH_SUCCESS;
  605|  28.2k|}
degree_sequence.cpp:_ZL33igraph_i_realize_undirected_multiPK19igraph_vector_int_tPS_bb:
  219|  14.7k|static igraph_error_t igraph_i_realize_undirected_multi(const igraph_vector_int_t *deg, igraph_vector_int_t *edges, bool loops, bool largest) {
  220|  14.7k|    igraph_integer_t vcount = igraph_vector_int_size(deg);
  221|       |
  222|  14.7k|    if (vcount == 0) {
  ------------------
  |  Branch (222:9): [True: 8, False: 14.7k]
  ------------------
  223|      8|        return IGRAPH_SUCCESS;
  224|      8|    }
  225|       |
  226|  14.7k|    std::vector<vd_pair> vertices;
  227|  14.7k|    vertices.reserve(vcount);
  228|  2.57M|    for (igraph_integer_t i = 0; i < vcount; ++i) {
  ------------------
  |  Branch (228:34): [True: 2.56M, False: 14.7k]
  ------------------
  229|  2.56M|        igraph_integer_t d = VECTOR(*deg)[i];
  ------------------
  |  |   65|  2.56M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  230|  2.56M|        vertices.push_back(vd_pair(i, d));
  231|  2.56M|    }
  232|       |
  233|       |    // Initial sort in non-increasing order.
  234|  14.7k|    std::stable_sort(vertices.begin(), vertices.end(), degree_greater<vd_pair>);
  235|       |
  236|  14.7k|    igraph_integer_t ec = 0;
  237|  3.02M|    while (! vertices.empty()) {
  ------------------
  |  Branch (237:12): [True: 3.01M, False: 12.4k]
  ------------------
  238|       |        // Remove any zero degrees, and error on negative ones.
  239|       |
  240|  3.01M|        vd_pair &w = vertices.back();
  241|       |
  242|  3.01M|        if (w.degree == 0) {
  ------------------
  |  Branch (242:13): [True: 2.55M, False: 457k]
  ------------------
  243|  2.55M|            vertices.pop_back();
  244|  2.55M|            continue;
  245|  2.55M|        }
  246|       |
  247|       |        // If only one vertex remains, then the degree sequence cannot be realized as
  248|       |        // a loopless multigraph. We either complete the graph by adding loops on this vertex
  249|       |        // or throw an error, depending on the 'loops' setting.
  250|   457k|        if (vertices.size() == 1) {
  ------------------
  |  Branch (250:13): [True: 2.25k, False: 454k]
  ------------------
  251|  2.25k|            if (loops) {
  ------------------
  |  Branch (251:17): [True: 1.50k, False: 750]
  ------------------
  252|  48.7k|                for (igraph_integer_t i = 0; i < w.degree / 2; ++i) {
  ------------------
  |  Branch (252:46): [True: 47.2k, False: 1.50k]
  ------------------
  253|  47.2k|                    VECTOR(*edges)[2 * ec]   = w.vertex;
  ------------------
  |  |   65|  47.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  254|  47.2k|                    VECTOR(*edges)[2 * ec + 1] = w.vertex;
  ------------------
  |  |   65|  47.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  255|  47.2k|                    ec++;
  256|  47.2k|                }
  257|  1.50k|                break;
  258|  1.50k|            } else {
  259|    750|                IGRAPH_ERROR("The given degree sequence cannot be realized as a loopless multigraph.", IGRAPH_EINVAL);
  ------------------
  |  |  431|    750|    do { \
  |  |  432|    750|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|    750|        return igraph_errno ; \
  |  |  434|    750|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  260|    750|            }
  261|  2.25k|        }
  262|       |
  263|       |        // At this point we are guaranteed to have at least two remaining vertices.
  264|       |
  265|   454k|        vd_pair *u, *v;
  266|   454k|        if (largest) {
  ------------------
  |  Branch (266:13): [True: 227k, False: 227k]
  ------------------
  267|   227k|            u = &vertices[0];
  268|   227k|            v = &vertices[1];
  269|   227k|        } else {
  270|   227k|            u = &vertices.front();
  271|   227k|            v = &vertices.back();
  272|   227k|        }
  273|       |
  274|   454k|        u->degree -= 1;
  275|   454k|        v->degree -= 1;
  276|       |
  277|   454k|        VECTOR(*edges)[2*ec]   = u->vertex;
  ------------------
  |  |   65|   454k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  278|   454k|        VECTOR(*edges)[2*ec+1] = v->vertex;
  ------------------
  |  |   65|   454k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  279|   454k|        ec++;
  280|       |
  281|       |        // Now the first element may be out of order.
  282|       |        // If largest=true, the first two elements may be out of order.
  283|       |        // Restore the sorted order using a single step of bubble sort.
  284|   454k|        if (largest) {
  ------------------
  |  Branch (284:13): [True: 227k, False: 227k]
  ------------------
  285|   227k|            bubble_up(vertices.begin() + 1, vertices.end(), degree_greater<vd_pair>);
  286|   227k|        }
  287|   454k|        bubble_up(vertices.begin(), vertices.end(), degree_greater<vd_pair>);
  288|   454k|    }
  289|       |
  290|  13.9k|    return IGRAPH_SUCCESS;
  291|  14.7k|}
degree_sequence.cpp:_ZL9bubble_upINSt3__111__wrap_iterIP7vd_pairEEPFbRKS2_S6_EEvT_S9_T0_:
  195|   682k|static void bubble_up(It first, It last, Compare comp) {
  196|   682k|    if (first == last) {
  ------------------
  |  Branch (196:9): [True: 0, False: 682k]
  ------------------
  197|      0|        return;
  198|      0|    }
  199|   682k|    It it = first;
  200|   682k|    it++;
  201|  24.4M|    while (it != last) {
  ------------------
  |  Branch (201:12): [True: 24.1M, False: 336k]
  ------------------
  202|  24.1M|        if (comp(*first, *it)) {
  ------------------
  |  Branch (202:13): [True: 345k, False: 23.7M]
  ------------------
  203|   345k|            break;
  204|  23.7M|        } else {
  205|  23.7M|            std::swap(*first, *it);
  206|  23.7M|        }
  207|  23.7M|        first = it;
  208|  23.7M|        it++;
  209|  23.7M|    }
  210|   682k|}
degree_sequence.cpp:_ZL39igraph_i_realize_undirected_multi_indexPK19igraph_vector_int_tPS_b:
  294|  7.36k|static igraph_error_t igraph_i_realize_undirected_multi_index(const igraph_vector_int_t *deg, igraph_vector_int_t *edges, bool loops) {
  295|  7.36k|    igraph_integer_t vcount = igraph_vector_int_size(deg);
  296|       |
  297|  7.36k|    if (vcount == 0) {
  ------------------
  |  Branch (297:9): [True: 4, False: 7.36k]
  ------------------
  298|      4|        return IGRAPH_SUCCESS;
  299|      4|    }
  300|       |
  301|  7.36k|    typedef std::list<vd_pair> vlist;
  302|  7.36k|    vlist vertices;
  303|  1.28M|    for (igraph_integer_t i = 0; i < vcount; ++i) {
  ------------------
  |  Branch (303:34): [True: 1.28M, False: 7.36k]
  ------------------
  304|  1.28M|        vertices.push_back(vd_pair(i, VECTOR(*deg)[i]));
  ------------------
  |  |   65|  1.28M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  305|  1.28M|    }
  306|       |
  307|  7.36k|    std::vector<vlist::iterator> pointers;
  308|  7.36k|    pointers.reserve(vcount);
  309|  1.28M|    for (auto it = vertices.begin(); it != vertices.end(); ++it) {
  ------------------
  |  Branch (309:38): [True: 1.28M, False: 7.36k]
  ------------------
  310|  1.28M|        pointers.push_back(it);
  311|  1.28M|    }
  312|       |
  313|       |    // Initial sort
  314|  7.36k|    vertices.sort(degree_greater<vd_pair>);
  315|       |
  316|  7.36k|    igraph_integer_t ec = 0;
  317|  1.20M|    for (const auto &pt : pointers) {
  ------------------
  |  Branch (317:25): [True: 1.20M, False: 6.24k]
  ------------------
  318|  1.20M|        vd_pair vd = *pt;
  319|  1.20M|        vertices.erase(pt);
  320|       |
  321|  1.42M|        while (vd.degree > 0) {
  ------------------
  |  Branch (321:16): [True: 228k, False: 1.20M]
  ------------------
  322|   228k|            auto uit = vertices.begin();
  323|       |
  324|   228k|            if (vertices.empty() || uit->degree == 0) {
  ------------------
  |  Branch (324:17): [True: 339, False: 228k]
  |  Branch (324:37): [True: 786, False: 227k]
  ------------------
  325|       |                // We are out of non-zero degree vertices to connect to.
  326|  1.12k|                if (loops) {
  ------------------
  |  Branch (326:21): [True: 750, False: 375]
  ------------------
  327|  24.3k|                    for (igraph_integer_t i = 0; i < vd.degree / 2; ++i) {
  ------------------
  |  Branch (327:50): [True: 23.6k, False: 750]
  ------------------
  328|  23.6k|                        VECTOR(*edges)[2 * ec]   = vd.vertex;
  ------------------
  |  |   65|  23.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  329|  23.6k|                        VECTOR(*edges)[2 * ec + 1] = vd.vertex;
  ------------------
  |  |   65|  23.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  330|  23.6k|                        ec++;
  331|  23.6k|                    }
  332|    750|                    return IGRAPH_SUCCESS;
  333|    750|                } else {
  334|    375|                    IGRAPH_ERROR("The given degree sequence cannot be realized as a loopless multigraph.", IGRAPH_EINVAL);
  ------------------
  |  |  431|    375|    do { \
  |  |  432|    375|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|    375|        return igraph_errno ; \
  |  |  434|    375|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  335|    375|                }
  336|  1.12k|            }
  337|       |
  338|   227k|            vd.degree   -= 1;
  339|   227k|            uit->degree -= 1;
  340|       |
  341|   227k|            VECTOR(*edges)[2*ec]   = vd.vertex;
  ------------------
  |  |   65|   227k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  342|   227k|            VECTOR(*edges)[2*ec+1] = uit->vertex;
  ------------------
  |  |   65|   227k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  343|   227k|            ec++;
  344|       |
  345|       |            // If there are at least two elements, and the first two are not in order,
  346|       |            // re-sort the list. A possible optimization would be a version of
  347|       |            // bubble_up() that can exchange list nodes instead of swapping their values.
  348|   227k|            if (vertices.size() > 1) {
  ------------------
  |  Branch (348:17): [True: 221k, False: 6.20k]
  ------------------
  349|   221k|                auto wit = uit;
  350|   221k|                ++wit;
  351|       |
  352|   221k|                if (wit->degree > uit->degree) {
  ------------------
  |  Branch (352:21): [True: 156k, False: 64.9k]
  ------------------
  353|   156k|                    vertices.sort(degree_greater<vd_pair>);
  354|   156k|                }
  355|   221k|            }
  356|   227k|        }
  357|  1.20M|    }
  358|       |
  359|  6.24k|    return IGRAPH_SUCCESS;
  360|  7.36k|}
degree_sequence.cpp:_ZL21igraph_i_havel_hakimiPK19igraph_vector_int_tPS_b:
   74|  6.12k|static igraph_error_t igraph_i_havel_hakimi(const igraph_vector_int_t *deg, igraph_vector_int_t *edges, bool largest) {
   75|  6.12k|    igraph_integer_t n = igraph_vector_int_size(deg);
   76|       |
   77|  6.12k|    igraph_integer_t ec = 0; // number of edges added so far
   78|       |
   79|  6.12k|    std::vector<vd_pair> vertices;
   80|  6.12k|    vertices.reserve(n);
   81|  1.08M|    for (igraph_integer_t i = 0; i < n; ++i) {
  ------------------
  |  Branch (81:34): [True: 1.08M, False: 6.12k]
  ------------------
   82|  1.08M|        vertices.push_back(vd_pair(i, VECTOR(*deg)[i]));
  ------------------
  |  |   65|  1.08M|#define VECTOR(v) ((v).stor_begin)
  ------------------
   83|  1.08M|    }
   84|       |
   85|   999k|    while (! vertices.empty()) {
  ------------------
  |  Branch (85:12): [True: 994k, False: 4.81k]
  ------------------
   86|   994k|        if (largest) {
  ------------------
  |  Branch (86:13): [True: 454k, False: 540k]
  ------------------
   87|   454k|            std::stable_sort(vertices.begin(), vertices.end(), degree_less<vd_pair>);
   88|   540k|        } else {
   89|   540k|            std::stable_sort(vertices.begin(), vertices.end(), degree_greater<vd_pair>);
   90|   540k|        }
   91|       |
   92|       |        // take the next vertex to be connected up
   93|   994k|        vd_pair vd = vertices.back();
   94|   994k|        vertices.pop_back();
   95|       |
   96|   994k|        if (vd.degree == 0) {
  ------------------
  |  Branch (96:13): [True: 889k, False: 105k]
  ------------------
   97|   889k|            continue;
   98|   889k|        }
   99|       |
  100|   105k|        if (vertices.size() < size_t(vd.degree)) {
  ------------------
  |  Branch (100:13): [True: 867, False: 104k]
  ------------------
  101|    867|            goto fail;
  102|    867|        }
  103|       |
  104|   104k|        if (largest) {
  ------------------
  |  Branch (104:13): [True: 31.9k, False: 72.5k]
  ------------------
  105|   112k|            for (igraph_integer_t i = 0; i < vd.degree; ++i) {
  ------------------
  |  Branch (105:42): [True: 80.5k, False: 31.5k]
  ------------------
  106|  80.5k|                if (--(vertices[vertices.size() - 1 - i].degree) < 0) {
  ------------------
  |  Branch (106:21): [True: 443, False: 80.1k]
  ------------------
  107|    443|                    goto fail;
  108|    443|                }
  109|       |
  110|  80.1k|                VECTOR(*edges)[2 * (ec + i)] = vd.vertex;
  ------------------
  |  |   65|  80.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  111|  80.1k|                VECTOR(*edges)[2 * (ec + i) + 1] = vertices[vertices.size() - 1 - i].vertex;
  ------------------
  |  |   65|  80.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  112|  80.1k|            }
  113|  72.5k|        } else {
  114|       |            // this loop can only be reached if all zero-degree nodes have already been removed
  115|       |            // therefore decrementing remaining degrees is safe
  116|   153k|            for (igraph_integer_t i = 0; i < vd.degree; ++i) {
  ------------------
  |  Branch (116:42): [True: 80.5k, False: 72.5k]
  ------------------
  117|  80.5k|                vertices[i].degree--;
  118|       |
  119|  80.5k|                VECTOR(*edges)[2 * (ec + i)] = vd.vertex;
  ------------------
  |  |   65|  80.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  120|  80.5k|                VECTOR(*edges)[2 * (ec + i) + 1] = vertices[i].vertex;
  ------------------
  |  |   65|  80.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  121|  80.5k|            }
  122|  72.5k|        }
  123|       |
  124|   104k|        ec += vd.degree;
  125|   104k|    }
  126|       |
  127|  4.81k|    return IGRAPH_SUCCESS;
  128|       |
  129|  1.31k|fail:
  130|  1.31k|    IGRAPH_ERROR("The given degree sequence cannot be realized as a simple graph.", IGRAPH_EINVAL);
  ------------------
  |  |  431|  1.31k|    do { \
  |  |  432|  1.31k|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|  1.31k|        return igraph_errno ; \
  |  |  434|  1.31k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  131|  1.31k|}
_Z11degree_lessI7vd_pairEbRKT_S3_:
   62|  91.8M|template<typename T> inline bool degree_less(const T &a, const T &b) {
   63|  91.8M|    return a.degree < b.degree;
   64|  91.8M|}
degree_sequence.cpp:_ZL27igraph_i_havel_hakimi_indexPK19igraph_vector_int_tPS_:
  135|  3.06k|static igraph_error_t igraph_i_havel_hakimi_index(const igraph_vector_int_t *deg, igraph_vector_int_t *edges) {
  136|  3.06k|    igraph_integer_t n = igraph_vector_int_size(deg);
  137|       |
  138|  3.06k|    igraph_integer_t ec = 0; // number of edges added so far
  139|       |
  140|  3.06k|    typedef std::list<vd_pair> vlist;
  141|  3.06k|    vlist vertices;
  142|   544k|    for (igraph_integer_t i = 0; i < n; ++i) {
  ------------------
  |  Branch (142:34): [True: 541k, False: 3.06k]
  ------------------
  143|   541k|        vertices.push_back(vd_pair(i, VECTOR(*deg)[i]));
  ------------------
  |  |   65|   541k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  144|   541k|    }
  145|       |
  146|  3.06k|    std::vector<vlist::iterator> pointers;
  147|  3.06k|    pointers.reserve(n);
  148|   544k|    for (auto it = vertices.begin(); it != vertices.end(); ++it) {
  ------------------
  |  Branch (148:38): [True: 541k, False: 3.06k]
  ------------------
  149|   541k|        pointers.push_back(it);
  150|   541k|    }
  151|       |
  152|   484k|    for (const auto &pt : pointers) {
  ------------------
  |  Branch (152:25): [True: 484k, False: 2.40k]
  ------------------
  153|   484k|        vertices.sort(degree_greater<vd_pair>);
  154|       |
  155|   484k|        vd_pair vd = *pt;
  156|   484k|        vertices.erase(pt);
  157|       |
  158|   484k|        if (vd.degree == 0) {
  ------------------
  |  Branch (158:13): [True: 438k, False: 45.9k]
  ------------------
  159|   438k|            continue;
  160|   438k|        }
  161|       |
  162|  45.9k|        igraph_integer_t k;
  163|  45.9k|        vlist::iterator it;
  164|  45.9k|        for (it = vertices.begin(), k = 0;
  165|   126k|             k != vd.degree && it != vertices.end();
  ------------------
  |  Branch (165:14): [True: 81.5k, False: 45.2k]
  |  Branch (165:14): [True: 81.3k, False: 45.4k]
  |  Branch (165:32): [True: 81.3k, False: 182]
  ------------------
  166|  81.3k|             ++it, ++k) {
  167|  81.3k|            if (--(it->degree) < 0) {
  ------------------
  |  Branch (167:17): [True: 473, False: 80.9k]
  ------------------
  168|    473|                goto fail;
  169|    473|            }
  170|       |
  171|  80.9k|            VECTOR(*edges)[2 * (ec + k)] = vd.vertex;
  ------------------
  |  |   65|  80.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  172|  80.9k|            VECTOR(*edges)[2 * (ec + k) + 1] = it->vertex;
  ------------------
  |  |   65|  80.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  173|  80.9k|        }
  174|  45.4k|        if (it == vertices.end() && k < vd.degree) {
  ------------------
  |  Branch (174:13): [True: 691, False: 44.7k]
  |  Branch (174:13): [True: 182, False: 45.2k]
  |  Branch (174:37): [True: 182, False: 509]
  ------------------
  175|    182|            goto fail;
  176|    182|        }
  177|       |
  178|  45.2k|        ec += vd.degree;
  179|  45.2k|    }
  180|       |
  181|  2.40k|    return IGRAPH_SUCCESS;
  182|       |
  183|    655|fail:
  184|    655|    IGRAPH_ERROR("The given degree sequence cannot be realized as a simple graph.", IGRAPH_EINVAL);
  ------------------
  |  |  431|    655|    do { \
  |  |  432|    655|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|    655|        return igraph_errno ; \
  |  |  434|    655|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  185|    655|}
_ZN7vd_pairC2Ell:
   42|  5.46M|    vd_pair(igraph_integer_t vertex, igraph_integer_t degree) : vertex(vertex), degree(degree) {}
_Z14degree_greaterI7vd_pairEbRKT_S3_:
   58|   443M|template<typename T> inline bool degree_greater(const T &a, const T &b) {
   59|   443M|    return a.degree > b.degree;
   60|   443M|}

igraph_find_cycle:
  215|  2.02k|                                 igraph_neimode_t mode) {
  216|       |
  217|       |    /* If the graph is cached to be acyclic, we don't need to run the algorithm. */
  218|       |
  219|  2.02k|    igraph_bool_t known_acyclic = false;
  220|  2.02k|    igraph_bool_t found;
  221|       |
  222|  2.02k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (222:9): [True: 2.02k, False: 0]
  |  Branch (222:31): [True: 2.02k, False: 0]
  |  Branch (222:52): [True: 0, False: 2.02k]
  ------------------
  223|      0|        IGRAPH_ERROR("Invalid mode for finding cycles.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  224|      0|    }
  225|       |
  226|  2.02k|    if (! igraph_is_directed(graph)) {
  ------------------
  |  Branch (226:9): [True: 2.02k, False: 0]
  ------------------
  227|  2.02k|        mode = IGRAPH_ALL;
  228|  2.02k|    }
  229|       |
  230|  2.02k|    if (mode == IGRAPH_ALL) /* undirected */ {
  ------------------
  |  Branch (230:9): [True: 2.02k, False: 0]
  ------------------
  231|  2.02k|        if (igraph_i_property_cache_has(graph, IGRAPH_PROP_IS_FOREST) &&
  ------------------
  |  Branch (231:13): [True: 0, False: 2.02k]
  ------------------
  232|  2.02k|            igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_IS_FOREST)) {
  ------------------
  |  Branch (232:13): [True: 0, False: 0]
  ------------------
  233|      0|            known_acyclic = true;
  234|      0|        }
  235|  2.02k|    } else /* directed */ {
  236|      0|        if (igraph_i_property_cache_has(graph, IGRAPH_PROP_IS_DAG) &&
  ------------------
  |  Branch (236:13): [True: 0, False: 0]
  ------------------
  237|      0|            igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_IS_DAG)) {
  ------------------
  |  Branch (237:13): [True: 0, False: 0]
  ------------------
  238|      0|            known_acyclic = true;
  239|      0|        }
  240|      0|    }
  241|       |
  242|  2.02k|    if (known_acyclic) {
  ------------------
  |  Branch (242:9): [True: 0, False: 2.02k]
  ------------------
  243|      0|        if (vertices) {
  ------------------
  |  Branch (243:13): [True: 0, False: 0]
  ------------------
  244|      0|            igraph_vector_int_clear(vertices);
  245|      0|        }
  246|      0|        if (edges) {
  ------------------
  |  Branch (246:13): [True: 0, False: 0]
  ------------------
  247|      0|            igraph_vector_int_clear(edges);
  248|      0|        }
  249|      0|        return IGRAPH_SUCCESS;
  250|      0|    }
  251|       |
  252|  2.02k|    IGRAPH_CHECK(igraph_i_find_cycle(graph, vertices, edges, &found, mode, NULL));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  253|       |
  254|  2.02k|    if (! found) {
  ------------------
  |  Branch (254:9): [True: 767, False: 1.26k]
  ------------------
  255|    767|        if (mode == IGRAPH_ALL) /* undirected */ {
  ------------------
  |  Branch (255:13): [True: 767, False: 0]
  ------------------
  256|    767|            igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_FOREST, true);
  257|    767|        } else /* directed */ {
  258|      0|            igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_DAG, true);
  259|      0|        }
  260|    767|    }
  261|       |
  262|  2.02k|    return IGRAPH_SUCCESS;
  263|  2.02k|}
feedback_arc_set.c:igraph_i_find_cycle:
   52|  2.02k|                                          const igraph_bitset_t *removed) {
   53|       |
   54|  2.02k|    const igraph_integer_t vcount = igraph_vcount(graph);
   55|  2.02k|    const igraph_integer_t ecount = igraph_ecount(graph);
   56|  2.02k|    igraph_stack_int_t stack;
   57|  2.02k|    igraph_vector_int_t inc;
   58|  2.02k|    igraph_vector_int_t vpath, epath;
   59|  2.02k|    igraph_vector_char_t seen; /* 0 = unseen, 1 = acestor of current, 2 = seen, non-ancestor */
   60|  2.02k|    igraph_integer_t ea, va;
   61|  2.02k|    igraph_integer_t depth;
   62|       |
   63|  2.02k|    if (vertices) {
  ------------------
  |  Branch (63:9): [True: 2.02k, False: 0]
  ------------------
   64|  2.02k|        igraph_vector_int_clear(vertices);
   65|  2.02k|    }
   66|  2.02k|    if (edges) {
  ------------------
  |  Branch (66:9): [True: 2.02k, False: 0]
  ------------------
   67|  2.02k|        igraph_vector_int_clear(edges);
   68|  2.02k|    }
   69|  2.02k|    if (found) {
  ------------------
  |  Branch (69:9): [True: 2.02k, False: 0]
  ------------------
   70|  2.02k|        *found = false;
   71|  2.02k|    }
   72|       |
   73|  2.02k|    if (ecount == 0) {
  ------------------
  |  Branch (73:9): [True: 94, False: 1.93k]
  ------------------
   74|     94|        return IGRAPH_SUCCESS;
   75|     94|    }
   76|       |
   77|  1.93k|#define PATH_PUSH(v, e) \
   78|  1.93k|    do { \
   79|  1.93k|        IGRAPH_CHECK(igraph_vector_int_push_back(&epath, e)); \
   80|  1.93k|        IGRAPH_CHECK(igraph_vector_int_push_back(&vpath, v)); \
   81|  1.93k|        VECTOR(seen)[v] = 1; \
   82|  1.93k|    } while (0)
   83|       |
   84|  1.93k|#define PATH_POP() \
   85|  1.93k|    do { \
   86|  1.93k|        igraph_vector_int_pop_back(&epath); \
   87|  1.93k|        VECTOR(seen)[igraph_vector_int_pop_back(&vpath)] = 2; \
   88|  1.93k|    } while (0)
   89|       |
   90|  1.93k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&vpath, 100);
  ------------------
  |  |  124|  1.93k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  1.93k|    do { \
  |  |  |  |  649|  1.93k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.93k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.93k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.93k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.93k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  1.93k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  1.93k|    do { \
  |  |  |  |  592|  1.93k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  1.93k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  1.93k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  1.93k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  1.93k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  1.93k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   91|  1.93k|    igraph_vector_int_clear(&vpath);
   92|       |
   93|  1.93k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&epath, 100);
  ------------------
  |  |  124|  1.93k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  1.93k|    do { \
  |  |  |  |  649|  1.93k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.93k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.93k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.93k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.93k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  1.93k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  1.93k|    do { \
  |  |  |  |  592|  1.93k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  1.93k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  1.93k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  1.93k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  1.93k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  1.93k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   94|  1.93k|    igraph_vector_int_clear(&epath);
   95|       |
   96|  1.93k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&inc, 10);
  ------------------
  |  |  124|  1.93k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  1.93k|    do { \
  |  |  |  |  649|  1.93k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.93k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.93k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.93k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.93k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  1.93k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  1.93k|    do { \
  |  |  |  |  592|  1.93k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  1.93k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  1.93k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  1.93k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  1.93k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  1.93k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   97|  1.93k|    IGRAPH_VECTOR_CHAR_INIT_FINALLY(&seen, vcount);
  ------------------
  |  |  119|  1.93k|  do { IGRAPH_CHECK(igraph_vector_char_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  1.93k|    do { \
  |  |  |  |  649|  1.93k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.93k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.93k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.93k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.93k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.93k|  IGRAPH_FINALLY(igraph_vector_char_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  1.93k|    do { \
  |  |  |  |  592|  1.93k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  1.93k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  1.93k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  1.93k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  1.93k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  1.93k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:59): [Folded - Ignored]
  |  |  ------------------
  ------------------
   98|  1.93k|    IGRAPH_STACK_INT_INIT_FINALLY(&stack, 200);
  ------------------
  |  |   66|  1.93k|    do { IGRAPH_CHECK(igraph_stack_int_init(s, capacity)); \
  |  |  ------------------
  |  |  |  |  648|  1.93k|    do { \
  |  |  |  |  649|  1.93k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.93k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.93k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.93k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.93k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   67|  1.93k|        IGRAPH_FINALLY(igraph_stack_int_destroy, s); } while (0)
  |  |  ------------------
  |  |  |  |  591|  1.93k|    do { \
  |  |  |  |  592|  1.93k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  1.93k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  1.93k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  1.93k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  1.93k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  1.93k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (67:63): [Folded - Ignored]
  |  |  ------------------
  ------------------
   99|       |
  100|   149k|    for (igraph_integer_t v=0; v < vcount; v++) {
  ------------------
  |  Branch (100:32): [True: 149k, False: 673]
  ------------------
  101|   149k|        if (VECTOR(seen)[v]) {
  ------------------
  |  |   65|   149k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (101:13): [True: 17.7k, False: 131k]
  ------------------
  102|  17.7k|            continue;
  103|  17.7k|        }
  104|       |
  105|   131k|        IGRAPH_CHECK(igraph_stack_int_push(&stack, -1));
  ------------------
  |  |  648|   131k|    do { \
  |  |  649|   131k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   131k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   131k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 131k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   131k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  106|   131k|        IGRAPH_CHECK(igraph_stack_int_push(&stack, v));
  ------------------
  |  |  648|   131k|    do { \
  |  |  649|   131k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   131k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   131k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 131k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   131k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  107|       |
  108|   448k|        while (! igraph_stack_int_empty(&stack)) {
  ------------------
  |  Branch (108:16): [True: 318k, False: 130k]
  ------------------
  109|   318k|            igraph_integer_t x = igraph_stack_int_pop(&stack);
  110|   318k|            if (x == -1) {
  ------------------
  |  Branch (110:17): [True: 155k, False: 163k]
  ------------------
  111|   155k|                PATH_POP();
  ------------------
  |  |   85|   155k|    do { \
  |  |   86|   155k|        igraph_vector_int_pop_back(&epath); \
  |  |   87|   155k|        VECTOR(seen)[igraph_vector_int_pop_back(&vpath)] = 2; \
  |  |  ------------------
  |  |  |  |   65|   155k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |   88|   155k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (88:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  112|   155k|                continue;
  113|   163k|            } else {
  114|   163k|                va = x;
  115|   163k|                ea = igraph_stack_int_pop(&stack);
  116|       |
  117|   163k|                if (VECTOR(seen)[va] == 1) {
  ------------------
  |  |   65|   163k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (117:21): [True: 1.26k, False: 162k]
  ------------------
  118|  1.26k|                    goto finish;
  119|   162k|                } else if (VECTOR(seen)[va] == 2) {
  ------------------
  |  |   65|   162k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (119:28): [True: 0, False: 162k]
  ------------------
  120|      0|                    continue;
  121|      0|                }
  122|   163k|            }
  123|       |
  124|   162k|            PATH_PUSH(va, ea);
  ------------------
  |  |   78|   162k|    do { \
  |  |   79|   162k|        IGRAPH_CHECK(igraph_vector_int_push_back(&epath, e)); \
  |  |  ------------------
  |  |  |  |  648|   162k|    do { \
  |  |  |  |  649|   162k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|   162k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|   162k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 162k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|   162k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|   162k|        IGRAPH_CHECK(igraph_vector_int_push_back(&vpath, v)); \
  |  |  ------------------
  |  |  |  |  648|   162k|    do { \
  |  |  |  |  649|   162k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|   162k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|   162k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 162k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|   162k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   81|   162k|        VECTOR(seen)[v] = 1; \
  |  |  ------------------
  |  |  |  |   65|   162k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |   82|   162k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (82:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  125|       |
  126|   162k|            IGRAPH_CHECK(igraph_stack_int_push(&stack, -1));
  ------------------
  |  |  648|   162k|    do { \
  |  |  649|   162k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   162k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   162k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 162k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   162k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  127|   162k|            IGRAPH_CHECK(igraph_incident(graph, &inc, va, mode));
  ------------------
  |  |  648|   162k|    do { \
  |  |  649|   162k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   162k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   162k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 162k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   162k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  128|   162k|            igraph_integer_t n = igraph_vector_int_size(&inc);
  129|   272k|            for (igraph_integer_t i=0; i < n; i++) {
  ------------------
  |  Branch (129:40): [True: 110k, False: 162k]
  ------------------
  130|   110k|                igraph_integer_t eb = VECTOR(inc)[i];
  ------------------
  |  |   65|   110k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  131|   110k|                igraph_integer_t vb = IGRAPH_OTHER(graph, eb, va);
  ------------------
  |  |  144|   110k|    ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|   110k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|   110k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  113|  69.7k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  69.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  40.8k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  40.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:25): [True: 69.7k, False: 40.8k]
  |  |  ------------------
  ------------------
  132|   110k|                if (eb == ea) continue;
  ------------------
  |  Branch (132:21): [True: 30.5k, False: 80.1k]
  ------------------
  133|  80.1k|                if (VECTOR(seen)[vb] == 2) continue;
  ------------------
  |  |   65|  80.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (133:21): [True: 0, False: 80.1k]
  ------------------
  134|  80.1k|                if (removed && IGRAPH_BIT_TEST(*removed, eb)) continue;
  ------------------
  |  |  144|      0|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|      0|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|      0|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:36): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (134:21): [True: 0, False: 80.1k]
  ------------------
  135|  80.1k|                IGRAPH_CHECK(igraph_stack_int_push(&stack, eb));
  ------------------
  |  |  648|  80.1k|    do { \
  |  |  649|  80.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  80.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  80.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 80.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  80.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  136|  80.1k|                IGRAPH_CHECK(igraph_stack_int_push(&stack, vb));
  ------------------
  |  |  648|  80.1k|    do { \
  |  |  649|  80.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  80.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  80.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 80.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  80.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  137|  80.1k|            }
  138|   162k|        }
  139|   131k|    }
  140|       |
  141|       |
  142|  1.93k|finish:
  143|       |
  144|  1.93k|    igraph_stack_int_destroy(&stack);
  145|  1.93k|    igraph_vector_char_destroy(&seen);
  146|  1.93k|    igraph_vector_int_destroy(&inc);
  147|  1.93k|    IGRAPH_FINALLY_CLEAN(3);
  148|       |
  149|  1.93k|    depth = igraph_vector_int_size(&vpath);
  150|       |
  151|  1.93k|    if (depth > 0) {
  ------------------
  |  Branch (151:9): [True: 1.26k, False: 673]
  ------------------
  152|  1.26k|        igraph_integer_t i = depth;
  153|  4.73k|        while (VECTOR(vpath)[i-1] != va) i--;
  ------------------
  |  |   65|  4.73k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (153:16): [True: 3.47k, False: 1.26k]
  ------------------
  154|  4.73k|        for (; i < depth; i++) {
  ------------------
  |  Branch (154:16): [True: 3.47k, False: 1.26k]
  ------------------
  155|  3.47k|            if (vertices) {
  ------------------
  |  Branch (155:17): [True: 3.47k, False: 0]
  ------------------
  156|  3.47k|                igraph_vector_int_push_back(vertices, VECTOR(vpath)[i]);
  ------------------
  |  |   65|  3.47k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  157|  3.47k|            }
  158|  3.47k|            if (edges) {
  ------------------
  |  Branch (158:17): [True: 3.47k, False: 0]
  ------------------
  159|  3.47k|                igraph_vector_int_push_back(edges, VECTOR(epath)[i]);
  ------------------
  |  |   65|  3.47k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  160|  3.47k|            }
  161|  3.47k|        }
  162|  1.26k|        if (vertices) {
  ------------------
  |  Branch (162:13): [True: 1.26k, False: 0]
  ------------------
  163|  1.26k|            igraph_vector_int_push_back(vertices, va);
  164|  1.26k|        }
  165|  1.26k|        if (edges) {
  ------------------
  |  Branch (165:13): [True: 1.26k, False: 0]
  ------------------
  166|  1.26k|            igraph_vector_int_push_back(edges, ea);
  167|  1.26k|        }
  168|  1.26k|        if (found) {
  ------------------
  |  Branch (168:13): [True: 1.26k, False: 0]
  ------------------
  169|  1.26k|            *found = true;
  170|  1.26k|        }
  171|  1.26k|    }
  172|       |
  173|  1.93k|    igraph_vector_int_destroy(&epath);
  174|  1.93k|    igraph_vector_int_destroy(&vpath);
  175|  1.93k|    IGRAPH_FINALLY_CLEAN(2);
  176|       |
  177|  1.93k|    return IGRAPH_SUCCESS;
  178|       |
  179|  1.93k|#undef PATH_PUSH
  180|  1.93k|#undef PATH_POP
  181|  1.93k|}

igraph_is_graphical:
  117|  16.2k|{
  118|       |    /* Undirected case: */
  119|  16.2k|    if (in_degrees == NULL)
  ------------------
  |  Branch (119:9): [True: 16.2k, False: 0]
  ------------------
  120|  16.2k|    {
  121|  16.2k|        if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW )) {
  ------------------
  |  |   24|  8.11k|#define IGRAPH_I_MULTI_LOOPS_SW 0x04 /* 100, more than one self-loop allowed on the same vertex   */
  ------------------
  |  Branch (121:14): [True: 8.11k, False: 8.11k]
  |  Branch (121:56): [True: 4.05k, False: 4.05k]
  ------------------
  122|       |            /* Typically this case is used when multiple edges are allowed both as self-loops and
  123|       |             * between distinct vertices. However, the conditions are the same even if multi-edges
  124|       |             * are not allowed between distinct vertices (only as self-loops). Therefore, we
  125|       |             * do not test IGRAPH_I_MULTI_EDGES_SW in the if (...). */
  126|  4.05k|            return igraph_i_is_graphical_undirected_multi_loops(out_degrees, res);
  127|  4.05k|        }
  128|  12.1k|        else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   23|  8.11k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (128:19): [True: 8.11k, False: 4.05k]
  |  Branch (128:63): [True: 4.05k, False: 4.05k]
  ------------------
  129|  4.05k|            return igraph_i_is_graphical_undirected_loopless_multi(out_degrees, res);
  130|  4.05k|        }
  131|  8.11k|        else if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   24|  4.05k|#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) ) {
  ------------------
  |  |   23|  4.05k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (131:19): [True: 4.05k, False: 4.05k]
  |  Branch (131:61): [True: 4.05k, False: 0]
  |  Branch (131:113): [True: 4.05k, False: 0]
  ------------------
  132|  4.05k|            return igraph_i_is_graphical_undirected_loopy_simple(out_degrees, res);
  133|  4.05k|        }
  134|  4.05k|        else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   23|  4.05k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (134:19): [True: 4.05k, False: 0]
  |  Branch (134:63): [True: 4.05k, False: 0]
  ------------------
  135|  4.05k|            return igraph_i_is_graphical_undirected_simple(out_degrees, res);
  136|  4.05k|        } else {
  137|       |            /* Remaining case:
  138|       |             *  - At most one self-loop per vertex but multi-edges between distinct vertices allowed.
  139|       |             * These cases cannot currently be requested through the documented API,
  140|       |             * so no explanatory error message for now. */
  141|      0|            return IGRAPH_UNIMPLEMENTED;
  142|      0|        }
  143|  16.2k|    }
  144|       |    /* Directed case: */
  145|      0|    else
  146|      0|    {
  147|      0|        if (igraph_vector_int_size(in_degrees) != igraph_vector_int_size(out_degrees)) {
  ------------------
  |  Branch (147:13): [True: 0, False: 0]
  ------------------
  148|      0|            IGRAPH_ERROR("The length of out- and in-degree sequences must be the same.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  149|      0|        }
  150|       |
  151|      0|        if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) && (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW ) ) {
  ------------------
  |  |   23|      0|#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 ) ) {
  ------------------
  |  |   24|      0|#define IGRAPH_I_MULTI_LOOPS_SW 0x04 /* 100, more than one self-loop allowed on the same vertex   */
  ------------------
  |  Branch (151:14): [True: 0, False: 0]
  |  Branch (151:56): [True: 0, False: 0]
  |  Branch (151:106): [True: 0, False: 0]
  ------------------
  152|      0|            return igraph_i_is_graphical_directed_loopy_multi(out_degrees, in_degrees, res);
  153|      0|        }
  154|      0|        else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   23|      0|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (154:19): [True: 0, False: 0]
  |  Branch (154:63): [True: 0, False: 0]
  ------------------
  155|      0|            return igraph_i_is_graphical_directed_loopless_multi(out_degrees, in_degrees, res);
  156|      0|        }
  157|      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) ) {
  ------------------
  |  |   24|      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) ) {
  ------------------
  |  |   23|      0|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (157:19): [True: 0, False: 0]
  |  Branch (157:61): [True: 0, False: 0]
  |  Branch (157:113): [True: 0, False: 0]
  ------------------
  158|      0|            return igraph_i_is_graphical_directed_loopy_simple(out_degrees, in_degrees, res);
  159|      0|        }
  160|      0|        else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   23|      0|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (160:19): [True: 0, False: 0]
  |  Branch (160:63): [True: 0, False: 0]
  ------------------
  161|      0|            return igraph_i_is_graphical_directed_simple(out_degrees, in_degrees, res);
  162|      0|        } else {
  163|       |            /* Remaining cases:
  164|       |             *  - At most one self-loop per vertex but multi-edges between distinct vertices allowed.
  165|       |             *  - At most one edge between distinct vertices but multi-self-loops allowed.
  166|       |             * These cases cannot currently be requested through the documented API,
  167|       |             * so no explanatory error message for now. */
  168|      0|            return IGRAPH_UNIMPLEMENTED;
  169|      0|        }
  170|      0|    }
  171|       |
  172|       |    /* can't reach here */
  173|  16.2k|}
graphicality.c:igraph_i_is_graphical_undirected_multi_loops:
  241|  8.11k|static igraph_error_t igraph_i_is_graphical_undirected_multi_loops(const igraph_vector_int_t *degrees, igraph_bool_t *res) {
  242|  8.11k|    igraph_integer_t sum_parity = 0; /* 0 if the degree sum is even, 1 if it is odd */
  243|  8.11k|    igraph_integer_t n = igraph_vector_int_size(degrees);
  244|  8.11k|    igraph_integer_t i;
  245|       |
  246|  1.40M|    for (i = 0; i < n; ++i) {
  ------------------
  |  Branch (246:17): [True: 1.39M, False: 8.11k]
  ------------------
  247|  1.39M|        igraph_integer_t d = VECTOR(*degrees)[i];
  ------------------
  |  |   65|  1.39M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  248|       |
  249|  1.39M|        if (d < 0) {
  ------------------
  |  Branch (249:13): [True: 0, False: 1.39M]
  ------------------
  250|      0|            *res = false;
  251|      0|            return IGRAPH_SUCCESS;
  252|      0|        }
  253|  1.39M|        sum_parity = (sum_parity + d) & 1;
  254|  1.39M|    }
  255|       |
  256|  8.11k|    *res = (sum_parity == 0);
  257|       |
  258|  8.11k|    return IGRAPH_SUCCESS;
  259|  8.11k|}
graphicality.c:igraph_i_is_graphical_undirected_loopless_multi:
  267|  4.05k|static igraph_error_t igraph_i_is_graphical_undirected_loopless_multi(const igraph_vector_int_t *degrees, igraph_bool_t *res) {
  268|  4.05k|    igraph_integer_t i;
  269|  4.05k|    igraph_integer_t n = igraph_vector_int_size(degrees);
  270|  4.05k|    igraph_integer_t dsum, dmax;
  271|       |
  272|       |    /* Zero-length sequences are considered graphical. */
  273|  4.05k|    if (n == 0) {
  ------------------
  |  Branch (273:9): [True: 2, False: 4.05k]
  ------------------
  274|      2|        *res = true;
  275|      2|        return IGRAPH_SUCCESS;
  276|      2|    }
  277|       |
  278|  4.05k|    dsum = 0; dmax = 0;
  279|   702k|    for (i = 0; i < n; ++i) {
  ------------------
  |  Branch (279:17): [True: 698k, False: 4.05k]
  ------------------
  280|   698k|        igraph_integer_t d = VECTOR(*degrees)[i];
  ------------------
  |  |   65|   698k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  281|       |
  282|   698k|        if (d < 0) {
  ------------------
  |  Branch (282:13): [True: 0, False: 698k]
  ------------------
  283|      0|            *res = false;
  284|      0|            return IGRAPH_SUCCESS;
  285|      0|        }
  286|   698k|        dsum += d;
  287|   698k|        if (d > dmax) {
  ------------------
  |  Branch (287:13): [True: 6.43k, False: 692k]
  ------------------
  288|  6.43k|            dmax = d;
  289|  6.43k|        }
  290|   698k|    }
  291|       |
  292|  4.05k|    *res = (dsum % 2 == 0) && (dsum >= 2*dmax);
  ------------------
  |  Branch (292:12): [True: 4.05k, False: 0]
  |  Branch (292:31): [True: 3.30k, False: 750]
  ------------------
  293|       |
  294|  4.05k|    return IGRAPH_SUCCESS;
  295|  4.05k|}
graphicality.c:igraph_i_is_graphical_undirected_loopy_simple:
  303|  4.05k|static igraph_error_t igraph_i_is_graphical_undirected_loopy_simple(const igraph_vector_int_t *degrees, igraph_bool_t *res) {
  304|  4.05k|    igraph_vector_int_t num_degs;
  305|  4.05k|    igraph_integer_t w, b, s, c, n, k, wd, kd;
  306|       |
  307|  4.05k|    n = igraph_vector_int_size(degrees);
  308|       |
  309|       |    /* Zero-length sequences are considered graphical. */
  310|  4.05k|    if (n == 0) {
  ------------------
  |  Branch (310:9): [True: 2, False: 4.05k]
  ------------------
  311|      2|        *res = true;
  312|      2|        return IGRAPH_SUCCESS;
  313|      2|    }
  314|       |
  315|       |    /* The conditions from the loopy multigraph case are necessary here as well. */
  316|  4.05k|    IGRAPH_CHECK(igraph_i_is_graphical_undirected_multi_loops(degrees, res));
  ------------------
  |  |  648|  4.05k|    do { \
  |  |  649|  4.05k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  4.05k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  4.05k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  4.05k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  317|  4.05k|    if (! *res) {
  ------------------
  |  Branch (317:9): [True: 0, False: 4.05k]
  ------------------
  318|      0|        return IGRAPH_SUCCESS;
  319|      0|    }
  320|       |
  321|       |    /*
  322|       |     * We follow this paper:
  323|       |     *
  324|       |     * G. Cairns & S. Mendan: Degree Sequences for Graphs with Loops, 2013
  325|       |     * https://arxiv.org/abs/1303.2145v1
  326|       |     *
  327|       |     * They give the following modification of the Erdős-Gallai theorem:
  328|       |     *
  329|       |     * A non-increasing degree sequence d_1 >= ... >= d_n has a realization as
  330|       |     * a simple graph with loops (i.e. at most one self-loop allowed on each vertex)
  331|       |     * iff
  332|       |     *
  333|       |     * \sum_{i=1}^k d_i <= k(k+1) + \sum_{i=k+1}^{n} min(d_i, k)
  334|       |     *
  335|       |     * for each k=1..n
  336|       |     *
  337|       |     * The difference from Erdős-Gallai is that here we have the term
  338|       |     * k(k+1) instead of k(k-1).
  339|       |     *
  340|       |     * The implementation is analogous to igraph_i_is_graphical_undirected_simple(),
  341|       |     * which in turn is based on Király 2012. See comments in that function for details.
  342|       |     * w and k are zero-based here, unlike in the statement of the theorem above.
  343|       |     */
  344|       |
  345|  4.05k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&num_degs, n+2);
  ------------------
  |  |  124|  4.05k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  4.05k|    do { \
  |  |  |  |  649|  4.05k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  4.05k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  4.05k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.05k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  4.05k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  4.05k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  4.05k|    do { \
  |  |  |  |  592|  4.05k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  4.05k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  4.05k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  4.05k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  4.05k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  4.05k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  346|       |
  347|   694k|    for (igraph_integer_t i = 0; i < n; ++i) {
  ------------------
  |  Branch (347:34): [True: 690k, False: 3.69k]
  ------------------
  348|   690k|        igraph_integer_t degree = VECTOR(*degrees)[i];
  ------------------
  |  |   65|   690k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  349|       |
  350|       |        /* Negative degrees are already checked in igraph_i_is_graphical_undirected_multi_loops() */
  351|   690k|        if (degree > n+1) {
  ------------------
  |  Branch (351:13): [True: 362, False: 690k]
  ------------------
  352|    362|            *res = false;
  353|    362|            goto undirected_loopy_simple_finish;
  354|    362|        }
  355|       |
  356|   690k|        ++VECTOR(num_degs)[degree];
  ------------------
  |  |   65|   690k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  357|   690k|    }
  358|       |
  359|       |    /* Convert num_degs to a cumulative sum array. */
  360|   696k|    for (igraph_integer_t d = n; d >= 0; --d) {
  ------------------
  |  Branch (360:34): [True: 692k, False: 3.69k]
  ------------------
  361|   692k|        VECTOR(num_degs)[d] += VECTOR(num_degs)[d+1];
  ------------------
  |  |   65|   692k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(num_degs)[d] += VECTOR(num_degs)[d+1];
  ------------------
  |  |   65|   692k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  362|   692k|    }
  363|       |
  364|  3.69k|    wd = 0, kd = n+1;
  365|  3.69k|    *res = true;
  366|  3.69k|    w = n - 1; b = 0; s = 0; c = 0;
  367|  7.63k|    for (k = 0; k < n; k++) {
  ------------------
  |  Branch (367:17): [True: 7.63k, False: 0]
  ------------------
  368|   662k|        while (k >= VECTOR(num_degs)[kd]) {
  ------------------
  |  |   65|   662k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (368:16): [True: 655k, False: 7.63k]
  ------------------
  369|   655k|            --kd;
  370|   655k|        }
  371|  7.63k|        b += kd;
  372|  7.63k|        c += w;
  373|   687k|        while (w > k) {
  ------------------
  |  Branch (373:16): [True: 684k, False: 3.30k]
  ------------------
  374|   698k|            while (wd + 1 <= n + 1 && w < VECTOR(num_degs)[wd + 1]) {
  ------------------
  |  |   65|   698k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (374:20): [True: 698k, False: 20]
  |  Branch (374:39): [True: 13.8k, False: 684k]
  ------------------
  375|  13.8k|                wd++;
  376|  13.8k|            }
  377|   684k|            if (wd > k + 1) break;
  ------------------
  |  Branch (377:17): [True: 4.33k, False: 679k]
  ------------------
  378|   679k|            s += wd;
  379|   679k|            c -= (k + 1);
  380|   679k|            w--;
  381|   679k|        }
  382|  7.63k|        if (b > c + s + 2*(k + 1)) {
  ------------------
  |  Branch (382:13): [True: 520, False: 7.11k]
  ------------------
  383|    520|            *res = false;
  384|    520|            break;
  385|    520|        }
  386|  7.11k|        if (w == k) {
  ------------------
  |  Branch (386:13): [True: 3.17k, False: 3.94k]
  ------------------
  387|  3.17k|            break;
  388|  3.17k|        }
  389|  7.11k|    }
  390|       |
  391|  4.05k|undirected_loopy_simple_finish:
  392|  4.05k|    igraph_vector_int_destroy(&num_degs);
  393|  4.05k|    IGRAPH_FINALLY_CLEAN(1);
  394|       |
  395|  4.05k|    return IGRAPH_SUCCESS;
  396|  3.69k|}
graphicality.c:igraph_i_is_graphical_undirected_simple:
  404|  4.05k|static igraph_error_t igraph_i_is_graphical_undirected_simple(const igraph_vector_int_t *degrees, igraph_bool_t *res) {
  405|  4.05k|    igraph_vector_int_t num_degs; /* num_degs[d] is the # of vertices with degree d */
  406|  4.05k|    const igraph_integer_t p = igraph_vector_int_size(degrees);
  407|  4.05k|    igraph_integer_t dmin, dmax, dsum;
  408|  4.05k|    igraph_integer_t n; /* number of non-zero degrees */
  409|  4.05k|    igraph_integer_t k, sum_deg, sum_ni, sum_ini;
  410|  4.05k|    igraph_integer_t i, dk;
  411|  4.05k|    igraph_integer_t zverovich_bound;
  412|       |
  413|  4.05k|    if (p == 0) {
  ------------------
  |  Branch (413:9): [True: 2, False: 4.05k]
  ------------------
  414|      2|        *res = true;
  415|      2|        return IGRAPH_SUCCESS;
  416|      2|    }
  417|       |
  418|       |    /* The following implementation of the Erdős-Gallai test
  419|       |     * is mostly a direct translation of the Python code given in
  420|       |     *
  421|       |     * Brian Cloteaux, Is This for Real? Fast Graphicality Testing,
  422|       |     * Computing Prescriptions, pp. 91-95, vol. 17 (2015)
  423|       |     * https://dx.doi.org/10.1109/MCSE.2015.125
  424|       |     *
  425|       |     * It uses counting sort to achieve linear runtime.
  426|       |     */
  427|       |
  428|  4.05k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&num_degs, p);
  ------------------
  |  |  124|  4.05k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  4.05k|    do { \
  |  |  |  |  649|  4.05k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  4.05k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  4.05k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.05k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  4.05k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  4.05k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  4.05k|    do { \
  |  |  |  |  592|  4.05k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  4.05k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  4.05k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  4.05k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  4.05k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  4.05k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  429|       |
  430|  4.05k|    dmin = p; dmax = 0; dsum = 0; n = 0;
  431|   692k|    for (i = 0; i < p; ++i) {
  ------------------
  |  Branch (431:17): [True: 689k, False: 3.63k]
  ------------------
  432|   689k|        igraph_integer_t d = VECTOR(*degrees)[i];
  ------------------
  |  |   65|   689k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  433|       |
  434|   689k|        if (d < 0 || d >= p) {
  ------------------
  |  Branch (434:13): [True: 0, False: 689k]
  |  Branch (434:22): [True: 424, False: 688k]
  ------------------
  435|    424|            *res = false;
  436|    424|            goto finish;
  437|    424|        }
  438|       |
  439|   688k|        if (d > 0) {
  ------------------
  |  Branch (439:13): [True: 107k, False: 581k]
  ------------------
  440|   107k|            dmax = d > dmax ? d : dmax;
  ------------------
  |  Branch (440:20): [True: 5.96k, False: 101k]
  ------------------
  441|   107k|            dmin = d < dmin ? d : dmin;
  ------------------
  |  Branch (441:20): [True: 5.83k, False: 101k]
  ------------------
  442|   107k|            dsum += d;
  443|   107k|            n++;
  444|   107k|            VECTOR(num_degs)[d] += 1;
  ------------------
  |  |   65|   107k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  445|   107k|        }
  446|   688k|    }
  447|       |
  448|  3.63k|    if (dsum % 2 != 0) {
  ------------------
  |  Branch (448:9): [True: 0, False: 3.63k]
  ------------------
  449|      0|        *res = false;
  450|      0|        goto finish;
  451|      0|    }
  452|       |
  453|  3.63k|    if (n == 0) {
  ------------------
  |  Branch (453:9): [True: 186, False: 3.44k]
  ------------------
  454|    186|        *res = true;
  455|    186|        goto finish; /* all degrees are zero => graphical */
  456|    186|    }
  457|       |
  458|       |    /* According to:
  459|       |     *
  460|       |     * G. Cairns, S. Mendan, and Y. Nikolayevsky, A sharp refinement of a result of Zverovich-Zverovich,
  461|       |     * Discrete Math. 338, 1085 (2015).
  462|       |     * https://dx.doi.org/10.1016/j.disc.2015.02.001
  463|       |     *
  464|       |     * a sufficient but not necessary condition of graphicality for a sequence of
  465|       |     * n strictly positive integers is that
  466|       |     *
  467|       |     * dmin * n >= floor( (dmax + dmin + 1)^2 / 4 ) - 1
  468|       |     * if dmin is odd or (dmax + dmin) mod 4 == 1
  469|       |     *
  470|       |     * or
  471|       |     *
  472|       |     * dmin * n >= floor( (dmax + dmin + 1)^2 / 4 )
  473|       |     * otherwise.
  474|       |     */
  475|       |
  476|  3.44k|    zverovich_bound = ((dmax + dmin + 1) * (dmax + dmin + 1)) / 4;
  477|  3.44k|    if (dmin % 2 == 1 || (dmax + dmin) % 4 == 1) {
  ------------------
  |  Branch (477:9): [True: 2.89k, False: 546]
  |  Branch (477:26): [True: 24, False: 522]
  ------------------
  478|  2.92k|        zverovich_bound -= 1;
  479|  2.92k|    }
  480|       |
  481|  3.44k|    if (dmin*n >= zverovich_bound) {
  ------------------
  |  Branch (481:9): [True: 1.52k, False: 1.92k]
  ------------------
  482|  1.52k|        *res = true;
  483|  1.52k|        goto finish;
  484|  1.52k|    }
  485|       |
  486|  1.92k|    k = 0; sum_deg = 0; sum_ni = 0; sum_ini = 0;
  487|  34.7k|    for (dk = dmax; dk >= dmin; --dk) {
  ------------------
  |  Branch (487:21): [True: 34.7k, False: 8]
  ------------------
  488|  34.7k|        igraph_integer_t run_size, v;
  489|       |
  490|  34.7k|        if (dk < k+1) {
  ------------------
  |  Branch (490:13): [True: 1.02k, False: 33.7k]
  ------------------
  491|  1.02k|            *res = true;
  492|  1.02k|            goto finish;
  493|  1.02k|        }
  494|       |
  495|  33.7k|        run_size = VECTOR(num_degs)[dk];
  ------------------
  |  |   65|  33.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  496|  33.7k|        if (run_size > 0) {
  ------------------
  |  Branch (496:13): [True: 3.12k, False: 30.5k]
  ------------------
  497|  3.12k|            if (dk < k + run_size) {
  ------------------
  |  Branch (497:17): [True: 300, False: 2.82k]
  ------------------
  498|    300|                run_size = dk - k;
  499|    300|            }
  500|  3.12k|            sum_deg += run_size * dk;
  501|  7.18k|            for (v=0; v < run_size; ++v) {
  ------------------
  |  Branch (501:23): [True: 4.05k, False: 3.12k]
  ------------------
  502|  4.05k|                sum_ni += VECTOR(num_degs)[k+v];
  ------------------
  |  |   65|  4.05k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  503|  4.05k|                sum_ini += (k+v) * VECTOR(num_degs)[k+v];
  ------------------
  |  |   65|  4.05k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  504|  4.05k|            }
  505|  3.12k|            k += run_size;
  506|  3.12k|            if (sum_deg > k*(n-1) - k*sum_ni + sum_ini) {
  ------------------
  |  Branch (506:17): [True: 886, False: 2.24k]
  ------------------
  507|    886|                *res = false;
  508|    886|                goto finish;
  509|    886|            }
  510|  3.12k|        }
  511|  33.7k|    }
  512|       |
  513|      8|    *res = true;
  514|       |
  515|  4.05k|finish:
  516|  4.05k|    igraph_vector_int_destroy(&num_degs);
  517|  4.05k|    IGRAPH_FINALLY_CLEAN(1);
  518|       |
  519|  4.05k|    return IGRAPH_SUCCESS;
  520|      8|}

igraph_assortativity:
  264|  2.02k|                         igraph_bool_t normalized) {
  265|       |
  266|  2.02k|    const igraph_integer_t no_of_nodes = igraph_vcount(graph);
  267|  2.02k|    const igraph_integer_t no_of_edges = igraph_ecount(graph);
  268|       |
  269|  2.02k|    directed = directed && igraph_is_directed(graph);
  ------------------
  |  Branch (269:16): [True: 0, False: 2.02k]
  |  Branch (269:28): [True: 0, False: 0]
  ------------------
  270|       |
  271|  2.02k|    if (!directed && values_in) {
  ------------------
  |  Branch (271:9): [True: 2.02k, False: 0]
  |  Branch (271:22): [True: 0, False: 2.02k]
  ------------------
  272|      0|        IGRAPH_WARNING(
  ------------------
  |  |  789|      0|    do { \
  |  |  790|      0|        igraph_warning(reason, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  791|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (791:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  273|      0|            "Incoming vertex values are ignored when calculating undirected assortativity.");
  274|      0|    }
  275|       |
  276|  2.02k|    if (igraph_vector_size(values) != no_of_nodes) {
  ------------------
  |  Branch (276:9): [True: 0, False: 2.02k]
  ------------------
  277|      0|        IGRAPH_ERROR("Invalid vertex values vector length.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  278|      0|    }
  279|       |
  280|  2.02k|    if (values_in && igraph_vector_size(values_in) != no_of_nodes) {
  ------------------
  |  Branch (280:9): [True: 0, False: 2.02k]
  |  Branch (280:22): [True: 0, False: 0]
  ------------------
  281|      0|        IGRAPH_ERROR("Invalid incoming vertex values vector length.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  282|      0|    }
  283|       |
  284|  2.02k|    if (!directed) {
  ------------------
  |  Branch (284:9): [True: 2.02k, False: 0]
  ------------------
  285|  2.02k|        igraph_real_t num1 = 0.0, num2 = 0.0, den1 = 0.0;
  286|       |
  287|  76.9k|        for (igraph_integer_t e = 0; e < no_of_edges; e++) {
  ------------------
  |  Branch (287:38): [True: 74.9k, False: 2.02k]
  ------------------
  288|  74.9k|            igraph_integer_t from = IGRAPH_FROM(graph, e);
  ------------------
  |  |  113|  74.9k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  289|  74.9k|            igraph_integer_t to = IGRAPH_TO(graph, e);
  ------------------
  |  |  126|  74.9k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  290|  74.9k|            igraph_real_t from_value = VECTOR(*values)[from];
  ------------------
  |  |   65|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  291|  74.9k|            igraph_real_t to_value = VECTOR(*values)[to];
  ------------------
  |  |   65|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  292|       |
  293|  74.9k|            num1 += from_value * to_value;
  294|  74.9k|            num2 += from_value + to_value;
  295|  74.9k|            if (normalized) {
  ------------------
  |  Branch (295:17): [True: 74.9k, False: 0]
  ------------------
  296|  74.9k|                den1 += from_value * from_value + to_value * to_value;
  297|  74.9k|            }
  298|  74.9k|        }
  299|       |
  300|  2.02k|        num1 /= no_of_edges;
  301|  2.02k|        if (normalized) {
  ------------------
  |  Branch (301:13): [True: 2.02k, False: 0]
  ------------------
  302|  2.02k|            den1 /= no_of_edges * 2.0;
  303|  2.02k|        }
  304|  2.02k|        num2 /= no_of_edges * 2.0;
  305|  2.02k|        num2 = num2 * num2;
  306|       |
  307|  2.02k|        if (normalized) {
  ------------------
  |  Branch (307:13): [True: 2.02k, False: 0]
  ------------------
  308|  2.02k|            *res = (num1 - num2) / (den1 - num2);
  309|  2.02k|        } else {
  310|      0|            *res = (num1 - num2);
  311|      0|        }
  312|       |
  313|  2.02k|    } else {
  314|      0|        igraph_real_t num1 = 0.0, num2 = 0.0, num3 = 0.0,
  315|      0|                      den1 = 0.0, den2 = 0.0;
  316|      0|        igraph_real_t num, den;
  317|       |
  318|      0|        if (!values_in) {
  ------------------
  |  Branch (318:13): [True: 0, False: 0]
  ------------------
  319|      0|            values_in = values;
  320|      0|        }
  321|       |
  322|      0|        for (igraph_integer_t e = 0; e < no_of_edges; e++) {
  ------------------
  |  Branch (322:38): [True: 0, False: 0]
  ------------------
  323|      0|            igraph_integer_t from = IGRAPH_FROM(graph, e);
  ------------------
  |  |  113|      0|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  324|      0|            igraph_integer_t to = IGRAPH_TO(graph, e);
  ------------------
  |  |  126|      0|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  325|      0|            igraph_real_t from_value = VECTOR(*values)[from];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  326|      0|            igraph_real_t to_value = VECTOR(*values_in)[to];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  327|       |
  328|      0|            num1 += from_value * to_value;
  329|      0|            num2 += from_value;
  330|      0|            num3 += to_value;
  331|      0|            if (normalized) {
  ------------------
  |  Branch (331:17): [True: 0, False: 0]
  ------------------
  332|      0|                den1 += from_value * from_value;
  333|      0|                den2 += to_value * to_value;
  334|      0|            }
  335|      0|        }
  336|       |
  337|      0|        num = num1 - num2 * num3 / no_of_edges;
  338|      0|        if (normalized) {
  ------------------
  |  Branch (338:13): [True: 0, False: 0]
  ------------------
  339|      0|            den = sqrt(den1 - num2 * num2 / no_of_edges) *
  340|      0|                    sqrt(den2 - num3 * num3 / no_of_edges);
  341|       |
  342|      0|            *res = num / den;
  343|      0|        } else {
  344|      0|            *res = num / no_of_edges;
  345|      0|        }
  346|      0|    }
  347|       |
  348|  2.02k|    return IGRAPH_SUCCESS;
  349|  2.02k|}
igraph_assortativity_degree:
  389|  2.02k|                                igraph_bool_t directed) {
  390|       |
  391|  2.02k|    directed = directed && igraph_is_directed(graph);
  ------------------
  |  Branch (391:16): [True: 0, False: 2.02k]
  |  Branch (391:28): [True: 0, False: 0]
  ------------------
  392|  2.02k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  393|       |
  394|       |    /* This function uses igraph_strength() instead of igraph_degree() in order to obtain
  395|       |     * a vector of reals instead of a vector of integers. */
  396|  2.02k|    if (directed) {
  ------------------
  |  Branch (396:9): [True: 0, False: 2.02k]
  ------------------
  397|      0|        igraph_vector_t indegree, outdegree;
  398|      0|        IGRAPH_VECTOR_INIT_FINALLY(&indegree, no_of_nodes);
  ------------------
  |  |  109|      0|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|      0|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (110:60): [Folded - Ignored]
  |  |  ------------------
  ------------------
  399|      0|        IGRAPH_VECTOR_INIT_FINALLY(&outdegree, no_of_nodes);
  ------------------
  |  |  109|      0|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|      0|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (110:60): [Folded - Ignored]
  |  |  ------------------
  ------------------
  400|      0|        IGRAPH_CHECK(igraph_strength(graph, &indegree, igraph_vss_all(), IGRAPH_IN, IGRAPH_LOOPS, NULL));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  401|      0|        IGRAPH_CHECK(igraph_strength(graph, &outdegree, igraph_vss_all(), IGRAPH_OUT, IGRAPH_LOOPS, NULL));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  402|      0|        IGRAPH_CHECK(igraph_assortativity(graph, &outdegree, &indegree, res, /* directed */ true, /* normalized */ true));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  403|      0|        igraph_vector_destroy(&indegree);
  404|      0|        igraph_vector_destroy(&outdegree);
  405|      0|        IGRAPH_FINALLY_CLEAN(2);
  406|  2.02k|    } else {
  407|  2.02k|        igraph_vector_t degree;
  408|  2.02k|        IGRAPH_VECTOR_INIT_FINALLY(&degree, no_of_nodes);
  ------------------
  |  |  109|  2.02k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|  2.02k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (110:60): [Folded - Ignored]
  |  |  ------------------
  ------------------
  409|  2.02k|        IGRAPH_CHECK(igraph_strength(graph, &degree, igraph_vss_all(), IGRAPH_ALL, IGRAPH_LOOPS, NULL));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  410|  2.02k|        IGRAPH_CHECK(igraph_assortativity(graph, &degree, 0, res, /* directed */ false, /* normalized */ true));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  411|  2.02k|        igraph_vector_destroy(&degree);
  412|  2.02k|        IGRAPH_FINALLY_CLEAN(1);
  413|  2.02k|    }
  414|       |
  415|  2.02k|    return IGRAPH_SUCCESS;
  416|  2.02k|}

igraph_i_minimum_spanning_tree_unweighted:
   72|  2.02k|        igraph_vector_int_t* res) {
   73|       |
   74|  2.02k|    const igraph_integer_t no_of_nodes = igraph_vcount(graph);
   75|  2.02k|    const igraph_integer_t no_of_edges = igraph_ecount(graph);
   76|  2.02k|    igraph_bitset_t already_added, added_edges;
   77|       |
   78|  2.02k|    igraph_dqueue_int_t q;
   79|  2.02k|    igraph_vector_int_t eids;
   80|       |
   81|  2.02k|    IGRAPH_BITSET_INIT_FINALLY(&added_edges, no_of_edges);
  ------------------
  |  |  261|  2.02k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  262|  2.02k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  263|  2.02k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (263:62): [Folded - Ignored]
  |  |  ------------------
  ------------------
   82|  2.02k|    IGRAPH_BITSET_INIT_FINALLY(&already_added, no_of_nodes);
  ------------------
  |  |  261|  2.02k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  262|  2.02k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  263|  2.02k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (263:62): [Folded - Ignored]
  |  |  ------------------
  ------------------
   83|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&eids, 0);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   84|  2.02k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   66|  2.02k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   67|  2.02k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (67:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   85|       |
   86|  2.02k|    igraph_vector_int_clear(res);
   87|  2.02k|    IGRAPH_CHECK(igraph_vector_int_reserve(res, max_tree_edges(no_of_nodes, no_of_edges)));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   88|       |
   89|       |    /* Perform a BFS */
   90|   351k|    for (igraph_integer_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (90:34): [True: 349k, False: 2.02k]
  ------------------
   91|   349k|        if (IGRAPH_BIT_TEST(already_added, i)) {
  ------------------
  |  |  144|   349k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|   349k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   349k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|   349k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   349k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:36): [True: 46.9k, False: 302k]
  |  |  ------------------
  ------------------
   92|  46.9k|            continue;
   93|  46.9k|        }
   94|       |
   95|   302k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|   302k|    do { \
  |  |   48|   302k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 302k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|   302k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   96|       |
   97|   302k|        IGRAPH_BIT_SET(already_added, i);
  ------------------
  |  |  105|   302k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|   302k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|   302k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   302k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|   302k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   302k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   98|   302k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, i));
  ------------------
  |  |  648|   302k|    do { \
  |  |  649|   302k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   302k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   302k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 302k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   302k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   99|   651k|        while (! igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (99:16): [True: 349k, False: 302k]
  ------------------
  100|   349k|            igraph_integer_t eids_size;
  101|   349k|            igraph_integer_t act_node = igraph_dqueue_int_pop(&q);
  102|   349k|            IGRAPH_CHECK(igraph_incident(graph, &eids, act_node,
  ------------------
  |  |  648|   349k|    do { \
  |  |  649|   349k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   349k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   349k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 349k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   349k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  103|   349k|                                         IGRAPH_ALL));
  104|   349k|            eids_size = igraph_vector_int_size(&eids);
  105|   499k|            for (igraph_integer_t j = 0; j < eids_size; j++) {
  ------------------
  |  Branch (105:42): [True: 149k, False: 349k]
  ------------------
  106|   149k|                igraph_integer_t edge = VECTOR(eids)[j];
  ------------------
  |  |   65|   149k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  107|   149k|                if (! IGRAPH_BIT_TEST(added_edges, edge)) {
  ------------------
  |  |  144|   149k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|   149k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|   149k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   149k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|   149k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   149k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (107:21): [True: 103k, False: 46.9k]
  ------------------
  108|   103k|                    igraph_integer_t to = IGRAPH_OTHER(graph, edge, act_node);
  ------------------
  |  |  144|   103k|    ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|   103k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|   103k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  113|  77.2k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  77.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  25.7k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  25.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:25): [True: 77.2k, False: 25.7k]
  |  |  ------------------
  ------------------
  109|   103k|                    if (! IGRAPH_BIT_TEST(already_added, to)) {
  ------------------
  |  |  144|   103k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|   103k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|   103k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   103k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|   103k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   103k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (109:25): [True: 46.9k, False: 56.0k]
  ------------------
  110|  46.9k|                        IGRAPH_BIT_SET(already_added, to);
  ------------------
  |  |  105|  46.9k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  46.9k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  46.9k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  46.9k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  46.9k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  111|  46.9k|                        IGRAPH_BIT_SET(added_edges, edge);
  ------------------
  |  |  105|  46.9k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  46.9k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  46.9k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  46.9k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  46.9k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  112|  46.9k|                        igraph_vector_int_push_back(res, edge); /* reserved */
  113|  46.9k|                        IGRAPH_CHECK(igraph_dqueue_int_push(&q, to));
  ------------------
  |  |  648|  46.9k|    do { \
  |  |  649|  46.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  46.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  46.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 46.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  46.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  114|  46.9k|                    }
  115|   103k|                }
  116|   149k|            }
  117|   349k|        }
  118|   302k|    }
  119|       |
  120|  2.02k|    igraph_dqueue_int_destroy(&q);
  121|  2.02k|    igraph_vector_int_destroy(&eids);
  122|  2.02k|    igraph_bitset_destroy(&already_added);
  123|  2.02k|    igraph_bitset_destroy(&added_edges);
  124|  2.02k|    IGRAPH_FINALLY_CLEAN(4);
  125|       |
  126|  2.02k|    return IGRAPH_SUCCESS;
  127|  2.02k|}
igraph_minimum_spanning_tree:
  465|  2.02k|{
  466|  2.02k|    if (method == IGRAPH_MST_AUTOMATIC) {
  ------------------
  |  Branch (466:9): [True: 0, False: 2.02k]
  ------------------
  467|       |        /* For now we use igraph_minimum_spanning_tree_kruskal() unconditionally
  468|       |         * for the weighted case; see benchmarks. */
  469|      0|        if (weights == NULL) {
  ------------------
  |  Branch (469:13): [True: 0, False: 0]
  ------------------
  470|      0|            method = IGRAPH_MST_UNWEIGHTED;
  471|      0|        } else {
  472|      0|            method = IGRAPH_MST_KRUSKAL;
  473|      0|        }
  474|      0|    }
  475|  2.02k|    switch (method) {
  476|  2.02k|    case IGRAPH_MST_UNWEIGHTED:
  ------------------
  |  Branch (476:5): [True: 2.02k, False: 0]
  ------------------
  477|  2.02k|        return igraph_i_minimum_spanning_tree_unweighted(graph, res);
  478|      0|    case IGRAPH_MST_PRIM:
  ------------------
  |  Branch (478:5): [True: 0, False: 2.02k]
  ------------------
  479|      0|        return igraph_i_minimum_spanning_tree_prim(graph, res, weights);
  480|      0|    case IGRAPH_MST_KRUSKAL:
  ------------------
  |  Branch (480:5): [True: 0, False: 2.02k]
  ------------------
  481|      0|        return igraph_i_minimum_spanning_tree_kruskal(graph, res, weights);
  482|      0|    default:
  ------------------
  |  Branch (482:5): [True: 0, False: 2.02k]
  ------------------
  483|      0|        IGRAPH_ERROR("Invalid method for minimum spanning tree.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  484|  2.02k|    }
  485|  2.02k|}
spanning_trees.c:max_tree_edges:
   30|  2.02k|static igraph_integer_t max_tree_edges(igraph_integer_t no_of_nodes, igraph_integer_t no_of_edges) {
   31|  2.02k|    if (no_of_nodes == 0) return 0;
  ------------------
  |  Branch (31:9): [True: 1, False: 2.02k]
  ------------------
   32|  2.02k|    if (no_of_edges < no_of_nodes) return no_of_edges;
  ------------------
  |  Branch (32:9): [True: 1.78k, False: 241]
  ------------------
   33|    241|    return no_of_nodes - 1;
   34|  2.02k|}

igraph_add_edge:
   51|  2.02k|igraph_error_t igraph_add_edge(igraph_t *graph, igraph_integer_t from, igraph_integer_t to) {
   52|  2.02k|    igraph_vector_int_t edges;
   53|       |
   54|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, 2);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   55|       |
   56|  2.02k|    VECTOR(edges)[0] = from;
  ------------------
  |  |   65|  2.02k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   57|  2.02k|    VECTOR(edges)[1] = to;
  ------------------
  |  |   65|  2.02k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   58|  2.02k|    IGRAPH_CHECK(igraph_add_edges(graph, &edges, NULL));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   59|       |
   60|  2.02k|    igraph_vector_int_destroy(&edges);
   61|  2.02k|    IGRAPH_FINALLY_CLEAN(1);
   62|  2.02k|    return IGRAPH_SUCCESS;
   63|  2.02k|}

igraph_i_rewire:
   42|  2.01k|igraph_error_t igraph_i_rewire(igraph_t *graph, igraph_integer_t n, igraph_rewiring_t mode, igraph_bool_t use_adjlist) {
   43|  2.01k|    const igraph_integer_t no_of_edges = igraph_ecount(graph);
   44|  2.01k|    char message[256];
   45|  2.01k|    igraph_integer_t a, b, c, d, dummy, num_swaps, num_successful_swaps;
   46|  2.01k|    igraph_vector_int_t eids;
   47|  2.01k|    igraph_vector_int_t edgevec, alledges;
   48|  2.01k|    const igraph_bool_t directed = igraph_is_directed(graph);
   49|  2.01k|    const igraph_bool_t loops = (mode & IGRAPH_REWIRING_SIMPLE_LOOPS);
   50|  2.01k|    igraph_bool_t ok;
   51|  2.01k|    igraph_es_t es;
   52|  2.01k|    igraph_adjlist_t al;
   53|       |
   54|  2.01k|    if (no_of_edges < 2) {
  ------------------
  |  Branch (54:9): [True: 724, False: 1.28k]
  ------------------
   55|       |        /* There are no possible rewirings, return with the same graph. */
   56|    724|        return IGRAPH_SUCCESS;
   57|    724|    }
   58|       |
   59|  1.28k|    RNG_BEGIN();
  ------------------
  |  |  170|  1.28k|    do { if (!igraph_rng_default()->is_seeded) { \
  |  |  ------------------
  |  |  |  Branch (170:14): [True: 0, False: 1.28k]
  |  |  ------------------
  |  |  171|      0|        igraph_rng_seed(igraph_rng_default(), time(0)); \
  |  |  172|      0|        igraph_rng_default()->is_seeded = true; \
  |  |  173|  1.28k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (173:16): [Folded - Ignored]
  |  |  ------------------
  ------------------
   60|       |
   61|  1.28k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&eids, 2);
  ------------------
  |  |  124|  1.28k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  1.28k|    do { \
  |  |  |  |  649|  1.28k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.28k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.28k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.28k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  1.28k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  1.28k|    do { \
  |  |  |  |  592|  1.28k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  1.28k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  1.28k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  1.28k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  1.28k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  1.28k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   62|       |
   63|  1.28k|    if (use_adjlist) {
  ------------------
  |  Branch (63:9): [True: 769, False: 520]
  ------------------
   64|       |        /* As well as the sorted adjacency list, we maintain an unordered
   65|       |         * list of edges for picking a random edge in constant time.
   66|       |         */
   67|    769|        IGRAPH_CHECK(igraph_adjlist_init(graph, &al, IGRAPH_OUT, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  648|    769|    do { \
  |  |  649|    769|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    769|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    769|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 769]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    769|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   68|    769|        IGRAPH_FINALLY(igraph_adjlist_destroy, &al);
  ------------------
  |  |  591|    769|    do { \
  |  |  592|    769|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    769|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    769|         * incorrect destructor function with the pointer */ \
  |  |  595|    769|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    769|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    769|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   69|    769|        IGRAPH_VECTOR_INT_INIT_FINALLY(&alledges, no_of_edges * 2);
  ------------------
  |  |  124|    769|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    769|    do { \
  |  |  |  |  649|    769|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    769|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    769|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 769]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    769|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    769|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    769|    do { \
  |  |  |  |  592|    769|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    769|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    769|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    769|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    769|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    769|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   70|    769|        igraph_get_edgelist(graph, &alledges, /*bycol=*/ false);
   71|    769|    } else {
   72|    520|        IGRAPH_VECTOR_INT_INIT_FINALLY(&edgevec, 4);
  ------------------
  |  |  124|    520|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    520|    do { \
  |  |  |  |  649|    520|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    520|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    520|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 520]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    520|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    520|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    520|    do { \
  |  |  |  |  592|    520|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    520|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    520|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    520|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    520|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    520|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   73|    520|        es = igraph_ess_vector(&eids);
   74|    520|    }
   75|       |
   76|       |    /* We count both successful and unsuccessful rewiring trials.
   77|       |     * This is necessary for uniform sampling. */
   78|       |
   79|  1.28k|    num_swaps = num_successful_swaps = 0;
   80|  49.4k|    while (num_swaps < n) {
  ------------------
  |  Branch (80:12): [True: 48.1k, False: 1.28k]
  ------------------
   81|       |
   82|  48.1k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|  48.1k|    do { \
  |  |   48|  48.1k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 48.1k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|  48.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   83|  48.1k|        if (num_swaps % 1000 == 0) {
  ------------------
  |  Branch (83:13): [True: 1.28k, False: 46.8k]
  ------------------
   84|  1.28k|            snprintf(message, sizeof(message),
   85|  1.28k|                     "Random rewiring (%.2f%% of the trials were successful)",
   86|  1.28k|                     num_swaps > 0 ? ((100.0 * num_successful_swaps) / num_swaps) : 0.0);
  ------------------
  |  Branch (86:22): [True: 0, False: 1.28k]
  ------------------
   87|  1.28k|            IGRAPH_PROGRESS(message, (100.0 * num_swaps) / n, 0);
  ------------------
  |  |  174|  1.28k|    do { \
  |  |  175|  1.28k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  648|  1.28k|    do { \
  |  |  |  |  649|  1.28k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.28k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.28k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.28k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  176|  1.28k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (176:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   88|  1.28k|        }
   89|       |
   90|  48.1k|        switch (mode) {
   91|  48.1k|        case IGRAPH_REWIRING_SIMPLE:
  ------------------
  |  Branch (91:9): [True: 48.1k, False: 0]
  ------------------
   92|  48.1k|        case IGRAPH_REWIRING_SIMPLE_LOOPS:
  ------------------
  |  Branch (92:9): [True: 0, False: 48.1k]
  ------------------
   93|  48.1k|            ok = true;
   94|       |
   95|       |            /* Choose two edges randomly */
   96|  48.1k|            VECTOR(eids)[0] = RNG_INTEGER(0, no_of_edges - 1);
  ------------------
  |  |   65|  48.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(eids)[0] = RNG_INTEGER(0, no_of_edges - 1);
  ------------------
  |  |  179|  48.1k|#define RNG_INTEGER(l,h) (igraph_rng_get_integer(igraph_rng_default(),(l),(h)))
  ------------------
   97|  49.9k|            do {
   98|  49.9k|                VECTOR(eids)[1] = RNG_INTEGER(0, no_of_edges - 1);
  ------------------
  |  |   65|  49.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(eids)[1] = RNG_INTEGER(0, no_of_edges - 1);
  ------------------
  |  |  179|  49.9k|#define RNG_INTEGER(l,h) (igraph_rng_get_integer(igraph_rng_default(),(l),(h)))
  ------------------
   99|  49.9k|            } while (VECTOR(eids)[0] == VECTOR(eids)[1]);
  ------------------
  |  |   65|  49.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          } while (VECTOR(eids)[0] == VECTOR(eids)[1]);
  ------------------
  |  |   65|  49.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (99:22): [True: 1.83k, False: 48.1k]
  ------------------
  100|       |
  101|       |            /* Get the endpoints */
  102|  48.1k|            if (use_adjlist) {
  ------------------
  |  Branch (102:17): [True: 45.4k, False: 2.72k]
  ------------------
  103|  45.4k|                a = VECTOR(alledges)[VECTOR(eids)[0] * 2];
  ------------------
  |  |   65|  45.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              a = VECTOR(alledges)[VECTOR(eids)[0] * 2];
  ------------------
  |  |   65|  45.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  104|  45.4k|                b = VECTOR(alledges)[VECTOR(eids)[0] * 2 + 1];
  ------------------
  |  |   65|  45.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              b = VECTOR(alledges)[VECTOR(eids)[0] * 2 + 1];
  ------------------
  |  |   65|  45.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  105|  45.4k|                c = VECTOR(alledges)[VECTOR(eids)[1] * 2];
  ------------------
  |  |   65|  45.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              c = VECTOR(alledges)[VECTOR(eids)[1] * 2];
  ------------------
  |  |   65|  45.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  106|  45.4k|                d = VECTOR(alledges)[VECTOR(eids)[1] * 2 + 1];
  ------------------
  |  |   65|  45.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              d = VECTOR(alledges)[VECTOR(eids)[1] * 2 + 1];
  ------------------
  |  |   65|  45.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  107|  45.4k|            } else {
  108|  2.72k|                IGRAPH_CHECK(igraph_edge(graph, VECTOR(eids)[0], &a, &b));
  ------------------
  |  |  648|  2.72k|    do { \
  |  |  649|  2.72k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.72k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.72k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.72k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  109|  2.72k|                IGRAPH_CHECK(igraph_edge(graph, VECTOR(eids)[1], &c, &d));
  ------------------
  |  |  648|  2.72k|    do { \
  |  |  649|  2.72k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.72k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.72k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.72k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  110|  2.72k|            }
  111|       |
  112|       |            /* For an undirected graph, we have two "variants" of each edge, i.e.
  113|       |             * a -- b and b -- a. Since some rewirings can be performed only when we
  114|       |             * "swap" the endpoints, we do it now with probability 0.5 */
  115|  48.1k|            if (!directed && RNG_BOOL()) {
  ------------------
  |  |  178|  48.1k|#define RNG_BOOL()       (igraph_rng_get_bool(igraph_rng_default()))
  |  |  ------------------
  |  |  |  Branch (178:26): [True: 24.1k, False: 24.0k]
  |  |  ------------------
  ------------------
  |  Branch (115:17): [True: 48.1k, False: 0]
  ------------------
  116|  24.1k|                dummy = c; c = d; d = dummy;
  117|  24.1k|                if (use_adjlist) {
  ------------------
  |  Branch (117:21): [True: 22.7k, False: 1.39k]
  ------------------
  118|       |                    /* Flip the edge in the unordered edge-list, so the update later on
  119|       |                     * hits the correct end. */
  120|  22.7k|                    VECTOR(alledges)[VECTOR(eids)[1] * 2] = c;
  ------------------
  |  |   65|  22.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(alledges)[VECTOR(eids)[1] * 2] = c;
  ------------------
  |  |   65|  22.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  121|  22.7k|                    VECTOR(alledges)[VECTOR(eids)[1] * 2 + 1] = d;
  ------------------
  |  |   65|  22.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(alledges)[VECTOR(eids)[1] * 2 + 1] = d;
  ------------------
  |  |   65|  22.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  122|  22.7k|                }
  123|  24.1k|            }
  124|       |
  125|       |            /* If we do not touch loops, check whether a == b or c == d and disallow
  126|       |             * the swap if needed */
  127|  48.1k|            if (!loops && (a == b || c == d)) {
  ------------------
  |  Branch (127:17): [True: 48.1k, False: 0]
  |  Branch (127:28): [True: 0, False: 48.1k]
  |  Branch (127:38): [True: 0, False: 48.1k]
  ------------------
  128|      0|                ok = false;
  129|  48.1k|            } else {
  130|       |                /* Check whether they are suitable for rewiring */
  131|  48.1k|                if (a == c || b == d) {
  ------------------
  |  Branch (131:21): [True: 5.22k, False: 42.9k]
  |  Branch (131:31): [True: 2.88k, False: 40.0k]
  ------------------
  132|       |                    /* Swapping would have no effect */
  133|  8.11k|                    ok = false;
  134|  40.0k|                } else {
  135|       |                    /* a != c && b != d */
  136|       |                    /* If a == d or b == c, the swap would generate at least one loop, so
  137|       |                     * we disallow them unless we want to have loops */
  138|  40.0k|                    ok = loops || (a != d && b != c);
  ------------------
  |  Branch (138:26): [True: 0, False: 40.0k]
  |  Branch (138:36): [True: 34.7k, False: 5.31k]
  |  Branch (138:46): [True: 31.9k, False: 2.80k]
  ------------------
  139|       |                    /* Also, if a == b and c == d and we allow loops, doing the swap
  140|       |                     * would result in a multiple edge if the graph is undirected */
  141|  40.0k|                    ok = ok && (directed || a != b || c != d);
  ------------------
  |  Branch (141:26): [True: 31.9k, False: 8.11k]
  |  Branch (141:33): [True: 0, False: 31.9k]
  |  Branch (141:45): [True: 31.9k, False: 0]
  |  Branch (141:55): [True: 0, False: 0]
  ------------------
  142|  40.0k|                }
  143|  48.1k|            }
  144|       |
  145|       |            /* All good so far. Now check for the existence of a --> d and c --> b to
  146|       |             * disallow the creation of multiple edges */
  147|  48.1k|            if (ok) {
  ------------------
  |  Branch (147:17): [True: 31.9k, False: 16.2k]
  ------------------
  148|  31.9k|                if (use_adjlist) {
  ------------------
  |  Branch (148:21): [True: 30.2k, False: 1.72k]
  ------------------
  149|  30.2k|                    if (igraph_adjlist_has_edge(&al, a, d, directed)) {
  ------------------
  |  Branch (149:25): [True: 3.08k, False: 27.1k]
  ------------------
  150|  3.08k|                        ok = false;
  151|  3.08k|                    }
  152|  30.2k|                } else {
  153|  1.72k|                    IGRAPH_CHECK(igraph_are_adjacent(graph, a, d, &ok));
  ------------------
  |  |  648|  1.72k|    do { \
  |  |  649|  1.72k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.72k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.72k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.72k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  154|  1.72k|                    ok = !ok;
  155|  1.72k|                }
  156|  31.9k|            }
  157|  48.1k|            if (ok) {
  ------------------
  |  Branch (157:17): [True: 28.7k, False: 19.4k]
  ------------------
  158|  28.7k|                if (use_adjlist) {
  ------------------
  |  Branch (158:21): [True: 27.1k, False: 1.60k]
  ------------------
  159|  27.1k|                    if (igraph_adjlist_has_edge(&al, c, b, directed)) {
  ------------------
  |  Branch (159:25): [True: 1.57k, False: 25.5k]
  ------------------
  160|  1.57k|                        ok = false;
  161|  1.57k|                    }
  162|  27.1k|                } else {
  163|  1.60k|                    IGRAPH_CHECK(igraph_are_adjacent(graph, c, b, &ok));
  ------------------
  |  |  648|  1.60k|    do { \
  |  |  649|  1.60k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.60k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.60k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.60k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.60k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  164|  1.60k|                    ok = !ok;
  165|  1.60k|                }
  166|  28.7k|            }
  167|       |
  168|       |            /* If we are still okay, we can perform the rewiring */
  169|  48.1k|            if (ok) {
  ------------------
  |  Branch (169:17): [True: 27.0k, False: 21.0k]
  ------------------
  170|       |                /* printf("Deleting: %" IGRAPH_PRId " -> %" IGRAPH_PRId ", %" IGRAPH_PRId " -> %" IGRAPH_PRId "\n",
  171|       |                              a, b, c, d); */
  172|  27.0k|                if (use_adjlist) {
  ------------------
  |  Branch (172:21): [True: 25.5k, False: 1.54k]
  ------------------
  173|       |                    /* Replace entry in sorted adjlist: */
  174|  25.5k|                    IGRAPH_CHECK(igraph_adjlist_replace_edge(&al, a, b, d, directed));
  ------------------
  |  |  648|  25.5k|    do { \
  |  |  649|  25.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  25.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  25.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 25.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  25.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  175|  25.5k|                    IGRAPH_CHECK(igraph_adjlist_replace_edge(&al, c, d, b, directed));
  ------------------
  |  |  648|  25.5k|    do { \
  |  |  649|  25.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  25.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  25.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 25.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  25.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  176|       |                    /* Also replace in unsorted edgelist: */
  177|  25.5k|                    VECTOR(alledges)[VECTOR(eids)[0] * 2 + 1] = d;
  ------------------
  |  |   65|  25.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(alledges)[VECTOR(eids)[0] * 2 + 1] = d;
  ------------------
  |  |   65|  25.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  178|  25.5k|                    VECTOR(alledges)[VECTOR(eids)[1] * 2 + 1] = b;
  ------------------
  |  |   65|  25.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(alledges)[VECTOR(eids)[1] * 2 + 1] = b;
  ------------------
  |  |   65|  25.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  179|  25.5k|                } else {
  180|  1.54k|                    IGRAPH_CHECK(igraph_delete_edges(graph, es));
  ------------------
  |  |  648|  1.54k|    do { \
  |  |  649|  1.54k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.54k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.54k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.54k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.54k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  181|  1.54k|                    VECTOR(edgevec)[0] = a; VECTOR(edgevec)[1] = d;
  ------------------
  |  |   65|  1.54k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(edgevec)[0] = a; VECTOR(edgevec)[1] = d;
  ------------------
  |  |   65|  1.54k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  182|  1.54k|                    VECTOR(edgevec)[2] = c; VECTOR(edgevec)[3] = b;
  ------------------
  |  |   65|  1.54k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(edgevec)[2] = c; VECTOR(edgevec)[3] = b;
  ------------------
  |  |   65|  1.54k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  183|       |                    /* printf("Adding: %" IGRAPH_PRId " -> %" IGRAPH_PRId ", %" IGRAPH_PRId " -> %" IGRAPH_PRId "\n",
  184|       |                                a, d, c, b); */
  185|  1.54k|                    IGRAPH_CHECK(igraph_add_edges(graph, &edgevec, 0));
  ------------------
  |  |  648|  1.54k|    do { \
  |  |  649|  1.54k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.54k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.54k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.54k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.54k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  186|  1.54k|                }
  187|  27.0k|                num_successful_swaps++;
  188|  27.0k|            }
  189|  48.1k|            break;
  190|  48.1k|        default:
  ------------------
  |  Branch (190:9): [True: 0, False: 48.1k]
  ------------------
  191|      0|            RNG_END();
  ------------------
  |  |  175|      0|    do { /* nothing */ } while (0)
  |  |  ------------------
  |  |  |  Branch (175:33): [Folded - Ignored]
  |  |  ------------------
  ------------------
  192|      0|            IGRAPH_ERROR("Invalid rewiring mode.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  193|  48.1k|        }
  194|  48.1k|        num_swaps++;
  195|  48.1k|    }
  196|       |
  197|  1.28k|    if (use_adjlist) {
  ------------------
  |  Branch (197:9): [True: 769, False: 520]
  ------------------
  198|       |        /* Replace graph edges with the adjlist current state */
  199|    769|        IGRAPH_CHECK(igraph_delete_edges(graph, igraph_ess_all(IGRAPH_EDGEORDER_ID)));
  ------------------
  |  |  648|    769|    do { \
  |  |  649|    769|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    769|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    769|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 769]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    769|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  200|    769|        IGRAPH_CHECK(igraph_add_edges(graph, &alledges, 0));
  ------------------
  |  |  648|    769|    do { \
  |  |  649|    769|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    769|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    769|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 769]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    769|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  201|    769|    }
  202|       |
  203|  1.28k|    IGRAPH_PROGRESS("Random rewiring: ", 100.0, 0);
  ------------------
  |  |  174|  1.28k|    do { \
  |  |  175|  1.28k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  648|  1.28k|    do { \
  |  |  |  |  649|  1.28k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.28k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.28k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.28k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  176|  1.28k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (176:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  204|       |
  205|  1.28k|    if (use_adjlist) {
  ------------------
  |  Branch (205:9): [True: 769, False: 520]
  ------------------
  206|    769|        igraph_vector_int_destroy(&alledges);
  207|    769|        igraph_adjlist_destroy(&al);
  208|    769|    } else {
  209|    520|        igraph_vector_int_destroy(&edgevec);
  210|    520|    }
  211|       |
  212|  1.28k|    igraph_vector_int_destroy(&eids);
  213|  1.28k|    IGRAPH_FINALLY_CLEAN(use_adjlist ? 3 : 2);
  ------------------
  |  Branch (213:26): [True: 769, False: 520]
  ------------------
  214|       |
  215|  1.28k|    RNG_END();
  ------------------
  |  |  175|  1.28k|    do { /* nothing */ } while (0)
  |  |  ------------------
  |  |  |  Branch (175:33): [Folded - Ignored]
  |  |  ------------------
  ------------------
  216|       |
  217|  1.28k|    return IGRAPH_SUCCESS;
  218|  1.28k|}
igraph_rewire:
  261|  2.01k|igraph_error_t igraph_rewire(igraph_t *graph, igraph_integer_t n, igraph_rewiring_t mode) {
  262|  2.01k|    igraph_bool_t use_adjlist = n >= REWIRE_ADJLIST_THRESHOLD;
  ------------------
  |  |   39|  2.01k|#define REWIRE_ADJLIST_THRESHOLD 10
  ------------------
  263|  2.01k|    return igraph_i_rewire(graph, n, mode, use_adjlist);
  264|  2.01k|}

igraph_simplify:
   57|  2.02k|                               const igraph_attribute_combination_t *edge_comb) {
   58|       |
   59|  2.02k|    igraph_vector_int_t edges;
   60|  2.02k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
   61|  2.02k|    igraph_integer_t no_of_edges = igraph_ecount(graph);
   62|  2.02k|    igraph_integer_t edge;
   63|  2.02k|    igraph_bool_t attr = edge_comb && igraph_has_attribute_table();
  ------------------
  |  Branch (63:26): [True: 0, False: 2.02k]
  |  Branch (63:39): [True: 0, False: 0]
  ------------------
   64|  2.02k|    igraph_integer_t from, to, pfrom = -1, pto = -2;
   65|  2.02k|    igraph_t res;
   66|  2.02k|    igraph_es_t es;
   67|  2.02k|    igraph_eit_t eit;
   68|  2.02k|    igraph_vector_int_t mergeinto;
   69|  2.02k|    igraph_integer_t actedge;
   70|       |
   71|       |    /* if we already know there are no multi-edges, they don't need to be removed */
   72|  2.02k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MULTI) &&
  ------------------
  |  Branch (72:9): [True: 2.02k, False: 0]
  ------------------
   73|  2.02k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_MULTI)) {
  ------------------
  |  Branch (73:9): [True: 1.28k, False: 741]
  ------------------
   74|  1.28k|        remove_multiple = false;
   75|  1.28k|    }
   76|       |
   77|       |    /* if we already know there are no loops, they don't need to be removed */
   78|  2.02k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (78:9): [True: 2.02k, False: 0]
  ------------------
   79|  2.02k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (79:9): [True: 1.28k, False: 743]
  ------------------
   80|  1.28k|        remove_loops = false;
   81|  1.28k|    }
   82|       |
   83|  2.02k|    if (!remove_multiple && !remove_loops)
  ------------------
  |  Branch (83:9): [True: 1.28k, False: 741]
  |  Branch (83:29): [True: 1.03k, False: 251]
  ------------------
   84|       |        /* nothing to do */
   85|  1.03k|    {
   86|  1.03k|        return IGRAPH_SUCCESS;
   87|  1.03k|    }
   88|       |
   89|    992|    if (!remove_multiple) {
  ------------------
  |  Branch (89:9): [True: 251, False: 741]
  ------------------
   90|    251|        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|    251|        IGRAPH_VECTOR_INT_INIT_FINALLY(&edges_to_delete, 0);
  ------------------
  |  |  124|    251|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    251|    do { \
  |  |  |  |  649|    251|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    251|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    251|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 251]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    251|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    251|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    251|    do { \
  |  |  |  |  592|    251|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    251|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    251|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    251|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    251|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    251|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   95|    251|        IGRAPH_CHECK(igraph_es_all(&es, IGRAPH_EDGEORDER_ID));
  ------------------
  |  |  648|    251|    do { \
  |  |  649|    251|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    251|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    251|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 251]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    251|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   96|    251|        IGRAPH_FINALLY(igraph_es_destroy, &es);
  ------------------
  |  |  591|    251|    do { \
  |  |  592|    251|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    251|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    251|         * incorrect destructor function with the pointer */ \
  |  |  595|    251|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    251|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    251|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   97|    251|        IGRAPH_CHECK(igraph_eit_create(graph, es, &eit));
  ------------------
  |  |  648|    251|    do { \
  |  |  649|    251|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    251|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    251|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 251]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    251|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   98|    251|        IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  591|    251|    do { \
  |  |  592|    251|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    251|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    251|         * incorrect destructor function with the pointer */ \
  |  |  595|    251|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    251|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    251|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   99|       |
  100|  8.17k|        while (!IGRAPH_EIT_END(eit)) {
  ------------------
  |  |  370|  8.17k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
  |  Branch (100:16): [True: 7.92k, False: 251]
  ------------------
  101|  7.92k|            edge = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  404|  7.92k|    (igraph_integer_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (404:25): [True: 7.92k, False: 0]
  |  |  ------------------
  |  |  405|  7.92k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  102|  7.92k|            from = IGRAPH_FROM(graph, edge);
  ------------------
  |  |  113|  7.92k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  7.92k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  103|  7.92k|            to = IGRAPH_TO(graph, edge);
  ------------------
  |  |  126|  7.92k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  7.92k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  104|  7.92k|            if (from == to) {
  ------------------
  |  Branch (104:17): [True: 363, False: 7.55k]
  ------------------
  105|    363|                IGRAPH_CHECK(igraph_vector_int_push_back(&edges_to_delete, edge));
  ------------------
  |  |  648|    363|    do { \
  |  |  649|    363|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    363|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    363|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 363]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    363|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  106|    363|            }
  107|  7.92k|            IGRAPH_EIT_NEXT(eit);
  ------------------
  |  |  358|  7.92k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  108|  7.92k|        }
  109|       |
  110|    251|        igraph_eit_destroy(&eit);
  111|    251|        igraph_es_destroy(&es);
  112|    251|        IGRAPH_FINALLY_CLEAN(2);
  113|       |
  114|    251|        if (igraph_vector_int_size(&edges_to_delete) > 0) {
  ------------------
  |  Branch (114:13): [True: 251, False: 0]
  ------------------
  115|    251|            IGRAPH_CHECK(igraph_delete_edges(graph, igraph_ess_vector(&edges_to_delete)));
  ------------------
  |  |  648|    251|    do { \
  |  |  649|    251|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    251|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    251|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 251]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    251|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  116|    251|        }
  117|       |
  118|    251|        igraph_vector_int_destroy(&edges_to_delete);
  119|    251|        IGRAPH_FINALLY_CLEAN(1);
  120|       |
  121|    251|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, false);
  122|       |
  123|    251|        return IGRAPH_SUCCESS;
  124|    251|    }
  125|       |
  126|    741|    if (attr) {
  ------------------
  |  Branch (126:9): [True: 0, False: 741]
  ------------------
  127|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&mergeinto, no_of_edges);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  128|      0|    }
  129|    741|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, 0);
  ------------------
  |  |  124|    741|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    741|    do { \
  |  |  |  |  649|    741|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    741|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    741|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 741]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    741|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    741|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    741|    do { \
  |  |  |  |  592|    741|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    741|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    741|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    741|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    741|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    741|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  130|    741|    IGRAPH_CHECK(igraph_vector_int_reserve(&edges, no_of_edges * 2));
  ------------------
  |  |  648|    741|    do { \
  |  |  649|    741|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    741|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    741|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 741]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    741|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  131|       |
  132|    741|    IGRAPH_CHECK(igraph_es_all(&es, IGRAPH_EDGEORDER_FROM));
  ------------------
  |  |  648|    741|    do { \
  |  |  649|    741|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    741|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    741|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 741]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    741|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  133|    741|    IGRAPH_FINALLY(igraph_es_destroy, &es);
  ------------------
  |  |  591|    741|    do { \
  |  |  592|    741|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    741|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    741|         * incorrect destructor function with the pointer */ \
  |  |  595|    741|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    741|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    741|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  134|    741|    IGRAPH_CHECK(igraph_eit_create(graph, es, &eit));
  ------------------
  |  |  648|    741|    do { \
  |  |  649|    741|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    741|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    741|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 741]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    741|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  135|    741|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  591|    741|    do { \
  |  |  592|    741|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    741|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    741|         * incorrect destructor function with the pointer */ \
  |  |  595|    741|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    741|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    741|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  136|       |
  137|  40.7k|    for (actedge = -1; !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  370|  40.7k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                  for (actedge = -1; !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  358|  40.0k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (137:24): [True: 40.0k, False: 741]
  ------------------
  138|  40.0k|        edge = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  404|  40.0k|    (igraph_integer_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (404:25): [True: 0, False: 40.0k]
  |  |  ------------------
  |  |  405|  40.0k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   65|  40.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  139|  40.0k|        from = IGRAPH_FROM(graph, edge);
  ------------------
  |  |  113|  40.0k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  40.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  140|  40.0k|        to = IGRAPH_TO(graph, edge);
  ------------------
  |  |  126|  40.0k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  40.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  141|       |
  142|  40.0k|        if (remove_loops && from == to) {
  ------------------
  |  Branch (142:13): [True: 29.1k, False: 10.8k]
  |  Branch (142:29): [True: 14.8k, False: 14.3k]
  ------------------
  143|       |            /* Loop edge to be removed */
  144|  14.8k|            if (attr) {
  ------------------
  |  Branch (144:17): [True: 0, False: 14.8k]
  ------------------
  145|      0|                VECTOR(mergeinto)[edge] = -1;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  146|      0|            }
  147|  25.2k|        } else if (remove_multiple && from == pfrom && to == pto) {
  ------------------
  |  Branch (147:20): [True: 25.2k, False: 0]
  |  Branch (147:39): [True: 10.6k, False: 14.5k]
  |  Branch (147:56): [True: 8.88k, False: 1.78k]
  ------------------
  148|       |            /* Multiple edge to be contracted */
  149|  8.88k|            if (attr) {
  ------------------
  |  Branch (149:17): [True: 0, False: 8.88k]
  ------------------
  150|      0|                VECTOR(mergeinto)[edge] = actedge;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  151|      0|            }
  152|  16.3k|        } else {
  153|       |            /* Edge to be kept */
  154|  16.3k|            igraph_vector_int_push_back(&edges, from);  /* reserved */
  155|  16.3k|            igraph_vector_int_push_back(&edges, to);  /* reserved */
  156|  16.3k|            if (attr) {
  ------------------
  |  Branch (156:17): [True: 0, False: 16.3k]
  ------------------
  157|      0|                actedge++;
  158|      0|                VECTOR(mergeinto)[edge] = actedge;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  159|      0|            }
  160|  16.3k|        }
  161|  40.0k|        pfrom = from; pto = to;
  162|  40.0k|    }
  163|       |
  164|    741|    igraph_eit_destroy(&eit);
  165|    741|    igraph_es_destroy(&es);
  166|    741|    IGRAPH_FINALLY_CLEAN(2);
  167|       |
  168|    741|    IGRAPH_CHECK(igraph_create(&res, &edges, no_of_nodes, igraph_is_directed(graph)));
  ------------------
  |  |  648|    741|    do { \
  |  |  649|    741|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    741|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    741|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 741]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    741|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  169|       |
  170|    741|    igraph_vector_int_destroy(&edges);
  171|    741|    IGRAPH_FINALLY_CLEAN(1);
  172|       |
  173|    741|    IGRAPH_FINALLY(igraph_destroy, &res);
  ------------------
  |  |  591|    741|    do { \
  |  |  592|    741|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    741|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    741|         * incorrect destructor function with the pointer */ \
  |  |  595|    741|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    741|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    741|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  174|       |
  175|    741|    IGRAPH_CHECK(igraph_i_attribute_copy(&res, graph, true, true, /* edges= */ false));
  ------------------
  |  |  648|    741|    do { \
  |  |  649|    741|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    741|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    741|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 741]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    741|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  176|       |
  177|    741|    if (attr) {
  ------------------
  |  Branch (177:9): [True: 0, False: 741]
  ------------------
  178|      0|        igraph_fixed_vectorlist_t vl;
  179|      0|        IGRAPH_CHECK(igraph_fixed_vectorlist_convert(&vl, &mergeinto, actedge + 1));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  180|      0|        IGRAPH_FINALLY(igraph_fixed_vectorlist_destroy, &vl);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  181|       |
  182|      0|        IGRAPH_CHECK(igraph_i_attribute_combine_edges(graph, &res, &vl.vecs, edge_comb));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  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|    741|    IGRAPH_FINALLY_CLEAN(1);
  190|    741|    igraph_destroy(graph);
  191|    741|    *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|    741|    if (remove_loops) {
  ------------------
  |  Branch (196:9): [True: 492, False: 249]
  ------------------
  197|       |        /* Loop edges were removed so we know for sure that there aren't any
  198|       |         * loop edges now */
  199|    492|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, false);
  200|    492|    }
  201|       |
  202|    741|    if (remove_multiple) {
  ------------------
  |  Branch (202:9): [True: 741, False: 0]
  ------------------
  203|       |        /* Multi-edges were removed so we know for sure that there aren't any
  204|       |         * multi-edges now */
  205|    741|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_MULTI, false);
  206|    741|    }
  207|       |
  208|    741|    return IGRAPH_SUCCESS;
  209|    741|}

igraph_i_induced_subgraph_map:
  354|  2.16k|                                  igraph_bool_t map_is_prepared) {
  355|       |
  356|  2.16k|    if (impl == IGRAPH_SUBGRAPH_AUTO) {
  ------------------
  |  Branch (356:9): [True: 2.16k, False: 0]
  ------------------
  357|  2.16k|        IGRAPH_CHECK(igraph_i_induced_subgraph_suggest_implementation(graph, vids, &impl));
  ------------------
  |  |  648|  2.16k|    do { \
  |  |  649|  2.16k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.16k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.16k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.16k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.16k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  358|  2.16k|    }
  359|       |
  360|  2.16k|    switch (impl) {
  361|    243|    case IGRAPH_SUBGRAPH_COPY_AND_DELETE:
  ------------------
  |  Branch (361:5): [True: 243, False: 1.92k]
  ------------------
  362|    243|        return igraph_i_induced_subgraph_copy_and_delete(graph, res, vids, map, invmap);
  363|       |
  364|  1.92k|    case IGRAPH_SUBGRAPH_CREATE_FROM_SCRATCH:
  ------------------
  |  Branch (364:5): [True: 1.92k, False: 243]
  ------------------
  365|  1.92k|        return igraph_i_induced_subgraph_create_from_scratch(graph, res, vids, map,
  366|  1.92k|                invmap, /* map_is_prepared = */ map_is_prepared);
  367|       |
  368|      0|    default:
  ------------------
  |  Branch (368:5): [True: 0, False: 2.16k]
  ------------------
  369|      0|        IGRAPH_ERROR("unknown subgraph implementation type", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  370|  2.16k|    }
  371|  2.16k|}
igraph_subgraph_from_edges:
  538|  2.02k|) {
  539|       |
  540|  2.02k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  541|  2.02k|    igraph_integer_t no_of_edges = igraph_ecount(graph);
  542|  2.02k|    igraph_integer_t no_of_edges_to_delete_estimate;
  543|  2.02k|    igraph_vector_int_t delete = IGRAPH_VECTOR_NULL;
  ------------------
  |  |  104|  2.02k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
  544|  2.02k|    igraph_bitset_t vremain, eremain;
  545|  2.02k|    igraph_eit_t eit;
  546|       |
  547|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&delete, 0);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  548|  2.02k|    IGRAPH_BITSET_INIT_FINALLY(&vremain, no_of_nodes);
  ------------------
  |  |  261|  2.02k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  262|  2.02k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  263|  2.02k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (263:62): [Folded - Ignored]
  |  |  ------------------
  ------------------
  549|  2.02k|    IGRAPH_BITSET_INIT_FINALLY(&eremain, no_of_edges);
  ------------------
  |  |  261|  2.02k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  262|  2.02k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  263|  2.02k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (263:62): [Folded - Ignored]
  |  |  ------------------
  ------------------
  550|       |
  551|  2.02k|    IGRAPH_CHECK(igraph_eit_create(graph, eids, &eit));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  552|  2.02k|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  591|  2.02k|    do { \
  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  553|       |
  554|       |    /* Calculate how many edges there will be in the new graph. The result is
  555|       |     * a lower bound only as 'eit' may contain the same edge more than once. */
  556|  2.02k|    no_of_edges_to_delete_estimate = no_of_edges - IGRAPH_EIT_SIZE(eit);
  ------------------
  |  |  381|  2.02k|#define IGRAPH_EIT_SIZE(eit)  ((eit).end - (eit).start)
  ------------------
  557|  2.02k|    if (no_of_edges_to_delete_estimate < 0) {
  ------------------
  |  Branch (557:9): [True: 0, False: 2.02k]
  ------------------
  558|      0|        no_of_edges_to_delete_estimate = 0;
  559|      0|    }
  560|       |
  561|  2.02k|    IGRAPH_CHECK(igraph_vector_int_reserve(&delete, no_of_edges_to_delete_estimate));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  562|       |
  563|       |    /* Collect the vertex and edge IDs that will remain */
  564|  48.9k|    for (IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  392|  2.02k|#define IGRAPH_EIT_RESET(eit) ((eit).pos = (eit).start)
  ------------------
                  for (IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  370|  48.9k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                  for (IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  358|  46.9k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (564:33): [True: 46.9k, False: 2.02k]
  ------------------
  565|  46.9k|        igraph_integer_t eid = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  404|  46.9k|    (igraph_integer_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (404:25): [True: 0, False: 46.9k]
  |  |  ------------------
  |  |  405|  46.9k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  566|  46.9k|        igraph_integer_t from = IGRAPH_FROM(graph, eid), to = IGRAPH_TO(graph, eid);
  ------------------
  |  |  113|  46.9k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                      igraph_integer_t from = IGRAPH_FROM(graph, eid), to = IGRAPH_TO(graph, eid);
  ------------------
  |  |  126|  46.9k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  567|  46.9k|        IGRAPH_BIT_SET(eremain, eid);
  ------------------
  |  |  105|  46.9k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  46.9k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  46.9k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  46.9k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  46.9k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  568|  46.9k|        IGRAPH_BIT_SET(vremain, from);
  ------------------
  |  |  105|  46.9k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  46.9k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  46.9k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  46.9k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  46.9k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  569|  46.9k|        IGRAPH_BIT_SET(vremain, to);
  ------------------
  |  |  105|  46.9k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  46.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  46.9k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  46.9k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  46.9k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  46.9k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  570|  46.9k|    }
  571|       |
  572|  2.02k|    igraph_eit_destroy(&eit);
  573|  2.02k|    IGRAPH_FINALLY_CLEAN(1);
  574|       |
  575|       |    /* Collect the edge IDs to be deleted */
  576|  76.9k|    for (igraph_integer_t i = 0; i < no_of_edges; i++) {
  ------------------
  |  Branch (576:34): [True: 74.9k, False: 2.02k]
  ------------------
  577|  74.9k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|  74.9k|    do { \
  |  |   48|  74.9k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 74.9k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|  74.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  578|  74.9k|        if (! IGRAPH_BIT_TEST(eremain, i)) {
  ------------------
  |  |  144|  74.9k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  74.9k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  74.9k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  74.9k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  74.9k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (578:13): [True: 28.0k, False: 46.9k]
  ------------------
  579|  28.0k|            IGRAPH_CHECK(igraph_vector_int_push_back(&delete, i));
  ------------------
  |  |  648|  28.0k|    do { \
  |  |  649|  28.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  28.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  28.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 28.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  28.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  580|  28.0k|        }
  581|  74.9k|    }
  582|       |
  583|  2.02k|    igraph_bitset_destroy(&eremain);
  584|  2.02k|    IGRAPH_FINALLY_CLEAN(1);
  585|       |
  586|       |    /* Delete the unnecessary edges */
  587|  2.02k|    IGRAPH_CHECK(igraph_copy(res, graph));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  588|  2.02k|    IGRAPH_FINALLY(igraph_destroy, res);
  ------------------
  |  |  591|  2.02k|    do { \
  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  589|  2.02k|    IGRAPH_CHECK(igraph_delete_edges(res, igraph_ess_vector(&delete)));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  590|       |
  591|  2.02k|    if (delete_vertices) {
  ------------------
  |  Branch (591:9): [True: 0, False: 2.02k]
  ------------------
  592|       |        /* Collect the vertex IDs to be deleted */
  593|      0|        igraph_vector_int_clear(&delete);
  594|      0|        for (igraph_integer_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (594:38): [True: 0, False: 0]
  ------------------
  595|      0|            IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|      0|    do { \
  |  |   48|      0|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  596|      0|            if (! IGRAPH_BIT_TEST(vremain, i)) {
  ------------------
  |  |  144|      0|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|      0|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|      0|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (596:17): [True: 0, False: 0]
  ------------------
  597|      0|                IGRAPH_CHECK(igraph_vector_int_push_back(&delete, i));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  598|      0|            }
  599|      0|        }
  600|      0|    }
  601|       |
  602|  2.02k|    igraph_bitset_destroy(&vremain);
  603|  2.02k|    IGRAPH_FINALLY_CLEAN(1);
  604|       |
  605|       |    /* Delete the unnecessary vertices */
  606|  2.02k|    if (delete_vertices) {
  ------------------
  |  Branch (606:9): [True: 0, False: 2.02k]
  ------------------
  607|      0|        IGRAPH_CHECK(igraph_delete_vertices(res, igraph_vss_vector(&delete)));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  608|      0|    }
  609|       |
  610|  2.02k|    igraph_vector_int_destroy(&delete);
  611|  2.02k|    IGRAPH_FINALLY_CLEAN(2);
  612|       |
  613|  2.02k|    return IGRAPH_SUCCESS;
  614|  2.02k|}
subgraph.c:igraph_i_induced_subgraph_suggest_implementation:
  328|  2.16k|        igraph_subgraph_implementation_t *result) {
  329|  2.16k|    double ratio;
  330|  2.16k|    igraph_integer_t num_vs;
  331|       |
  332|  2.16k|    if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (332:9): [True: 0, False: 2.16k]
  ------------------
  333|      0|        ratio = 1.0;
  334|  2.16k|    } else {
  335|  2.16k|        IGRAPH_CHECK(igraph_vs_size(graph, &vids, &num_vs));
  ------------------
  |  |  648|  2.16k|    do { \
  |  |  649|  2.16k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.16k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.16k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.16k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.16k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  336|  2.16k|        ratio = (igraph_real_t) num_vs / igraph_vcount(graph);
  337|  2.16k|    }
  338|       |
  339|       |    /* TODO: needs benchmarking; threshold was chosen totally arbitrarily */
  340|  2.16k|    if (ratio > 0.5) {
  ------------------
  |  Branch (340:9): [True: 243, False: 1.92k]
  ------------------
  341|    243|        *result = IGRAPH_SUBGRAPH_COPY_AND_DELETE;
  342|  1.92k|    } else {
  343|  1.92k|        *result = IGRAPH_SUBGRAPH_CREATE_FROM_SCRATCH;
  344|  1.92k|    }
  345|       |
  346|  2.16k|    return IGRAPH_SUCCESS;
  347|  2.16k|}
subgraph.c:igraph_i_induced_subgraph_copy_and_delete:
   37|    243|        igraph_vector_int_t *map, igraph_vector_int_t *invmap) {
   38|       |
   39|    243|    const igraph_integer_t no_of_nodes = igraph_vcount(graph);
   40|    243|    igraph_integer_t no_of_new_nodes_estimate;
   41|    243|    igraph_vector_int_t delete;
   42|    243|    igraph_bitset_t remain;
   43|    243|    igraph_vit_t vit;
   44|       |
   45|    243|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  648|    243|    do { \
  |  |  649|    243|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    243|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    243|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 243]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    243|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   46|    243|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  591|    243|    do { \
  |  |  592|    243|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    243|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    243|         * incorrect destructor function with the pointer */ \
  |  |  595|    243|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    243|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    243|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   47|       |
   48|    243|    IGRAPH_VECTOR_INT_INIT_FINALLY(&delete, 0);
  ------------------
  |  |  124|    243|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    243|    do { \
  |  |  |  |  649|    243|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    243|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    243|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 243]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    243|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    243|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    243|    do { \
  |  |  |  |  592|    243|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    243|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    243|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    243|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    243|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    243|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   49|    243|    IGRAPH_BITSET_INIT_FINALLY(&remain, no_of_nodes);
  ------------------
  |  |  261|    243|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  262|    243|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  648|    243|    do { \
  |  |  |  |  649|    243|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    243|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    243|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 243]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    243|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  263|    243|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  591|    243|    do { \
  |  |  |  |  592|    243|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    243|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    243|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    243|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    243|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    243|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (263:62): [Folded - Ignored]
  |  |  ------------------
  ------------------
   50|       |
   51|       |    /* Calculate how many nodes there will be in the new graph. The result is
   52|       |     * a lower bound only as 'vit' may contain the same vertex more than once. */
   53|    243|    no_of_new_nodes_estimate = no_of_nodes - IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  191|    243|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
   54|    243|    if (no_of_new_nodes_estimate < 0) {
  ------------------
  |  Branch (54:9): [True: 0, False: 243]
  ------------------
   55|      0|        no_of_new_nodes_estimate = 0;
   56|      0|    }
   57|       |
   58|    243|    IGRAPH_CHECK(igraph_vector_int_reserve(&delete, no_of_new_nodes_estimate));
  ------------------
  |  |  648|    243|    do { \
  |  |  649|    243|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    243|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    243|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 243]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    243|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   59|       |
   60|  15.5k|    for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  202|    243|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  180|  15.5k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  168|  15.2k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (60:33): [True: 15.2k, False: 243]
  ------------------
   61|  15.2k|        IGRAPH_BIT_SET(remain, IGRAPH_VIT_GET(vit));
  ------------------
  |  |  105|  15.2k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  15.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  30.5k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  15.2k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (87:30): [True: 0, False: 15.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  30.5k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  15.2k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:53): [True: 0, False: 15.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   62|  15.2k|    }
   63|       |
   64|  22.3k|    for (igraph_integer_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (64:34): [True: 22.1k, False: 243]
  ------------------
   65|  22.1k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|  22.1k|    do { \
  |  |   48|  22.1k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 22.1k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|  22.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   66|       |
   67|  22.1k|        if (! IGRAPH_BIT_TEST(remain, i)) {
  ------------------
  |  |  144|  22.1k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  22.1k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  22.1k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  22.1k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  22.1k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  22.1k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (67:13): [True: 6.85k, False: 15.2k]
  ------------------
   68|  6.85k|            IGRAPH_CHECK(igraph_vector_int_push_back(&delete, i));
  ------------------
  |  |  648|  6.85k|    do { \
  |  |  649|  6.85k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  6.85k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  6.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  6.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   69|  6.85k|        }
   70|  22.1k|    }
   71|       |
   72|    243|    igraph_bitset_destroy(&remain);
   73|    243|    IGRAPH_FINALLY_CLEAN(1);
   74|       |
   75|    243|    IGRAPH_CHECK(igraph_copy(res, graph));
  ------------------
  |  |  648|    243|    do { \
  |  |  649|    243|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    243|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    243|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 243]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    243|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   76|    243|    IGRAPH_FINALLY(igraph_destroy, res);
  ------------------
  |  |  591|    243|    do { \
  |  |  592|    243|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    243|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    243|         * incorrect destructor function with the pointer */ \
  |  |  595|    243|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    243|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    243|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   77|    243|    IGRAPH_CHECK(igraph_delete_vertices_map(res, igraph_vss_vector(&delete),
  ------------------
  |  |  648|    243|    do { \
  |  |  649|    243|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    243|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    243|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 243]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    243|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   78|    243|                                            map, invmap));
   79|       |
   80|    243|    igraph_vector_int_destroy(&delete);
   81|    243|    igraph_vit_destroy(&vit);
   82|    243|    IGRAPH_FINALLY_CLEAN(3);
   83|       |
   84|    243|    return IGRAPH_SUCCESS;
   85|    243|}
subgraph.c:igraph_i_induced_subgraph_create_from_scratch:
  100|  1.92k|        igraph_bool_t map_is_prepared) {
  101|       |
  102|  1.92k|    const igraph_bool_t directed = igraph_is_directed(graph);
  103|  1.92k|    const igraph_integer_t no_of_nodes = igraph_vcount(graph);
  104|  1.92k|    igraph_integer_t no_of_new_nodes = 0;
  105|  1.92k|    igraph_integer_t n;
  106|  1.92k|    igraph_integer_t to;
  107|  1.92k|    igraph_integer_t eid;
  108|  1.92k|    igraph_vector_int_t vids_old2new, vids_new2old;
  109|  1.92k|    igraph_vector_int_t eids_new2old;
  110|  1.92k|    igraph_vector_int_t vids_vec;
  111|  1.92k|    igraph_vector_int_t nei_edges;
  112|  1.92k|    igraph_vector_int_t new_edges;
  113|  1.92k|    igraph_vit_t vit;
  114|  1.92k|    igraph_vector_int_t *my_vids_old2new = &vids_old2new,
  115|  1.92k|                        *my_vids_new2old = &vids_new2old;
  116|       |
  117|       |    /* The order of initialization is important here, they will be destroyed in the
  118|       |     * opposite order */
  119|  1.92k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&eids_new2old, 0);
  ------------------
  |  |  124|  1.92k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  1.92k|    do { \
  |  |  |  |  649|  1.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  1.92k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  1.92k|    do { \
  |  |  |  |  592|  1.92k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  1.92k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  1.92k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  1.92k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  1.92k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  1.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  120|  1.92k|    if (invmap) {
  ------------------
  |  Branch (120:9): [True: 0, False: 1.92k]
  ------------------
  121|      0|        my_vids_new2old = invmap;
  122|      0|        igraph_vector_int_clear(my_vids_new2old);
  123|  1.92k|    } else {
  124|  1.92k|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vids_new2old, 0);
  ------------------
  |  |  124|  1.92k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  1.92k|    do { \
  |  |  |  |  649|  1.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  1.92k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  1.92k|    do { \
  |  |  |  |  592|  1.92k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  1.92k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  1.92k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  1.92k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  1.92k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  1.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  125|  1.92k|    }
  126|  1.92k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&new_edges, 0);
  ------------------
  |  |  124|  1.92k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  1.92k|    do { \
  |  |  |  |  649|  1.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  1.92k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  1.92k|    do { \
  |  |  |  |  592|  1.92k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  1.92k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  1.92k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  1.92k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  1.92k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  1.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  127|  1.92k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&nei_edges, 0);
  ------------------
  |  |  124|  1.92k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  1.92k|    do { \
  |  |  |  |  649|  1.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  1.92k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  1.92k|    do { \
  |  |  |  |  592|  1.92k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  1.92k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  1.92k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  1.92k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  1.92k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  1.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  128|  1.92k|    if (map) {
  ------------------
  |  Branch (128:9): [True: 1.92k, False: 0]
  ------------------
  129|  1.92k|        my_vids_old2new = map;
  130|  1.92k|        if (!map_is_prepared) {
  ------------------
  |  Branch (130:13): [True: 0, False: 1.92k]
  ------------------
  131|      0|            IGRAPH_CHECK(igraph_vector_int_resize(map, no_of_nodes));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  132|      0|            igraph_vector_int_fill(map, -1);
  133|      0|        }
  134|  1.92k|    } else {
  135|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vids_old2new, no_of_nodes);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  136|      0|        igraph_vector_int_fill(&vids_old2new, -1);
  137|      0|    }
  138|  1.92k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&vids_vec, 0);
  ------------------
  |  |  124|  1.92k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  1.92k|    do { \
  |  |  |  |  649|  1.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  1.92k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  1.92k|    do { \
  |  |  |  |  592|  1.92k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  1.92k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  1.92k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  1.92k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  1.92k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  1.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  139|       |
  140|  1.92k|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  648|  1.92k|    do { \
  |  |  649|  1.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  141|  1.92k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  591|  1.92k|    do { \
  |  |  592|  1.92k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  1.92k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  1.92k|         * incorrect destructor function with the pointer */ \
  |  |  595|  1.92k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  1.92k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  1.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  142|       |
  143|       |    /* Calculate the mapping from the old node IDs to the new ones. The other
  144|       |     * igraph_simplify implementation in igraph_i_simplify_copy_and_delete
  145|       |     * ensures that the order of vertex IDs is kept during remapping (i.e.
  146|       |     * if the old ID of vertex A is less than the old ID of vertex B, then
  147|       |     * the same will also be true for the new IDs). To ensure compatibility
  148|       |     * with the other implementation, we have to fetch the vertex IDs into
  149|       |     * a vector first and then sort it.
  150|       |     */
  151|  1.92k|    IGRAPH_CHECK(igraph_vit_as_vector(&vit, &vids_vec));
  ------------------
  |  |  648|  1.92k|    do { \
  |  |  649|  1.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  152|  1.92k|    igraph_vit_destroy(&vit);
  153|  1.92k|    IGRAPH_FINALLY_CLEAN(1);
  154|       |
  155|  1.92k|    igraph_vector_int_sort(&vids_vec);
  156|  1.92k|    n = igraph_vector_int_size(&vids_vec);
  157|  30.4k|    for (igraph_integer_t i = 0; i < n; i++) {
  ------------------
  |  Branch (157:34): [True: 28.5k, False: 1.92k]
  ------------------
  158|  28.5k|        igraph_integer_t vid = VECTOR(vids_vec)[i];
  ------------------
  |  |   65|  28.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  159|       |
  160|       |        /* Cater for duplicate vertex IDs in the input vertex selector; we use
  161|       |         * the first occurrence of each vertex ID and ignore the rest */
  162|  28.5k|        if (VECTOR(*my_vids_old2new)[vid] < 0) {
  ------------------
  |  |   65|  28.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (162:13): [True: 28.5k, False: 0]
  ------------------
  163|  28.5k|            IGRAPH_CHECK(igraph_vector_int_push_back(my_vids_new2old, vid));
  ------------------
  |  |  648|  28.5k|    do { \
  |  |  649|  28.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  28.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  28.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 28.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  28.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  164|  28.5k|            VECTOR(*my_vids_old2new)[vid] = no_of_new_nodes;
  ------------------
  |  |   65|  28.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  165|  28.5k|            no_of_new_nodes++;
  166|  28.5k|        }
  167|  28.5k|    }
  168|  1.92k|    igraph_vector_int_destroy(&vids_vec);
  169|  1.92k|    IGRAPH_FINALLY_CLEAN(1);
  170|       |
  171|       |    /* Create the new edge list */
  172|  30.4k|    for (igraph_integer_t i = 0; i < no_of_new_nodes; i++) {
  ------------------
  |  Branch (172:34): [True: 28.5k, False: 1.92k]
  ------------------
  173|  28.5k|        igraph_integer_t old_vid = VECTOR(*my_vids_new2old)[i];
  ------------------
  |  |   65|  28.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  174|  28.5k|        igraph_integer_t new_vid = i;
  175|  28.5k|        igraph_bool_t skip_loop_edge;
  176|       |
  177|  28.5k|        IGRAPH_CHECK(igraph_incident(graph, &nei_edges, old_vid, IGRAPH_OUT));
  ------------------
  |  |  648|  28.5k|    do { \
  |  |  649|  28.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  28.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  28.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 28.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  28.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  178|  28.5k|        n = igraph_vector_int_size(&nei_edges);
  179|       |
  180|  28.5k|        if (directed) {
  ------------------
  |  Branch (180:13): [True: 0, False: 28.5k]
  ------------------
  181|       |            /* directed graph; this is easier */
  182|      0|            for (igraph_integer_t j = 0; j < n; j++) {
  ------------------
  |  Branch (182:42): [True: 0, False: 0]
  ------------------
  183|      0|                eid = VECTOR(nei_edges)[j];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  184|       |
  185|      0|                to = VECTOR(*my_vids_old2new)[ IGRAPH_TO(graph, eid) ];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              to = VECTOR(*my_vids_old2new)[ IGRAPH_TO(graph, eid) ];
  ------------------
  |  |  126|      0|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  186|      0|                if (to < 0) {
  ------------------
  |  Branch (186:21): [True: 0, False: 0]
  ------------------
  187|      0|                    continue;
  188|      0|                }
  189|       |
  190|      0|                IGRAPH_CHECK(igraph_vector_int_push_back(&new_edges, new_vid));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  191|      0|                IGRAPH_CHECK(igraph_vector_int_push_back(&new_edges, to));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  192|      0|                IGRAPH_CHECK(igraph_vector_int_push_back(&eids_new2old, eid));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  193|      0|            }
  194|  28.5k|        } else {
  195|       |            /* undirected graph. We need to be careful with loop edges as each
  196|       |             * loop edge will appear twice. We use a boolean flag to skip every
  197|       |             * second loop edge */
  198|  28.5k|            skip_loop_edge = 0;
  199|   103k|            for (igraph_integer_t j = 0; j < n; j++) {
  ------------------
  |  Branch (199:42): [True: 74.5k, False: 28.5k]
  ------------------
  200|  74.5k|                eid = VECTOR(nei_edges)[j];
  ------------------
  |  |   65|  74.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  201|       |
  202|  74.5k|                if (IGRAPH_FROM(graph, eid) != old_vid) {
  ------------------
  |  |  113|  74.5k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  74.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (202:21): [True: 34.1k, False: 40.3k]
  ------------------
  203|       |                    /* avoid processing edges twice */
  204|  34.1k|                    continue;
  205|  34.1k|                }
  206|       |
  207|  40.3k|                to = VECTOR(*my_vids_old2new)[ IGRAPH_TO(graph, eid) ];
  ------------------
  |  |   65|  40.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              to = VECTOR(*my_vids_old2new)[ IGRAPH_TO(graph, eid) ];
  ------------------
  |  |  126|  40.3k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  40.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  208|  40.3k|                if (to < 0) {
  ------------------
  |  Branch (208:21): [True: 0, False: 40.3k]
  ------------------
  209|      0|                    continue;
  210|      0|                }
  211|       |
  212|  40.3k|                if (new_vid == to) {
  ------------------
  |  Branch (212:21): [True: 6.18k, False: 34.1k]
  ------------------
  213|       |                    /* this is a loop edge; check whether we need to skip it */
  214|  6.18k|                    skip_loop_edge = !skip_loop_edge;
  215|  6.18k|                    if (skip_loop_edge) {
  ------------------
  |  Branch (215:25): [True: 3.09k, False: 3.09k]
  ------------------
  216|  3.09k|                        continue;
  217|  3.09k|                    }
  218|  6.18k|                }
  219|       |
  220|  37.2k|                IGRAPH_CHECK(igraph_vector_int_push_back(&new_edges, new_vid));
  ------------------
  |  |  648|  37.2k|    do { \
  |  |  649|  37.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  37.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  37.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 37.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  37.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  221|  37.2k|                IGRAPH_CHECK(igraph_vector_int_push_back(&new_edges, to));
  ------------------
  |  |  648|  37.2k|    do { \
  |  |  649|  37.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  37.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  37.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 37.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  37.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  222|  37.2k|                IGRAPH_CHECK(igraph_vector_int_push_back(&eids_new2old, eid));
  ------------------
  |  |  648|  37.2k|    do { \
  |  |  649|  37.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  37.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  37.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 37.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  37.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  223|  37.2k|            }
  224|  28.5k|        }
  225|  28.5k|    }
  226|       |
  227|       |    /* Get rid of some vectors that are not needed anymore */
  228|  1.92k|    if (!map) {
  ------------------
  |  Branch (228:9): [True: 0, False: 1.92k]
  ------------------
  229|      0|        igraph_vector_int_destroy(&vids_old2new);
  230|      0|        IGRAPH_FINALLY_CLEAN(1);
  231|      0|    }
  232|  1.92k|    igraph_vector_int_destroy(&nei_edges);
  233|  1.92k|    IGRAPH_FINALLY_CLEAN(1);
  234|       |
  235|       |    /* Create the new graph */
  236|  1.92k|    IGRAPH_CHECK(igraph_create(res, &new_edges, no_of_new_nodes, directed));
  ------------------
  |  |  648|  1.92k|    do { \
  |  |  649|  1.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  237|       |
  238|       |    /* Now we can also get rid of the new_edges vector */
  239|  1.92k|    igraph_vector_int_destroy(&new_edges);
  240|  1.92k|    IGRAPH_FINALLY_CLEAN(1);
  241|       |
  242|       |    /* Make sure that the newly created graph is destroyed if something happens from
  243|       |     * now on */
  244|  1.92k|    IGRAPH_FINALLY(igraph_destroy, res);
  ------------------
  |  |  591|  1.92k|    do { \
  |  |  592|  1.92k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  1.92k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  1.92k|         * incorrect destructor function with the pointer */ \
  |  |  595|  1.92k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  1.92k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  1.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  245|       |
  246|       |    /* Copy the graph attributes */
  247|  1.92k|    IGRAPH_CHECK(igraph_i_attribute_copy(res, graph, true, /* vertex= */ false, /* edge= */ false));
  ------------------
  |  |  648|  1.92k|    do { \
  |  |  649|  1.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  248|       |
  249|       |    /* Copy the vertex attributes */
  250|  1.92k|    IGRAPH_CHECK(igraph_i_attribute_permute_vertices(graph, res, my_vids_new2old));
  ------------------
  |  |  648|  1.92k|    do { \
  |  |  649|  1.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  251|       |
  252|       |    /* Copy the edge attributes */
  253|  1.92k|    IGRAPH_CHECK(igraph_i_attribute_permute_edges(graph, res, &eids_new2old));
  ------------------
  |  |  648|  1.92k|    do { \
  |  |  649|  1.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  254|       |
  255|       |    /* Get rid of the remaining stuff */
  256|  1.92k|    if (!invmap) {
  ------------------
  |  Branch (256:9): [True: 1.92k, False: 0]
  ------------------
  257|  1.92k|        igraph_vector_int_destroy(my_vids_new2old);
  258|  1.92k|        IGRAPH_FINALLY_CLEAN(1);
  259|  1.92k|    }
  260|  1.92k|    igraph_vector_int_destroy(&eids_new2old);
  261|  1.92k|    IGRAPH_FINALLY_CLEAN(2);   /* 1 + 1 since we don't need to destroy res */
  262|       |
  263|  1.92k|    return IGRAPH_SUCCESS;
  264|  1.92k|}

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

igraph_pseudo_diameter:
  511|  2.02k|                           igraph_bool_t unconn) {
  512|       |
  513|  2.02k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  514|  2.02k|    igraph_real_t ecc_v;
  515|  2.02k|    igraph_real_t ecc_u;
  516|  2.02k|    igraph_integer_t vid_ecc;
  517|  2.02k|    igraph_integer_t ito, ifrom;
  518|  2.02k|    igraph_bool_t inf = false;
  519|       |
  520|  2.02k|    if (vid_start >= no_of_nodes) {
  ------------------
  |  Branch (520:9): [True: 0, False: 2.02k]
  ------------------
  521|      0|        IGRAPH_ERROR("Starting vertex ID for pseudo-diameter out of range.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  522|      0|    }
  523|       |
  524|       |    /* We will reach here when vid_start < 0 and the graph has no vertices. */
  525|  2.02k|    if (no_of_nodes == 0) {
  ------------------
  |  Branch (525:9): [True: 0, False: 2.02k]
  ------------------
  526|      0|        if (diameter) {
  ------------------
  |  Branch (526:13): [True: 0, False: 0]
  ------------------
  527|      0|            *diameter = IGRAPH_NAN;
  ------------------
  |  |  143|      0|#define IGRAPH_NAN ((double)NAN)
  ------------------
  528|      0|        }
  529|      0|        if (from) {
  ------------------
  |  Branch (529:13): [True: 0, False: 0]
  ------------------
  530|      0|            *from = -1;
  531|      0|        }
  532|      0|        if (to) {
  ------------------
  |  Branch (532:13): [True: 0, False: 0]
  ------------------
  533|      0|            *to = -1;
  534|      0|        }
  535|      0|        return IGRAPH_SUCCESS;
  536|      0|    }
  537|       |
  538|  2.02k|    if (vid_start < 0) {
  ------------------
  |  Branch (538:9): [True: 0, False: 2.02k]
  ------------------
  539|      0|        RNG_BEGIN();
  ------------------
  |  |  170|      0|    do { if (!igraph_rng_default()->is_seeded) { \
  |  |  ------------------
  |  |  |  Branch (170:14): [True: 0, False: 0]
  |  |  ------------------
  |  |  171|      0|        igraph_rng_seed(igraph_rng_default(), time(0)); \
  |  |  172|      0|        igraph_rng_default()->is_seeded = true; \
  |  |  173|      0|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (173:16): [Folded - Ignored]
  |  |  ------------------
  ------------------
  540|      0|        vid_start = RNG_INTEGER(0, no_of_nodes - 1);
  ------------------
  |  |  179|      0|#define RNG_INTEGER(l,h) (igraph_rng_get_integer(igraph_rng_default(),(l),(h)))
  ------------------
  541|      0|        RNG_END();
  ------------------
  |  |  175|      0|    do { /* nothing */ } while (0)
  |  |  ------------------
  |  |  |  Branch (175:33): [Folded - Ignored]
  |  |  ------------------
  ------------------
  542|      0|    }
  543|       |
  544|  2.02k|    if (!igraph_is_directed(graph) || !directed) {
  ------------------
  |  Branch (544:9): [True: 2.02k, False: 0]
  |  Branch (544:39): [True: 0, False: 0]
  ------------------
  545|  2.02k|        igraph_lazy_adjlist_t adjlist;
  546|  2.02k|        igraph_vector_t ecc_vec;
  547|       |
  548|  2.02k|        IGRAPH_CHECK(igraph_lazy_adjlist_init(graph, &adjlist, IGRAPH_ALL,
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  549|  2.02k|                                              IGRAPH_NO_LOOPS, IGRAPH_NO_MULTIPLE));
  550|  2.02k|        IGRAPH_FINALLY(igraph_lazy_adjlist_destroy, &adjlist);
  ------------------
  |  |  591|  2.02k|    do { \
  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  551|  2.02k|        ifrom = vid_start;
  552|  2.02k|        IGRAPH_VECTOR_INIT_FINALLY(&ecc_vec, no_of_nodes);
  ------------------
  |  |  109|  2.02k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|  2.02k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (110:60): [Folded - Ignored]
  |  |  ------------------
  ------------------
  553|       |
  554|  2.02k|        IGRAPH_CHECK(igraph_i_eccentricity(graph, &ecc_vec, igraph_vss_1(vid_start),
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  555|  2.02k|                                           &adjlist, &vid_ecc, unconn));
  556|  2.02k|        ecc_u = VECTOR(ecc_vec)[0];
  ------------------
  |  |   65|  2.02k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  557|       |
  558|  2.02k|        if (!unconn && vid_ecc == -1) {
  ------------------
  |  Branch (558:13): [True: 0, False: 2.02k]
  |  Branch (558:24): [True: 0, False: 0]
  ------------------
  559|      0|            inf = true;
  560|  2.02k|        } else {
  561|  2.68k|            while (true) {
  562|  2.68k|                IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|  2.68k|    do { \
  |  |   48|  2.68k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 2.68k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|  2.68k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  563|       |
  564|  2.68k|                ito = vid_ecc;
  565|       |
  566|  2.68k|                IGRAPH_CHECK(igraph_i_eccentricity(graph, &ecc_vec, igraph_vss_1(vid_ecc),
  ------------------
  |  |  648|  2.68k|    do { \
  |  |  649|  2.68k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.68k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.68k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.68k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.68k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  567|  2.68k|                                                   &adjlist, &vid_ecc, true));
  568|       |
  569|  2.68k|                ecc_v = VECTOR(ecc_vec)[0];
  ------------------
  |  |   65|  2.68k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  570|       |
  571|  2.68k|                if (ecc_u < ecc_v) {
  ------------------
  |  Branch (571:21): [True: 657, False: 2.02k]
  ------------------
  572|    657|                    ecc_u = ecc_v;
  573|    657|                    ifrom = ito;
  574|  2.02k|                } else {
  575|  2.02k|                    break;
  576|  2.02k|                }
  577|  2.68k|            }
  578|  2.02k|        }
  579|  2.02k|        igraph_vector_destroy(&ecc_vec);
  580|  2.02k|        igraph_lazy_adjlist_destroy(&adjlist);
  581|  2.02k|        IGRAPH_FINALLY_CLEAN(2);
  582|  2.02k|    } else {
  583|      0|        igraph_vector_t ecc_out;
  584|      0|        igraph_vector_t ecc_in;
  585|      0|        igraph_integer_t vid_ecc_in;
  586|      0|        igraph_integer_t vid_ecc_out;
  587|      0|        igraph_integer_t vid_end;
  588|      0|        igraph_bool_t direction;
  589|      0|        igraph_lazy_adjlist_t adjlist_in;
  590|      0|        igraph_lazy_adjlist_t adjlist_out;
  591|       |
  592|      0|        IGRAPH_CHECK(igraph_lazy_adjlist_init(graph, &adjlist_in, IGRAPH_IN,
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  593|      0|                                              IGRAPH_NO_LOOPS, IGRAPH_NO_MULTIPLE));
  594|      0|        IGRAPH_FINALLY(igraph_lazy_adjlist_destroy, &adjlist_in);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  595|      0|        IGRAPH_CHECK(igraph_lazy_adjlist_init(graph, &adjlist_out, IGRAPH_OUT,
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  596|      0|                                              IGRAPH_NO_LOOPS, IGRAPH_NO_MULTIPLE));
  597|      0|        IGRAPH_FINALLY(igraph_lazy_adjlist_destroy, &adjlist_out);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  598|       |
  599|      0|        IGRAPH_VECTOR_INIT_FINALLY(&ecc_in, igraph_vcount(graph));
  ------------------
  |  |  109|      0|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|      0|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (110:60): [Folded - Ignored]
  |  |  ------------------
  ------------------
  600|      0|        IGRAPH_VECTOR_INIT_FINALLY(&ecc_out, igraph_vcount(graph));
  ------------------
  |  |  109|      0|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|      0|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (110:60): [Folded - Ignored]
  |  |  ------------------
  ------------------
  601|       |
  602|      0|        IGRAPH_CHECK(igraph_i_eccentricity(graph, &ecc_out, igraph_vss_1(vid_start),
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  603|      0|                                           &adjlist_out, &vid_ecc_out, unconn));
  604|      0|        IGRAPH_CHECK(igraph_i_eccentricity(graph, &ecc_in, igraph_vss_1(vid_start),
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  605|      0|                                           &adjlist_in, &vid_ecc_in, unconn));
  606|       |
  607|       |        /* A directed graph is strongly connected iff all vertices are reachable
  608|       |         * from vid_start both when moving along or moving opposite the edge directions. */
  609|      0|        if (!unconn && (vid_ecc_out == -1 || vid_ecc_in == -1)) {
  ------------------
  |  Branch (609:13): [True: 0, False: 0]
  |  Branch (609:25): [True: 0, False: 0]
  |  Branch (609:46): [True: 0, False: 0]
  ------------------
  610|      0|            inf = true;
  611|      0|        } else {
  612|      0|            if (VECTOR(ecc_out)[0] > VECTOR(ecc_in)[0]) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (VECTOR(ecc_out)[0] > VECTOR(ecc_in)[0]) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (612:17): [True: 0, False: 0]
  ------------------
  613|      0|                vid_ecc = vid_ecc_out;
  614|      0|                ecc_u = VECTOR(ecc_out)[0];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  615|      0|            } else {
  616|      0|                vid_ecc = vid_ecc_in;
  617|      0|                ecc_u = VECTOR(ecc_in)[0];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  618|      0|            }
  619|       |
  620|      0|            while (1) {
  ------------------
  |  Branch (620:20): [Folded - Ignored]
  ------------------
  621|      0|                IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|      0|    do { \
  |  |   48|      0|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  622|       |
  623|      0|                vid_end = vid_ecc;
  624|       |
  625|       |                /* TODO: In the undirected case, we break ties between vertices at the
  626|       |                 * same distance based on their degree. In te directed case, should we
  627|       |                 * use in-, out- or total degree? */
  628|      0|                IGRAPH_CHECK(igraph_i_eccentricity(graph, &ecc_out, igraph_vss_1(vid_ecc),
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  629|      0|                                                   &adjlist_out, &vid_ecc_out, true));
  630|      0|                IGRAPH_CHECK(igraph_i_eccentricity(graph, &ecc_in, igraph_vss_1(vid_ecc),
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  631|      0|                                                   &adjlist_in, &vid_ecc_in, true));
  632|       |
  633|      0|                if (VECTOR(ecc_out)[0] > VECTOR(ecc_in)[0]) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (VECTOR(ecc_out)[0] > VECTOR(ecc_in)[0]) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (633:21): [True: 0, False: 0]
  ------------------
  634|      0|                    vid_ecc = vid_ecc_out;
  635|      0|                    ecc_v = VECTOR(ecc_out)[0];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  636|      0|                    direction = 1;
  637|      0|                } else {
  638|      0|                    vid_ecc = vid_ecc_in;
  639|      0|                    ecc_v = VECTOR(ecc_in)[0];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  640|      0|                    direction = 0;
  641|      0|                }
  642|       |
  643|      0|                if (ecc_u < ecc_v) {
  ------------------
  |  Branch (643:21): [True: 0, False: 0]
  ------------------
  644|      0|                    ecc_u = ecc_v;
  645|      0|                    vid_start = vid_end;
  646|      0|                } else {
  647|      0|                    break;
  648|      0|                }
  649|      0|            }
  650|       |
  651|      0|            if (direction) {
  ------------------
  |  Branch (651:17): [True: 0, False: 0]
  ------------------
  652|      0|                ifrom = vid_end;
  653|      0|                ito   = vid_start;
  654|      0|            } else {
  655|      0|                ifrom = vid_start;
  656|      0|                ito   = vid_end;
  657|      0|            }
  658|       |
  659|      0|        }
  660|      0|        igraph_vector_destroy(&ecc_out);
  661|      0|        igraph_vector_destroy(&ecc_in);
  662|      0|        igraph_lazy_adjlist_destroy(&adjlist_in);
  663|      0|        igraph_lazy_adjlist_destroy(&adjlist_out);
  664|      0|        IGRAPH_FINALLY_CLEAN(4);
  665|      0|    }
  666|       |
  667|  2.02k|    if (inf) {
  ------------------
  |  Branch (667:9): [True: 0, False: 2.02k]
  ------------------
  668|      0|        if (diameter) {
  ------------------
  |  Branch (668:13): [True: 0, False: 0]
  ------------------
  669|      0|            *diameter = IGRAPH_INFINITY;
  ------------------
  |  |  140|      0|#define IGRAPH_INFINITY ((double)INFINITY)
  ------------------
  670|      0|        }
  671|      0|        if (from) {
  ------------------
  |  Branch (671:13): [True: 0, False: 0]
  ------------------
  672|      0|            *from = -1;
  673|      0|        }
  674|      0|        if (to) {
  ------------------
  |  Branch (674:13): [True: 0, False: 0]
  ------------------
  675|      0|            *to = -1;
  676|      0|        }
  677|  2.02k|    } else {
  678|  2.02k|        if (diameter) {
  ------------------
  |  Branch (678:13): [True: 2.02k, False: 0]
  ------------------
  679|  2.02k|            *diameter = ecc_u;
  680|  2.02k|        }
  681|  2.02k|        if (from) {
  ------------------
  |  Branch (681:13): [True: 2.02k, False: 0]
  ------------------
  682|  2.02k|            *from = ifrom;
  683|  2.02k|        }
  684|  2.02k|        if (to) {
  ------------------
  |  Branch (684:13): [True: 2.02k, False: 0]
  ------------------
  685|  2.02k|            *to = ito;
  686|  2.02k|        }
  687|  2.02k|    }
  688|       |
  689|  2.02k|    return IGRAPH_SUCCESS;
  690|  2.02k|}
distances.c:igraph_i_eccentricity:
   44|  4.71k|                                 igraph_bool_t unconn) {
   45|       |
   46|  4.71k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
   47|  4.71k|    igraph_dqueue_int_t q;
   48|  4.71k|    igraph_vit_t vit;
   49|  4.71k|    igraph_vector_int_t counted;
   50|  4.71k|    igraph_integer_t i, mark = 1;
   51|  4.71k|    igraph_integer_t min_degree = 0;
   52|       |
   53|  4.71k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   66|  4.71k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  648|  4.71k|    do { \
  |  |  |  |  649|  4.71k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  4.71k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  4.71k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.71k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  4.71k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   67|  4.71k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  591|  4.71k|    do { \
  |  |  |  |  592|  4.71k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  4.71k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  4.71k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  4.71k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  4.71k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  4.71k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (67:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   54|       |
   55|  4.71k|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  648|  4.71k|    do { \
  |  |  649|  4.71k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  4.71k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  4.71k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  4.71k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   56|  4.71k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  591|  4.71k|    do { \
  |  |  592|  4.71k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  4.71k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  4.71k|         * incorrect destructor function with the pointer */ \
  |  |  595|  4.71k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  4.71k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  4.71k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   57|       |
   58|  4.71k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&counted, no_of_nodes);
  ------------------
  |  |  124|  4.71k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  4.71k|    do { \
  |  |  |  |  649|  4.71k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  4.71k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  4.71k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.71k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  4.71k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  4.71k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  4.71k|    do { \
  |  |  |  |  592|  4.71k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  4.71k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  4.71k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  4.71k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  4.71k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  4.71k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   59|       |
   60|  4.71k|    IGRAPH_CHECK(igraph_vector_resize(res, IGRAPH_VIT_SIZE(vit)));
  ------------------
  |  |  648|  4.71k|    do { \
  |  |  649|  4.71k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  4.71k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  4.71k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  4.71k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   61|  4.71k|    igraph_vector_fill(res, -1);
   62|       |
   63|  4.71k|    for (i = 0, IGRAPH_VIT_RESET(vit);
  ------------------
  |  |  202|  4.71k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
   64|  9.42k|         !IGRAPH_VIT_END(vit);
  ------------------
  |  |  180|  9.42k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (64:10): [True: 4.71k, False: 4.71k]
  ------------------
   65|  4.71k|         IGRAPH_VIT_NEXT(vit), mark++, i++) {
  ------------------
  |  |  168|  4.71k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
   66|       |
   67|  4.71k|        igraph_integer_t source;
   68|  4.71k|        igraph_integer_t nodes_reached = 1;
   69|  4.71k|        source = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  215|  4.71k|    ((igraph_integer_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (215:25): [True: 4.71k, False: 0]
  |  |  ------------------
  |  |  216|  4.71k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
   70|  4.71k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, source));
  ------------------
  |  |  648|  4.71k|    do { \
  |  |  649|  4.71k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  4.71k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  4.71k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  4.71k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   71|  4.71k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, 0));
  ------------------
  |  |  648|  4.71k|    do { \
  |  |  649|  4.71k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  4.71k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  4.71k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  4.71k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   72|  4.71k|        VECTOR(counted)[source] = mark;
  ------------------
  |  |   65|  4.71k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   73|       |
   74|  4.71k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|  4.71k|    do { \
  |  |   48|  4.71k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 4.71k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|  4.71k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   75|       |
   76|  88.6k|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (76:16): [True: 83.9k, False: 4.71k]
  ------------------
   77|  83.9k|            igraph_integer_t act = igraph_dqueue_int_pop(&q);
   78|  83.9k|            igraph_integer_t dist = igraph_dqueue_int_pop(&q);
   79|  83.9k|            igraph_vector_int_t *neis = igraph_lazy_adjlist_get(adjlist, act);
  ------------------
  |  |  163|  83.9k|    (igraph_lazy_adjlist_has(al,no) ? ((al)->adjs[(igraph_integer_t)(no)]) \
  |  |  ------------------
  |  |  |  |  138|  83.9k|#define igraph_lazy_adjlist_has(al,no) ((al)->adjs[(igraph_integer_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (138:40): [True: 54.6k, False: 29.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  164|  83.9k|                                    : (igraph_i_lazy_adjlist_get_real(al, no)))
  ------------------
   80|  83.9k|            igraph_integer_t j, n;
   81|       |
   82|  83.9k|            IGRAPH_CHECK_OOM(neis, "Failed to query neighbors.");
  ------------------
  |  |  701|  83.9k|    do { \
  |  |  702|  83.9k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  83.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 83.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  83.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   83|       |
   84|  83.9k|            n = igraph_vector_int_size(neis);
   85|   256k|            for (j = 0; j < n; j++) {
  ------------------
  |  Branch (85:25): [True: 172k, False: 83.9k]
  ------------------
   86|   172k|                igraph_integer_t nei = VECTOR(*neis)[j];
  ------------------
  |  |   65|   172k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   87|   172k|                if (VECTOR(counted)[nei] != mark) {
  ------------------
  |  |   65|   172k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (87:21): [True: 79.2k, False: 93.7k]
  ------------------
   88|  79.2k|                    VECTOR(counted)[nei] = mark;
  ------------------
  |  |   65|  79.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   89|  79.2k|                    nodes_reached++;
   90|  79.2k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&q, nei));
  ------------------
  |  |  648|  79.2k|    do { \
  |  |  649|  79.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  79.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  79.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 79.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  79.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   91|  79.2k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&q, dist + 1));
  ------------------
  |  |  648|  79.2k|    do { \
  |  |  649|  79.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  79.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  79.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 79.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  79.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   92|  79.2k|                }
   93|   172k|            }
   94|  83.9k|            if (vid_ecc) {
  ------------------
  |  Branch (94:17): [True: 83.9k, False: 0]
  ------------------
   95|       |                /* Return the vertex ID of the vertex which has the lowest
   96|       |                 * degree of the vertices most distant from the starting
   97|       |                 * vertex. Assumes there is only 1 vid in vids. Used for
   98|       |                 * pseudo_diameter calculations. */
   99|  83.9k|                if (dist > VECTOR(*res)[i] || (dist == VECTOR(*res)[i] && n < min_degree)) {
  ------------------
  |  |   65|  83.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (dist > VECTOR(*res)[i] || (dist == VECTOR(*res)[i] && n < min_degree)) {
  ------------------
  |  |   65|  58.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (99:21): [True: 25.3k, False: 58.6k]
  |  Branch (99:48): [True: 58.6k, False: 0]
  |  Branch (99:75): [True: 3.47k, False: 55.1k]
  ------------------
  100|  28.8k|                    VECTOR(*res)[i] = dist;
  ------------------
  |  |   65|  28.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  101|  28.8k|                    *vid_ecc = act;
  102|  28.8k|                    min_degree = n;
  103|  28.8k|                }
  104|  83.9k|            } else if (dist > VECTOR(*res)[i]) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (104:24): [True: 0, False: 0]
  ------------------
  105|      0|                VECTOR(*res)[i] = dist;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  106|      0|            }
  107|  83.9k|        } /* while !igraph_dqueue_int_empty(dqueue) */
  108|       |
  109|  4.71k|        if (nodes_reached != no_of_nodes && !unconn && vid_ecc) {
  ------------------
  |  Branch (109:13): [True: 4.24k, False: 463]
  |  Branch (109:45): [True: 0, False: 4.24k]
  |  Branch (109:56): [True: 0, False: 0]
  ------------------
  110|      0|            *vid_ecc = -1;
  111|      0|            break;
  112|      0|        }
  113|  4.71k|    } /* for IGRAPH_VIT_NEXT(vit) */
  114|       |
  115|  4.71k|    igraph_vector_int_destroy(&counted);
  116|  4.71k|    igraph_vit_destroy(&vit);
  117|  4.71k|    igraph_dqueue_int_destroy(&q);
  118|  4.71k|    IGRAPH_FINALLY_CLEAN(3);
  119|       |
  120|  4.71k|    return IGRAPH_SUCCESS;
  121|  4.71k|}

igraph_is_eulerian:
  335|  2.02k|igraph_error_t igraph_is_eulerian(const igraph_t *graph, igraph_bool_t *has_path, igraph_bool_t *has_cycle) {
  336|  2.02k|    igraph_integer_t start_of_path = 0;
  337|       |
  338|  2.02k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (338:9): [True: 0, False: 2.02k]
  ------------------
  339|      0|        IGRAPH_CHECK(igraph_i_is_eulerian_directed(graph, has_path, has_cycle, &start_of_path));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  340|  2.02k|    } else {
  341|  2.02k|        IGRAPH_CHECK(igraph_i_is_eulerian_undirected(graph, has_path, has_cycle, &start_of_path));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  342|  2.02k|    }
  343|  2.02k|    return IGRAPH_SUCCESS;
  344|  2.02k|}
igraph_eulerian_cycle:
  597|    400|        const igraph_t *graph, igraph_vector_int_t *edge_res, igraph_vector_int_t *vertex_res) {
  598|       |
  599|    400|    igraph_bool_t has_cycle;
  600|    400|    igraph_bool_t has_path;
  601|    400|    igraph_integer_t start_of_path = 0;
  602|       |
  603|    400|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (603:9): [True: 0, False: 400]
  ------------------
  604|      0|        IGRAPH_CHECK(igraph_i_is_eulerian_directed(graph, &has_path, &has_cycle, &start_of_path));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  605|       |
  606|      0|        if (!has_cycle) {
  ------------------
  |  Branch (606:13): [True: 0, False: 0]
  ------------------
  607|      0|            IGRAPH_ERROR("The graph does not have an Eulerian cycle.", IGRAPH_ENOSOL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  608|      0|        }
  609|       |
  610|      0|        IGRAPH_CHECK(igraph_i_eulerian_path_directed(graph, edge_res, vertex_res, start_of_path));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  611|    400|    } else {
  612|    400|        IGRAPH_CHECK(igraph_i_is_eulerian_undirected(graph, &has_path, &has_cycle, &start_of_path));
  ------------------
  |  |  648|    400|    do { \
  |  |  649|    400|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    400|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    400|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 400]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    400|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  613|       |
  614|    400|        if (!has_cycle) {
  ------------------
  |  Branch (614:13): [True: 0, False: 400]
  ------------------
  615|      0|            IGRAPH_ERROR("The graph does not have an Eulerian cycle.", IGRAPH_ENOSOL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  616|      0|        }
  617|       |
  618|    400|        IGRAPH_CHECK(igraph_i_eulerian_path_undirected(graph, edge_res, vertex_res, start_of_path));
  ------------------
  |  |  648|    400|    do { \
  |  |  649|    400|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    400|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    400|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 400]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    400|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  619|    400|    }
  620|       |
  621|    400|    return IGRAPH_SUCCESS;
  622|    400|}
igraph_eulerian_path:
  659|    882|        const igraph_t *graph, igraph_vector_int_t *edge_res, igraph_vector_int_t *vertex_res) {
  660|       |
  661|    882|    igraph_bool_t has_cycle;
  662|    882|    igraph_bool_t has_path;
  663|    882|    igraph_integer_t start_of_path = 0;
  664|       |
  665|    882|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (665:9): [True: 0, False: 882]
  ------------------
  666|      0|        IGRAPH_CHECK(igraph_i_is_eulerian_directed(graph, &has_path, &has_cycle, &start_of_path));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  667|       |
  668|      0|        if (!has_path) {
  ------------------
  |  Branch (668:13): [True: 0, False: 0]
  ------------------
  669|      0|            IGRAPH_ERROR("The graph does not have an Eulerian path.", IGRAPH_ENOSOL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  670|      0|        }
  671|      0|        IGRAPH_CHECK(igraph_i_eulerian_path_directed(graph, edge_res, vertex_res, start_of_path));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  672|    882|    } else {
  673|    882|        IGRAPH_CHECK(igraph_i_is_eulerian_undirected(graph, &has_path, &has_cycle, &start_of_path));
  ------------------
  |  |  648|    882|    do { \
  |  |  649|    882|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    882|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    882|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 882]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    882|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  674|       |
  675|    882|        if (!has_path) {
  ------------------
  |  Branch (675:13): [True: 0, False: 882]
  ------------------
  676|      0|            IGRAPH_ERROR("The graph does not have an Eulerian path.", IGRAPH_ENOSOL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  677|      0|        }
  678|       |
  679|    882|        IGRAPH_CHECK(igraph_i_eulerian_path_undirected(graph, edge_res, vertex_res, start_of_path));
  ------------------
  |  |  648|    882|    do { \
  |  |  649|    882|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    882|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    882|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 882]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    882|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  680|    882|    }
  681|       |
  682|    882|    return IGRAPH_SUCCESS;
  683|    882|}
eulerian.c:igraph_i_is_eulerian_undirected:
   45|  3.31k|        const igraph_t *graph, igraph_bool_t *has_path, igraph_bool_t *has_cycle, igraph_integer_t *start_of_path) {
   46|  3.31k|    igraph_integer_t odd;
   47|  3.31k|    igraph_vector_int_t degree;
   48|  3.31k|    igraph_vector_int_t csize;
   49|       |    /* boolean vector to mark singletons: */
   50|  3.31k|    igraph_vector_int_t nonsingleton;
   51|  3.31k|    igraph_integer_t i, n, vsize;
   52|  3.31k|    igraph_integer_t cluster_count;
   53|       |    /* number of self-looping singletons: */
   54|  3.31k|    igraph_integer_t es;
   55|       |    /* will be set to 1 if there are non-isolated vertices, otherwise 0: */
   56|  3.31k|    igraph_integer_t ens;
   57|       |
   58|  3.31k|    n = igraph_vcount(graph);
   59|       |
   60|  3.31k|    if (igraph_ecount(graph) == 0 || n <= 1) {
  ------------------
  |  Branch (60:9): [True: 282, False: 3.02k]
  |  Branch (60:38): [True: 39, False: 2.98k]
  ------------------
   61|    321|        start_of_path = 0; /* in case the graph has one vertex with self-loops */
   62|    321|        *has_path = true;
   63|    321|        *has_cycle = true;
   64|    321|        return  IGRAPH_SUCCESS;
   65|    321|    }
   66|       |
   67|       |    /* check for connectedness, but singletons are special since they affect
   68|       |     * the Eulerian nature only if there is a self-loop AND another edge
   69|       |     * somewhere else in the graph */
   70|  2.98k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&csize, 0);
  ------------------
  |  |  124|  2.98k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.98k|    do { \
  |  |  |  |  649|  2.98k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.98k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.98k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.98k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.98k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.98k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.98k|    do { \
  |  |  |  |  592|  2.98k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.98k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.98k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.98k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.98k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.98k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   71|  2.98k|    IGRAPH_CHECK(igraph_connected_components(graph, NULL, &csize, NULL, IGRAPH_WEAK));
  ------------------
  |  |  648|  2.98k|    do { \
  |  |  649|  2.98k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.98k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.98k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.98k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.98k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   72|  2.98k|    cluster_count = 0;
   73|  2.98k|    vsize = igraph_vector_int_size(&csize);
   74|   362k|    for (i = 0; i < vsize; i++) {
  ------------------
  |  Branch (74:17): [True: 360k, False: 2.48k]
  ------------------
   75|   360k|        if (VECTOR(csize)[i] > 1) {
  ------------------
  |  |   65|   360k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (75:13): [True: 3.17k, False: 357k]
  ------------------
   76|  3.17k|            cluster_count++;
   77|  3.17k|            if (cluster_count > 1) {
  ------------------
  |  Branch (77:17): [True: 508, False: 2.66k]
  ------------------
   78|       |                /* disconnected edges, they'll never reach each other */
   79|    508|                *has_path = false;
   80|    508|                *has_cycle = false;
   81|    508|                igraph_vector_int_destroy(&csize);
   82|    508|                IGRAPH_FINALLY_CLEAN(1);
   83|       |
   84|    508|                return IGRAPH_SUCCESS;
   85|    508|            }
   86|  3.17k|        }
   87|   360k|    }
   88|       |
   89|  2.48k|    igraph_vector_int_destroy(&csize);
   90|  2.48k|    IGRAPH_FINALLY_CLEAN(1);
   91|       |
   92|       |    /* the graph is connected except for singletons */
   93|       |    /* find singletons (including those with self-loops) */
   94|  2.48k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&nonsingleton, 0);
  ------------------
  |  |  124|  2.48k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.48k|    do { \
  |  |  |  |  649|  2.48k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.48k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.48k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.48k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.48k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.48k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.48k|    do { \
  |  |  |  |  592|  2.48k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.48k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.48k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.48k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.48k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.48k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   95|  2.48k|    IGRAPH_CHECK(igraph_degree(graph, &nonsingleton, igraph_vss_all(), IGRAPH_ALL, IGRAPH_NO_LOOPS));
  ------------------
  |  |  648|  2.48k|    do { \
  |  |  649|  2.48k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.48k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.48k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.48k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   96|       |
   97|       |    /* check the degrees for odd/even:
   98|       |     * - >= 2 odd means no cycle (1 odd is impossible)
   99|       |     * - > 2 odd means no path
  100|       |     * plus there are a few corner cases with singletons
  101|       |     */
  102|  2.48k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degree, 0);
  ------------------
  |  |  124|  2.48k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.48k|    do { \
  |  |  |  |  649|  2.48k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.48k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.48k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.48k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.48k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.48k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.48k|    do { \
  |  |  |  |  592|  2.48k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.48k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.48k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.48k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.48k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.48k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  103|  2.48k|    IGRAPH_CHECK(igraph_degree(graph, &degree, igraph_vss_all(), IGRAPH_ALL, IGRAPH_LOOPS));
  ------------------
  |  |  648|  2.48k|    do { \
  |  |  649|  2.48k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.48k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.48k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.48k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  104|  2.48k|    odd = 0;
  105|  2.48k|    es = 0;
  106|  2.48k|    ens = 0;
  107|   368k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (107:17): [True: 365k, False: 2.41k]
  ------------------
  108|   365k|        igraph_integer_t deg = VECTOR(degree)[i];
  ------------------
  |  |   65|   365k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  109|       |        /* Eulerian is about edges, so skip free vertices */
  110|   365k|        if (deg == 0) continue;
  ------------------
  |  Branch (110:13): [True: 335k, False: 30.4k]
  ------------------
  111|       |
  112|  30.4k|        if (!VECTOR(nonsingleton)[i]) {
  ------------------
  |  |   65|  30.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (112:13): [True: 384, False: 30.1k]
  ------------------
  113|       |            /* singleton with self loops */
  114|    384|            es++;
  115|  30.1k|        } else {
  116|       |            /* at least one non-singleton */
  117|  30.1k|            ens = 1;
  118|       |            /* note: self-loops count for two (in and out) */
  119|  30.1k|            if (deg % 2) odd++;
  ------------------
  |  Branch (119:17): [True: 16.4k, False: 13.6k]
  ------------------
  120|  30.1k|        }
  121|       |
  122|  30.4k|        if (es + ens > 1) {
  ------------------
  |  Branch (122:13): [True: 62, False: 30.4k]
  ------------------
  123|       |            /* 2+ singletons with self loops or singleton with self-loops and
  124|       |             * 1+ edges in the non-singleton part of the graph. */
  125|     62|            *has_path = false;
  126|     62|            *has_cycle = false;
  127|     62|            igraph_vector_int_destroy(&nonsingleton);
  128|     62|            igraph_vector_int_destroy(&degree);
  129|     62|            IGRAPH_FINALLY_CLEAN(2);
  130|       |
  131|     62|            return IGRAPH_SUCCESS;
  132|     62|        }
  133|  30.4k|    }
  134|       |
  135|  2.41k|    igraph_vector_int_destroy(&nonsingleton);
  136|  2.41k|    IGRAPH_FINALLY_CLEAN(1);
  137|       |
  138|       |    /* this is the usual algorithm on the connected part of the graph */
  139|  2.41k|    if (odd > 2) {
  ------------------
  |  Branch (139:9): [True: 576, False: 1.84k]
  ------------------
  140|    576|        *has_path = false;
  141|    576|        *has_cycle = false;
  142|  1.84k|    } else if (odd == 2) {
  ------------------
  |  Branch (142:16): [True: 964, False: 879]
  ------------------
  143|    964|        *has_path = true;
  144|    964|        *has_cycle = false;
  145|    964|    } else {
  146|    879|        *has_path = true;
  147|    879|        *has_cycle = true;
  148|    879|    }
  149|       |
  150|       |    /* set start of path if there is one but there is no cycle */
  151|       |    /* note: we cannot do this in the previous loop because at that time we are
  152|       |     * not sure yet if a path exists */
  153|  64.3k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (153:17): [True: 64.3k, False: 0]
  ------------------
  154|  64.3k|        if ((*has_cycle && VECTOR(degree)[i] > 0) || (!*has_cycle && VECTOR(degree)[i] %2 == 1)) {
  ------------------
  |  |   65|  29.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if ((*has_cycle && VECTOR(degree)[i] > 0) || (!*has_cycle && VECTOR(degree)[i] %2 == 1)) {
  ------------------
  |  |   65|  34.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (154:14): [True: 29.5k, False: 34.7k]
  |  Branch (154:28): [True: 879, False: 28.7k]
  |  Branch (154:55): [True: 34.7k, False: 28.7k]
  |  Branch (154:70): [True: 1.54k, False: 33.1k]
  ------------------
  155|  2.41k|            *start_of_path = i;
  156|  2.41k|            break;
  157|  2.41k|        }
  158|  64.3k|    }
  159|       |
  160|  2.41k|    igraph_vector_int_destroy(&degree);
  161|  2.41k|    IGRAPH_FINALLY_CLEAN(1);
  162|       |
  163|  2.41k|    return IGRAPH_SUCCESS;
  164|  2.48k|}
eulerian.c:igraph_i_eulerian_path_undirected:
  349|  1.28k|        igraph_integer_t start_of_path) {
  350|       |
  351|  1.28k|    igraph_integer_t curr;
  352|  1.28k|    igraph_integer_t n, m;
  353|  1.28k|    igraph_inclist_t il;
  354|  1.28k|    igraph_stack_int_t path, tracker, edge_tracker, edge_path;
  355|  1.28k|    igraph_bitset_t visited_list;
  356|  1.28k|    igraph_vector_int_t degree;
  357|       |
  358|  1.28k|    n = igraph_vcount(graph);
  359|  1.28k|    m = igraph_ecount(graph);
  360|       |
  361|  1.28k|    if (edge_res) {
  ------------------
  |  Branch (361:9): [True: 1.28k, False: 0]
  ------------------
  362|  1.28k|        igraph_vector_int_clear(edge_res);
  363|  1.28k|    }
  364|       |
  365|  1.28k|    if (vertex_res) {
  ------------------
  |  Branch (365:9): [True: 1.28k, False: 0]
  ------------------
  366|  1.28k|        igraph_vector_int_clear(vertex_res);
  367|  1.28k|    }
  368|       |
  369|  1.28k|    if (m == 0 || n == 0) {
  ------------------
  |  Branch (369:9): [True: 188, False: 1.09k]
  |  Branch (369:19): [True: 0, False: 1.09k]
  ------------------
  370|    188|        return IGRAPH_SUCCESS;
  371|    188|    }
  372|       |
  373|  1.09k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degree, 0);
  ------------------
  |  |  124|  1.09k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  1.09k|    do { \
  |  |  |  |  649|  1.09k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.09k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.09k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.09k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  1.09k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  1.09k|    do { \
  |  |  |  |  592|  1.09k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  1.09k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  1.09k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  1.09k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  1.09k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  1.09k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  374|  1.09k|    IGRAPH_CHECK(igraph_degree(graph, &degree, igraph_vss_all(), IGRAPH_ALL, IGRAPH_LOOPS));
  ------------------
  |  |  648|  1.09k|    do { \
  |  |  649|  1.09k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.09k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.09k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.09k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.09k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  375|       |
  376|  1.09k|    IGRAPH_STACK_INT_INIT_FINALLY(&path, n);
  ------------------
  |  |   66|  1.09k|    do { IGRAPH_CHECK(igraph_stack_int_init(s, capacity)); \
  |  |  ------------------
  |  |  |  |  648|  1.09k|    do { \
  |  |  |  |  649|  1.09k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.09k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.09k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.09k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   67|  1.09k|        IGRAPH_FINALLY(igraph_stack_int_destroy, s); } while (0)
  |  |  ------------------
  |  |  |  |  591|  1.09k|    do { \
  |  |  |  |  592|  1.09k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  1.09k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  1.09k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  1.09k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  1.09k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  1.09k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (67:63): [Folded - Ignored]
  |  |  ------------------
  ------------------
  377|  1.09k|    IGRAPH_STACK_INT_INIT_FINALLY(&tracker, n);
  ------------------
  |  |   66|  1.09k|    do { IGRAPH_CHECK(igraph_stack_int_init(s, capacity)); \
  |  |  ------------------
  |  |  |  |  648|  1.09k|    do { \
  |  |  |  |  649|  1.09k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.09k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.09k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.09k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   67|  1.09k|        IGRAPH_FINALLY(igraph_stack_int_destroy, s); } while (0)
  |  |  ------------------
  |  |  |  |  591|  1.09k|    do { \
  |  |  |  |  592|  1.09k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  1.09k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  1.09k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  1.09k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  1.09k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  1.09k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (67:63): [Folded - Ignored]
  |  |  ------------------
  ------------------
  378|  1.09k|    IGRAPH_STACK_INT_INIT_FINALLY(&edge_path, n);
  ------------------
  |  |   66|  1.09k|    do { IGRAPH_CHECK(igraph_stack_int_init(s, capacity)); \
  |  |  ------------------
  |  |  |  |  648|  1.09k|    do { \
  |  |  |  |  649|  1.09k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.09k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.09k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.09k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   67|  1.09k|        IGRAPH_FINALLY(igraph_stack_int_destroy, s); } while (0)
  |  |  ------------------
  |  |  |  |  591|  1.09k|    do { \
  |  |  |  |  592|  1.09k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  1.09k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  1.09k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  1.09k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  1.09k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  1.09k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (67:63): [Folded - Ignored]
  |  |  ------------------
  ------------------
  379|  1.09k|    IGRAPH_STACK_INT_INIT_FINALLY(&edge_tracker, n);
  ------------------
  |  |   66|  1.09k|    do { IGRAPH_CHECK(igraph_stack_int_init(s, capacity)); \
  |  |  ------------------
  |  |  |  |  648|  1.09k|    do { \
  |  |  |  |  649|  1.09k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.09k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.09k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.09k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   67|  1.09k|        IGRAPH_FINALLY(igraph_stack_int_destroy, s); } while (0)
  |  |  ------------------
  |  |  |  |  591|  1.09k|    do { \
  |  |  |  |  592|  1.09k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  1.09k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  1.09k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  1.09k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  1.09k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  1.09k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (67:63): [Folded - Ignored]
  |  |  ------------------
  ------------------
  380|  1.09k|    IGRAPH_BITSET_INIT_FINALLY(&visited_list, m);
  ------------------
  |  |  261|  1.09k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  262|  1.09k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  648|  1.09k|    do { \
  |  |  |  |  649|  1.09k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.09k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.09k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.09k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  263|  1.09k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  591|  1.09k|    do { \
  |  |  |  |  592|  1.09k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  1.09k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  1.09k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  1.09k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  1.09k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  1.09k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (263:62): [Folded - Ignored]
  |  |  ------------------
  ------------------
  381|       |
  382|  1.09k|    IGRAPH_CHECK(igraph_stack_int_push(&tracker, start_of_path));
  ------------------
  |  |  648|  1.09k|    do { \
  |  |  649|  1.09k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.09k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.09k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.09k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.09k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  383|       |
  384|  1.09k|    IGRAPH_CHECK(igraph_inclist_init(graph, &il, IGRAPH_OUT, IGRAPH_LOOPS_ONCE));
  ------------------
  |  |  648|  1.09k|    do { \
  |  |  649|  1.09k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.09k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.09k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.09k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.09k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  385|  1.09k|    IGRAPH_FINALLY(igraph_inclist_destroy, &il);
  ------------------
  |  |  591|  1.09k|    do { \
  |  |  592|  1.09k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  1.09k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  1.09k|         * incorrect destructor function with the pointer */ \
  |  |  595|  1.09k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  1.09k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  1.09k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  386|       |
  387|  1.09k|    curr = start_of_path;
  388|       |
  389|  57.8k|    while (!igraph_stack_int_empty(&tracker)) {
  ------------------
  |  Branch (389:12): [True: 56.7k, False: 1.09k]
  ------------------
  390|       |
  391|  56.7k|        if (VECTOR(degree)[curr] != 0) {
  ------------------
  |  |   65|  56.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (391:13): [True: 27.8k, False: 28.9k]
  ------------------
  392|  27.8k|            igraph_vector_int_t *incedges;
  393|  27.8k|            igraph_integer_t nc, edge = -1;
  394|  27.8k|            igraph_integer_t j, next;
  395|  27.8k|            IGRAPH_CHECK(igraph_stack_int_push(&tracker, curr));
  ------------------
  |  |  648|  27.8k|    do { \
  |  |  649|  27.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  27.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  27.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 27.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  27.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  396|       |
  397|  27.8k|            incedges = igraph_inclist_get(&il, curr);
  ------------------
  |  |  107|  27.8k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_integer_t)(no)])
  ------------------
  398|  27.8k|            nc = igraph_vector_int_size(incedges);
  399|  27.8k|            IGRAPH_ASSERT(nc > 0);
  ------------------
  |  |  916|  27.8k|    do { \
  |  |  917|  27.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  27.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 27.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  27.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  400|       |
  401|  1.34M|            for (j = 0; j < nc; j++) {
  ------------------
  |  Branch (401:25): [True: 1.34M, False: 0]
  ------------------
  402|  1.34M|                edge = VECTOR(*incedges)[j];
  ------------------
  |  |   65|  1.34M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  403|  1.34M|                if (!IGRAPH_BIT_TEST(visited_list, edge)) {
  ------------------
  |  |  144|  1.34M|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  1.34M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  1.34M|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  1.34M|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  1.34M|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  1.34M|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (403:21): [True: 27.8k, False: 1.31M]
  ------------------
  404|  27.8k|                    break;
  405|  27.8k|                }
  406|  1.34M|            }
  407|       |
  408|  27.8k|            next = IGRAPH_OTHER(graph, edge, curr);
  ------------------
  |  |  144|  27.8k|    ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  27.8k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  27.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  113|  22.2k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  22.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  5.58k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  5.58k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:25): [True: 22.2k, False: 5.58k]
  |  |  ------------------
  ------------------
  409|       |
  410|  27.8k|            IGRAPH_CHECK(igraph_stack_int_push(&edge_tracker, edge));
  ------------------
  |  |  648|  27.8k|    do { \
  |  |  649|  27.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  27.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  27.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 27.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  27.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  411|       |
  412|       |            /* remove edge here */
  413|  27.8k|            VECTOR(degree)[curr]--;
  ------------------
  |  |   65|  27.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  414|  27.8k|            VECTOR(degree)[next]--;
  ------------------
  |  |   65|  27.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  415|  27.8k|            IGRAPH_BIT_SET(visited_list, edge);
  ------------------
  |  |  105|  27.8k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  27.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  27.8k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  27.8k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  27.8k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  27.8k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  416|       |
  417|  27.8k|            curr = next;
  418|  28.9k|        } else { /* back track to find remaining circuit */
  419|  28.9k|            igraph_integer_t curr_e;
  420|  28.9k|            IGRAPH_CHECK(igraph_stack_int_push(&path, curr));
  ------------------
  |  |  648|  28.9k|    do { \
  |  |  649|  28.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  28.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  28.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 28.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  28.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  421|  28.9k|            curr = igraph_stack_int_pop(&tracker);
  422|  28.9k|            if (!igraph_stack_int_empty(&edge_tracker)) {
  ------------------
  |  Branch (422:17): [True: 27.8k, False: 1.09k]
  ------------------
  423|  27.8k|                curr_e = igraph_stack_int_pop(&edge_tracker);
  424|  27.8k|                IGRAPH_CHECK(igraph_stack_int_push(&edge_path, curr_e));
  ------------------
  |  |  648|  27.8k|    do { \
  |  |  649|  27.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  27.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  27.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 27.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  27.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  425|  27.8k|            }
  426|  28.9k|        }
  427|  56.7k|    }
  428|       |
  429|  1.09k|    if (edge_res) {
  ------------------
  |  Branch (429:9): [True: 1.09k, False: 0]
  ------------------
  430|  1.09k|        IGRAPH_CHECK(igraph_vector_int_reserve(edge_res, m));
  ------------------
  |  |  648|  1.09k|    do { \
  |  |  649|  1.09k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.09k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.09k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.09k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.09k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  431|  28.9k|        while (!igraph_stack_int_empty(&edge_path)) {
  ------------------
  |  Branch (431:16): [True: 27.8k, False: 1.09k]
  ------------------
  432|  27.8k|            IGRAPH_CHECK(igraph_vector_int_push_back(edge_res, igraph_stack_int_pop(&edge_path)));
  ------------------
  |  |  648|  27.8k|    do { \
  |  |  649|  27.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  27.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  27.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 27.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  27.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  433|  27.8k|        }
  434|  1.09k|    }
  435|  1.09k|    if (vertex_res) {
  ------------------
  |  Branch (435:9): [True: 1.09k, False: 0]
  ------------------
  436|  1.09k|        IGRAPH_CHECK(igraph_vector_int_reserve(vertex_res, m+1));
  ------------------
  |  |  648|  1.09k|    do { \
  |  |  649|  1.09k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.09k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.09k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.09k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.09k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  437|  30.0k|        while (!igraph_stack_int_empty(&path)) {
  ------------------
  |  Branch (437:16): [True: 28.9k, False: 1.09k]
  ------------------
  438|  28.9k|            IGRAPH_CHECK(igraph_vector_int_push_back(vertex_res, igraph_stack_int_pop(&path)));
  ------------------
  |  |  648|  28.9k|    do { \
  |  |  649|  28.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  28.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  28.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 28.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  28.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  439|  28.9k|        }
  440|  1.09k|    }
  441|       |
  442|  1.09k|    igraph_stack_int_destroy(&path);
  443|  1.09k|    igraph_stack_int_destroy(&tracker);
  444|  1.09k|    igraph_stack_int_destroy(&edge_path);
  445|  1.09k|    igraph_stack_int_destroy(&edge_tracker);
  446|  1.09k|    igraph_bitset_destroy(&visited_list);
  447|  1.09k|    igraph_inclist_destroy(&il);
  448|  1.09k|    igraph_vector_int_destroy(&degree);
  449|  1.09k|    IGRAPH_FINALLY_CLEAN(7);
  450|       |
  451|  1.09k|    return IGRAPH_SUCCESS;
  452|  1.09k|}

igraph_distances_cutoff:
   88|  2.02k|                          igraph_neimode_t mode, igraph_real_t cutoff) {
   89|       |
   90|  2.02k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
   91|  2.02k|    igraph_integer_t no_of_from, no_of_to;
   92|  2.02k|    igraph_integer_t *already_counted;
   93|  2.02k|    igraph_adjlist_t adjlist;
   94|  2.02k|    igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   61|  2.02k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
   95|  2.02k|    igraph_vector_int_t *neis;
   96|  2.02k|    igraph_bool_t all_to;
   97|       |
   98|  2.02k|    igraph_integer_t i, j;
   99|  2.02k|    igraph_vit_t fromvit, tovit;
  100|  2.02k|    igraph_vector_int_t indexv;
  101|       |
  102|  2.02k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (102:9): [True: 2.02k, False: 0]
  |  Branch (102:31): [True: 2.02k, False: 0]
  ------------------
  103|  2.02k|        mode != IGRAPH_ALL) {
  ------------------
  |  Branch (103:9): [True: 0, False: 2.02k]
  ------------------
  104|      0|        IGRAPH_ERROR("Invalid mode argument.", IGRAPH_EINVMODE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  105|      0|    }
  106|       |
  107|  2.02k|    IGRAPH_CHECK(igraph_vit_create(graph, from, &fromvit));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  108|  2.02k|    IGRAPH_FINALLY(igraph_vit_destroy, &fromvit);
  ------------------
  |  |  591|  2.02k|    do { \
  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  109|  2.02k|    no_of_from = IGRAPH_VIT_SIZE(fromvit);
  ------------------
  |  |  191|  2.02k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  110|       |
  111|  2.02k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, mode, IGRAPH_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  112|  2.02k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  591|  2.02k|    do { \
  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  113|       |
  114|  2.02k|    already_counted = IGRAPH_CALLOC(no_of_nodes, igraph_integer_t);
  ------------------
  |  |   38|  2.02k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  4.05k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 2.02k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 2.02k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 2.02k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  115|  2.02k|    IGRAPH_CHECK_OOM(already_counted, "Insufficient memory for graph distance calculation.");
  ------------------
  |  |  701|  2.02k|    do { \
  |  |  702|  2.02k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  116|  2.02k|    IGRAPH_FINALLY(igraph_free, already_counted);
  ------------------
  |  |  591|  2.02k|    do { \
  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  117|       |
  118|  2.02k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   66|  2.02k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   67|  2.02k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (67:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  119|       |
  120|  2.02k|    all_to = igraph_vs_is_all(&to);
  121|  2.02k|    if (all_to) {
  ------------------
  |  Branch (121:9): [True: 2.02k, False: 0]
  ------------------
  122|  2.02k|        no_of_to = no_of_nodes;
  123|  2.02k|    } else {
  124|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&indexv, no_of_nodes);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  125|      0|        IGRAPH_CHECK(igraph_vit_create(graph, to, &tovit));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  126|      0|        IGRAPH_FINALLY(igraph_vit_destroy, &tovit);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  127|      0|        no_of_to = IGRAPH_VIT_SIZE(tovit);
  ------------------
  |  |  191|      0|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  128|      0|        for (i = 0; !IGRAPH_VIT_END(tovit); IGRAPH_VIT_NEXT(tovit)) {
  ------------------
  |  |  180|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                      for (i = 0; !IGRAPH_VIT_END(tovit); IGRAPH_VIT_NEXT(tovit)) {
  ------------------
  |  |  168|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (128:21): [True: 0, False: 0]
  ------------------
  129|      0|            igraph_integer_t v = IGRAPH_VIT_GET(tovit);
  ------------------
  |  |  215|      0|    ((igraph_integer_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (215:25): [True: 0, False: 0]
  |  |  ------------------
  |  |  216|      0|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  130|      0|            if (VECTOR(indexv)[v]) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (130:17): [True: 0, False: 0]
  ------------------
  131|      0|                IGRAPH_ERROR("Target vertex list must not have any duplicates.",
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  132|      0|                             IGRAPH_EINVAL);
  133|      0|            }
  134|      0|            VECTOR(indexv)[v] = ++i;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  135|      0|        }
  136|      0|    }
  137|       |
  138|  2.02k|    IGRAPH_CHECK(igraph_matrix_resize(res, no_of_from, no_of_to));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  139|  2.02k|    igraph_matrix_fill(res, IGRAPH_INFINITY);
  ------------------
  |  |  140|  2.02k|#define IGRAPH_INFINITY ((double)INFINITY)
  ------------------
  140|       |
  141|  2.02k|    for (IGRAPH_VIT_RESET(fromvit), i = 0;
  ------------------
  |  |  202|  2.02k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
  142|  4.05k|         !IGRAPH_VIT_END(fromvit);
  ------------------
  |  |  180|  4.05k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (142:10): [True: 2.02k, False: 2.02k]
  ------------------
  143|  2.02k|         IGRAPH_VIT_NEXT(fromvit), i++) {
  ------------------
  |  |  168|  2.02k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  144|  2.02k|        igraph_integer_t reached = 0;
  145|  2.02k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, IGRAPH_VIT_GET(fromvit)));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  4.05k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (649:40): [True: 2.02k, False: 0]
  |  |  ------------------
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  146|  2.02k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, 0));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  147|  2.02k|        already_counted[ IGRAPH_VIT_GET(fromvit) ] = i + 1;
  ------------------
  |  |  215|  2.02k|    ((igraph_integer_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (215:25): [True: 2.02k, False: 0]
  |  |  ------------------
  |  |  216|  2.02k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  148|       |
  149|  2.02k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|  2.02k|    do { \
  |  |   48|  2.02k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 2.02k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  150|       |
  151|  31.3k|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (151:16): [True: 29.3k, False: 2.02k]
  ------------------
  152|  29.3k|            igraph_integer_t act = igraph_dqueue_int_pop(&q);
  153|  29.3k|            igraph_integer_t actdist = igraph_dqueue_int_pop(&q);
  154|       |
  155|  29.3k|            if (cutoff >= 0 && actdist > cutoff) {
  ------------------
  |  Branch (155:17): [True: 0, False: 29.3k]
  |  Branch (155:32): [True: 0, False: 0]
  ------------------
  156|      0|                continue;
  157|      0|            }
  158|       |
  159|  29.3k|            if (all_to) {
  ------------------
  |  Branch (159:17): [True: 29.3k, False: 0]
  ------------------
  160|  29.3k|                MATRIX(*res, i, act) = actdist;
  ------------------
  |  |   88|  29.3k|#define MATRIX(m,i,j) ((m).data.stor_begin[(m).nrow*(j)+(i)])
  ------------------
  161|  29.3k|            } else {
  162|      0|                if (VECTOR(indexv)[act]) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (162:21): [True: 0, False: 0]
  ------------------
  163|      0|                    MATRIX(*res, i, VECTOR(indexv)[act] - 1) = actdist;
  ------------------
  |  |   88|      0|#define MATRIX(m,i,j) ((m).data.stor_begin[(m).nrow*(j)+(i)])
  ------------------
  164|      0|                    reached++;
  165|      0|                    if (reached == no_of_to) {
  ------------------
  |  Branch (165:25): [True: 0, False: 0]
  ------------------
  166|      0|                        igraph_dqueue_int_clear(&q);
  167|      0|                        break;
  168|      0|                    }
  169|      0|                }
  170|      0|            }
  171|       |
  172|  29.3k|            neis = igraph_adjlist_get(&adjlist, act);
  ------------------
  |  |   78|  29.3k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_integer_t)(no)])
  ------------------
  173|  29.3k|            igraph_integer_t nei_count = igraph_vector_int_size(neis);
  174|   122k|            for (j = 0; j < nei_count; j++) {
  ------------------
  |  Branch (174:25): [True: 93.4k, False: 29.3k]
  ------------------
  175|  93.4k|                igraph_integer_t neighbor = VECTOR(*neis)[j];
  ------------------
  |  |   65|  93.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  176|  93.4k|                if (already_counted[neighbor] == i + 1) {
  ------------------
  |  Branch (176:21): [True: 66.0k, False: 27.3k]
  ------------------
  177|  66.0k|                    continue;
  178|  66.0k|                }
  179|  27.3k|                already_counted[neighbor] = i + 1;
  180|  27.3k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  648|  27.3k|    do { \
  |  |  649|  27.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  27.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  27.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 27.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  27.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  181|  27.3k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, actdist + 1));
  ------------------
  |  |  648|  27.3k|    do { \
  |  |  649|  27.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  27.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  27.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 27.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  27.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  182|  27.3k|            }
  183|  29.3k|        }
  184|  2.02k|    }
  185|       |
  186|       |    /* Clean */
  187|  2.02k|    if (!all_to) {
  ------------------
  |  Branch (187:9): [True: 0, False: 2.02k]
  ------------------
  188|      0|        igraph_vit_destroy(&tovit);
  189|      0|        igraph_vector_int_destroy(&indexv);
  190|      0|        IGRAPH_FINALLY_CLEAN(2);
  191|      0|    }
  192|       |
  193|  2.02k|    IGRAPH_FREE(already_counted);
  ------------------
  |  |   41|  2.02k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  194|  2.02k|    igraph_dqueue_int_destroy(&q);
  195|  2.02k|    igraph_vit_destroy(&fromvit);
  196|  2.02k|    igraph_adjlist_destroy(&adjlist);
  197|  2.02k|    IGRAPH_FINALLY_CLEAN(4);
  198|       |
  199|  2.02k|    return IGRAPH_SUCCESS;
  200|  2.02k|}
igraph_distances:
  254|  2.02k|                                igraph_neimode_t mode) {
  255|  2.02k|    return igraph_distances_cutoff(graph, res, from, to, mode, -1);
  256|  2.02k|}
igraph_get_shortest_paths:
  339|  2.02k|                              igraph_vector_int_t *inbound_edges) {
  340|       |
  341|       |    /* TODO: use inclist_t if to is long (longer than 1?) */
  342|       |
  343|  2.02k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  344|  2.02k|    igraph_integer_t *parent_eids;
  345|       |
  346|  2.02k|    igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   61|  2.02k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
  347|       |
  348|  2.02k|    igraph_integer_t i, j, vsize;
  349|  2.02k|    igraph_vector_int_t tmp = IGRAPH_VECTOR_NULL;
  ------------------
  |  |  104|  2.02k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
  350|       |
  351|  2.02k|    igraph_vit_t vit;
  352|       |
  353|  2.02k|    igraph_integer_t to_reach;
  354|  2.02k|    igraph_integer_t reached = 0;
  355|       |
  356|  2.02k|    if (from < 0 || from >= no_of_nodes) {
  ------------------
  |  Branch (356:9): [True: 0, False: 2.02k]
  |  Branch (356:21): [True: 0, False: 2.02k]
  ------------------
  357|      0|        IGRAPH_ERROR("Index of source vertex is out of range.", IGRAPH_EINVVID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  358|      0|    }
  359|  2.02k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (359:9): [True: 2.02k, False: 0]
  |  Branch (359:31): [True: 2.02k, False: 0]
  ------------------
  360|  2.02k|        mode != IGRAPH_ALL) {
  ------------------
  |  Branch (360:9): [True: 0, False: 2.02k]
  ------------------
  361|      0|        IGRAPH_ERROR("Invalid mode argument.", IGRAPH_EINVMODE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  362|      0|    }
  363|       |
  364|  2.02k|    IGRAPH_CHECK(igraph_vit_create(graph, to, &vit));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  365|  2.02k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  591|  2.02k|    do { \
  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  366|       |
  367|  2.02k|    if (vertices) {
  ------------------
  |  Branch (367:9): [True: 2.02k, False: 0]
  ------------------
  368|  2.02k|        IGRAPH_CHECK(igraph_vector_int_list_resize(vertices, IGRAPH_VIT_SIZE(vit)));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  369|  2.02k|    }
  370|  2.02k|    if (edges) {
  ------------------
  |  Branch (370:9): [True: 2.02k, False: 0]
  ------------------
  371|  2.02k|        IGRAPH_CHECK(igraph_vector_int_list_resize(edges, IGRAPH_VIT_SIZE(vit)));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  372|  2.02k|    }
  373|       |
  374|  2.02k|    parent_eids = IGRAPH_CALLOC(no_of_nodes, igraph_integer_t);
  ------------------
  |  |   38|  2.02k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  4.05k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 2.02k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 2.02k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 2.02k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  375|  2.02k|    IGRAPH_CHECK_OOM(parent_eids, "Insufficient memory for shortest path calculation.");
  ------------------
  |  |  701|  2.02k|    do { \
  |  |  702|  2.02k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  376|  2.02k|    IGRAPH_FINALLY(igraph_free, parent_eids);
  ------------------
  |  |  591|  2.02k|    do { \
  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  377|       |
  378|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&tmp, 0);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  379|  2.02k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   66|  2.02k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   67|  2.02k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (67:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  380|       |
  381|       |    /* Mark the vertices we need to reach */
  382|  2.02k|    to_reach = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  191|  2.02k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  383|   351k|    for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  202|  2.02k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  180|   351k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  168|   349k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (383:33): [True: 349k, False: 2.02k]
  ------------------
  384|   349k|        if (parent_eids[ IGRAPH_VIT_GET(vit) ] == 0) {
  ------------------
  |  |  215|   349k|    ((igraph_integer_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (215:25): [True: 349k, False: 0]
  |  |  ------------------
  |  |  216|   349k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (384:13): [True: 349k, False: 0]
  ------------------
  385|   349k|            parent_eids[ IGRAPH_VIT_GET(vit) ] = -1;
  ------------------
  |  |  215|   349k|    ((igraph_integer_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (215:25): [True: 349k, False: 0]
  |  |  ------------------
  |  |  216|   349k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  386|   349k|        } else {
  387|      0|            to_reach--;       /* this node was given multiple times */
  388|      0|        }
  389|   349k|    }
  390|       |
  391|       |    /* Meaning of parent_eids[i]:
  392|       |     *
  393|       |     * - If parent_eids[i] < 0, it means that vertex i has to be reached and has not
  394|       |     *   been reached yet.
  395|       |     *
  396|       |     * - If parent_eids[i] = 0, it means that vertex i does not have to be reached and
  397|       |     *   it has not been reached yet.
  398|       |     *
  399|       |     * - If parent_eids[i] = 1, it means that vertex i is the start vertex.
  400|       |     *
  401|       |     * - Otherwise, parent_eids[i] is the ID of the edge from which vertex i was
  402|       |     *   reached plus 2.
  403|       |     */
  404|       |
  405|  2.02k|    IGRAPH_CHECK(igraph_dqueue_int_push(&q, from + 1));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  406|  2.02k|    if (parent_eids[ from ] < 0) {
  ------------------
  |  Branch (406:9): [True: 2.02k, False: 0]
  ------------------
  407|  2.02k|        reached++;
  408|  2.02k|    }
  409|  2.02k|    parent_eids[ from ] = 1;
  410|       |
  411|  30.5k|    while (!igraph_dqueue_int_empty(&q) && reached < to_reach) {
  ------------------
  |  Branch (411:12): [True: 28.7k, False: 1.83k]
  |  Branch (411:44): [True: 28.5k, False: 189]
  ------------------
  412|  28.5k|        igraph_integer_t act = igraph_dqueue_int_pop(&q) - 1;
  413|       |
  414|  28.5k|        IGRAPH_CHECK(igraph_incident(graph, &tmp, act, mode));
  ------------------
  |  |  648|  28.5k|    do { \
  |  |  649|  28.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  28.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  28.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 28.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  28.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  415|  28.5k|        vsize = igraph_vector_int_size(&tmp);
  416|   118k|        for (j = 0; j < vsize; j++) {
  ------------------
  |  Branch (416:21): [True: 90.0k, False: 28.5k]
  ------------------
  417|  90.0k|            igraph_integer_t edge = VECTOR(tmp)[j];
  ------------------
  |  |   65|  90.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  418|  90.0k|            igraph_integer_t neighbor = IGRAPH_OTHER(graph, edge, act);
  ------------------
  |  |  144|  90.0k|    ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  90.0k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  90.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  113|  56.1k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  56.1k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  33.9k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  33.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:25): [True: 56.1k, False: 33.9k]
  |  |  ------------------
  ------------------
  419|  90.0k|            if (parent_eids[neighbor] > 0) {
  ------------------
  |  Branch (419:17): [True: 62.7k, False: 27.3k]
  ------------------
  420|  62.7k|                continue;
  421|  62.7k|            } else if (parent_eids[neighbor] < 0) {
  ------------------
  |  Branch (421:24): [True: 27.3k, False: 0]
  ------------------
  422|  27.3k|                reached++;
  423|  27.3k|            }
  424|  27.3k|            parent_eids[neighbor] = edge + 2;
  425|  27.3k|            IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor + 1));
  ------------------
  |  |  648|  27.3k|    do { \
  |  |  649|  27.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  27.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  27.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 27.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  27.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  426|  27.3k|        }
  427|  28.5k|    }
  428|       |
  429|  2.02k|    if (reached < to_reach) {
  ------------------
  |  Branch (429:9): [True: 1.83k, False: 189]
  ------------------
  430|  1.83k|        IGRAPH_WARNING("Couldn't reach some vertices");
  ------------------
  |  |  789|  1.83k|    do { \
  |  |  790|  1.83k|        igraph_warning(reason, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  791|  1.83k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (791:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  431|  1.83k|    }
  432|       |
  433|       |    /* Create `parents' if needed */
  434|  2.02k|    if (parents) {
  ------------------
  |  Branch (434:9): [True: 2.02k, False: 0]
  ------------------
  435|  2.02k|        IGRAPH_CHECK(igraph_vector_int_resize(parents, no_of_nodes));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  436|       |
  437|   351k|        for (i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (437:21): [True: 349k, False: 2.02k]
  ------------------
  438|   349k|            if (parent_eids[i] <= 0) {
  ------------------
  |  Branch (438:17): [True: 320k, False: 29.3k]
  ------------------
  439|       |                /* i was not reached */
  440|   320k|                VECTOR(*parents)[i] = -2;
  ------------------
  |  |   65|   320k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  441|   320k|            } else if (parent_eids[i] == 1) {
  ------------------
  |  Branch (441:24): [True: 2.02k, False: 27.3k]
  ------------------
  442|       |                /* i is the start vertex */
  443|  2.02k|                VECTOR(*parents)[i] = -1;
  ------------------
  |  |   65|  2.02k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  444|  27.3k|            } else {
  445|       |                /* i was reached via the edge with ID = parent_eids[i] - 2 */
  446|  27.3k|                VECTOR(*parents)[i] = IGRAPH_OTHER(graph, parent_eids[i] - 2, i);
  ------------------
  |  |   65|  27.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*parents)[i] = IGRAPH_OTHER(graph, parent_eids[i] - 2, i);
  ------------------
  |  |  144|  27.3k|    ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  27.3k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  27.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  113|  8.86k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  8.86k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  18.4k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  18.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:25): [True: 8.86k, False: 18.4k]
  |  |  ------------------
  ------------------
  447|  27.3k|            }
  448|   349k|        }
  449|  2.02k|    }
  450|       |
  451|       |    /* Create `inbound_edges' if needed */
  452|  2.02k|    if (inbound_edges) {
  ------------------
  |  Branch (452:9): [True: 2.02k, False: 0]
  ------------------
  453|  2.02k|        IGRAPH_CHECK(igraph_vector_int_resize(inbound_edges, no_of_nodes));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  454|       |
  455|   351k|        for (i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (455:21): [True: 349k, False: 2.02k]
  ------------------
  456|   349k|            if (parent_eids[i] <= 1) {
  ------------------
  |  Branch (456:17): [True: 322k, False: 27.3k]
  ------------------
  457|       |                /* i was not reached or i is the start vertex */
  458|   322k|                VECTOR(*inbound_edges)[i] = -1;
  ------------------
  |  |   65|   322k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  459|   322k|            } else {
  460|       |                /* i was reached via the edge with ID = parent_eids[i] - 2 */
  461|  27.3k|                VECTOR(*inbound_edges)[i] = parent_eids[i] - 2;
  ------------------
  |  |   65|  27.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  462|  27.3k|            }
  463|   349k|        }
  464|  2.02k|    }
  465|       |
  466|       |    /* Create `vertices' and `edges' if needed */
  467|  2.02k|    if (vertices || edges) {
  ------------------
  |  Branch (467:9): [True: 2.02k, False: 0]
  |  Branch (467:21): [True: 0, False: 0]
  ------------------
  468|  2.02k|        for (IGRAPH_VIT_RESET(vit), j = 0;
  ------------------
  |  |  202|  2.02k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
  469|   351k|             !IGRAPH_VIT_END(vit);
  ------------------
  |  |  180|   351k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (469:14): [True: 349k, False: 2.02k]
  ------------------
  470|   349k|             IGRAPH_VIT_NEXT(vit), j++) {
  ------------------
  |  |  168|   349k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  471|   349k|            igraph_integer_t node = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  215|   349k|    ((igraph_integer_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (215:25): [True: 349k, False: 0]
  |  |  ------------------
  |  |  216|   349k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  472|   349k|            igraph_vector_int_t *vvec = 0, *evec = 0;
  473|   349k|            if (vertices) {
  ------------------
  |  Branch (473:17): [True: 349k, False: 0]
  ------------------
  474|   349k|                vvec = igraph_vector_int_list_get_ptr(vertices, j);
  475|   349k|                igraph_vector_int_clear(vvec);
  476|   349k|            }
  477|   349k|            if (edges) {
  ------------------
  |  Branch (477:17): [True: 349k, False: 0]
  ------------------
  478|   349k|                evec = igraph_vector_int_list_get_ptr(edges, j);
  479|   349k|                igraph_vector_int_clear(evec);
  480|   349k|            }
  481|       |
  482|   349k|            IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|   349k|    do { \
  |  |   48|   349k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 349k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|   349k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  483|       |
  484|   349k|            if (parent_eids[node] > 0) {
  ------------------
  |  Branch (484:17): [True: 29.3k, False: 320k]
  ------------------
  485|  29.3k|                igraph_integer_t act = node;
  486|  29.3k|                igraph_integer_t size = 0;
  487|  29.3k|                igraph_integer_t edge;
  488|   266k|                while (parent_eids[act] > 1) {
  ------------------
  |  Branch (488:24): [True: 237k, False: 29.3k]
  ------------------
  489|   237k|                    size++;
  490|   237k|                    edge = parent_eids[act] - 2;
  491|   237k|                    act = IGRAPH_OTHER(graph, edge, act);
  ------------------
  |  |  144|   237k|    ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|   237k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|   237k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  113|  99.5k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  99.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|   137k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|   137k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:25): [True: 99.5k, False: 137k]
  |  |  ------------------
  ------------------
  492|   237k|                }
  493|  29.3k|                if (vvec) {
  ------------------
  |  Branch (493:21): [True: 29.3k, False: 0]
  ------------------
  494|  29.3k|                    IGRAPH_CHECK(igraph_vector_int_resize(vvec, size + 1));
  ------------------
  |  |  648|  29.3k|    do { \
  |  |  649|  29.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  29.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  29.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 29.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  29.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  495|  29.3k|                    VECTOR(*vvec)[size] = node;
  ------------------
  |  |   65|  29.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  496|  29.3k|                }
  497|  29.3k|                if (evec) {
  ------------------
  |  Branch (497:21): [True: 29.3k, False: 0]
  ------------------
  498|  29.3k|                    IGRAPH_CHECK(igraph_vector_int_resize(evec, size));
  ------------------
  |  |  648|  29.3k|    do { \
  |  |  649|  29.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  29.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  29.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 29.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  29.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  499|  29.3k|                }
  500|  29.3k|                act = node;
  501|   266k|                while (parent_eids[act] > 1) {
  ------------------
  |  Branch (501:24): [True: 237k, False: 29.3k]
  ------------------
  502|   237k|                    size--;
  503|   237k|                    edge = parent_eids[act] - 2;
  504|   237k|                    act = IGRAPH_OTHER(graph, edge, act);
  ------------------
  |  |  144|   237k|    ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|   237k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|   237k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  113|  99.5k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  99.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|   137k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|   137k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:25): [True: 99.5k, False: 137k]
  |  |  ------------------
  ------------------
  505|   237k|                    if (vvec) {
  ------------------
  |  Branch (505:25): [True: 237k, False: 0]
  ------------------
  506|   237k|                        VECTOR(*vvec)[size] = act;
  ------------------
  |  |   65|   237k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  507|   237k|                    }
  508|   237k|                    if (evec) {
  ------------------
  |  Branch (508:25): [True: 237k, False: 0]
  ------------------
  509|   237k|                        VECTOR(*evec)[size] = edge;
  ------------------
  |  |   65|   237k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  510|   237k|                    }
  511|   237k|                }
  512|  29.3k|            }
  513|   349k|        }
  514|  2.02k|    }
  515|       |
  516|       |    /* Clean */
  517|  2.02k|    IGRAPH_FREE(parent_eids);
  ------------------
  |  |   41|  2.02k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  518|  2.02k|    igraph_dqueue_int_destroy(&q);
  519|  2.02k|    igraph_vector_int_destroy(&tmp);
  520|  2.02k|    igraph_vit_destroy(&vit);
  521|  2.02k|    IGRAPH_FINALLY_CLEAN(4);
  522|       |
  523|  2.02k|    return IGRAPH_SUCCESS;
  524|  2.02k|}

igraph_mean_degree:
  113|  2.02k|                                  igraph_bool_t loops) {
  114|       |
  115|  2.02k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  116|  2.02k|    igraph_integer_t no_of_edges = igraph_ecount(graph);
  117|  2.02k|    igraph_bool_t directed = igraph_is_directed(graph);
  118|       |
  119|  2.02k|    if (no_of_nodes == 0) {
  ------------------
  |  Branch (119:9): [True: 1, False: 2.02k]
  ------------------
  120|      1|        *res = IGRAPH_NAN;
  ------------------
  |  |  143|      1|#define IGRAPH_NAN ((double)NAN)
  ------------------
  121|      1|        return IGRAPH_SUCCESS;
  122|      1|    }
  123|       |
  124|  2.02k|    if (! loops) {
  ------------------
  |  Branch (124:9): [True: 2.02k, False: 0]
  ------------------
  125|  2.02k|        igraph_integer_t loop_count;
  126|  2.02k|        IGRAPH_CHECK(igraph_count_loops(graph, &loop_count));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  127|  2.02k|        no_of_edges -= loop_count;
  128|  2.02k|    }
  129|       |
  130|  2.02k|    *res = (directed ? 1.0 : 2.0) * (igraph_real_t) no_of_edges / (igraph_real_t) no_of_nodes;
  ------------------
  |  Branch (130:13): [True: 0, False: 2.02k]
  ------------------
  131|       |
  132|  2.02k|    return IGRAPH_SUCCESS;
  133|  2.02k|}

igraph_maxdegree:
   58|  2.02k|                     igraph_bool_t loops) {
   59|       |
   60|  2.02k|    igraph_vector_int_t tmp;
   61|       |
   62|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&tmp, 0);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   63|       |
   64|  2.02k|    IGRAPH_CHECK(igraph_degree(graph, &tmp, vids, mode, loops));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   65|  2.02k|    if (igraph_vector_int_size(&tmp) == 0) {
  ------------------
  |  Branch (65:9): [True: 1, False: 2.02k]
  ------------------
   66|      1|        *res = 0;
   67|  2.02k|    } else {
   68|  2.02k|        *res = igraph_vector_int_max(&tmp);
   69|  2.02k|    }
   70|       |
   71|  2.02k|    igraph_vector_int_destroy(&tmp);
   72|  2.02k|    IGRAPH_FINALLY_CLEAN(1);
   73|       |
   74|  2.02k|    return IGRAPH_SUCCESS;
   75|  2.02k|}
igraph_strength:
  616|  2.02k|                    igraph_bool_t loops, const igraph_vector_t *weights) {
  617|       |
  618|  2.02k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  619|  2.02k|    igraph_vit_t vit;
  620|  2.02k|    igraph_integer_t no_vids;
  621|  2.02k|    igraph_vector_int_t degrees;
  622|  2.02k|    igraph_vector_int_t neis;
  623|       |
  624|  2.02k|    if (! weights) {
  ------------------
  |  Branch (624:9): [True: 2.02k, False: 0]
  ------------------
  625|  2.02k|        IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  626|  2.02k|        IGRAPH_CHECK(igraph_vector_resize(res, no_of_nodes));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  627|  2.02k|        IGRAPH_CHECK(igraph_degree(graph, &degrees, vids, mode, loops));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  628|   351k|        for (igraph_integer_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (628:38): [True: 349k, False: 2.02k]
  ------------------
  629|   349k|            VECTOR(*res)[i] = VECTOR(degrees)[i];
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[i] = VECTOR(degrees)[i];
  ------------------
  |  |   65|   349k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  630|   349k|        }
  631|  2.02k|        igraph_vector_int_destroy(&degrees);
  632|  2.02k|        IGRAPH_FINALLY_CLEAN(1);
  633|  2.02k|        return IGRAPH_SUCCESS;
  634|  2.02k|    }
  635|       |
  636|      0|    if (igraph_vector_size(weights) != igraph_ecount(graph)) {
  ------------------
  |  Branch (636:9): [True: 0, False: 0]
  ------------------
  637|      0|        IGRAPH_ERROR("Invalid weight vector length.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  638|      0|    }
  639|       |
  640|      0|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (640:9): [True: 0, False: 0]
  |  Branch (640:31): [True: 0, False: 0]
  |  Branch (640:52): [True: 0, False: 0]
  ------------------
  641|      0|        IGRAPH_ERROR("Invalid mode for vertex strength calculation.", IGRAPH_EINVMODE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  642|      0|    }
  643|       |
  644|      0|    if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (644:9): [True: 0, False: 0]
  ------------------
  645|      0|        return igraph_i_strength_all(graph, res, mode, loops, weights);
  646|      0|    }
  647|       |
  648|      0|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  649|      0|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  650|      0|    no_vids = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  191|      0|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  651|       |
  652|      0|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  653|      0|    IGRAPH_CHECK(igraph_vector_int_reserve(&neis, no_of_nodes));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  654|      0|    IGRAPH_CHECK(igraph_vector_resize(res, no_vids));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  655|      0|    igraph_vector_null(res);
  656|       |
  657|      0|    if (loops) {
  ------------------
  |  Branch (657:9): [True: 0, False: 0]
  ------------------
  658|      0|        for (igraph_integer_t i = 0; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  180|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                      for (igraph_integer_t i = 0; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  168|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (658:38): [True: 0, False: 0]
  ------------------
  659|      0|            IGRAPH_CHECK(igraph_incident(graph, &neis, IGRAPH_VIT_GET(vit), mode));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (649:40): [True: 0, False: 0]
  |  |  ------------------
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  660|      0|            const igraph_integer_t n = igraph_vector_int_size(&neis);
  661|      0|            for (igraph_integer_t j = 0; j < n; j++) {
  ------------------
  |  Branch (661:42): [True: 0, False: 0]
  ------------------
  662|      0|                igraph_integer_t edge = VECTOR(neis)[j];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  663|      0|                VECTOR(*res)[i] += VECTOR(*weights)[edge];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += VECTOR(*weights)[edge];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  664|      0|            }
  665|      0|        }
  666|      0|    } else {
  667|      0|        for (igraph_integer_t i = 0; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  180|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                      for (igraph_integer_t i = 0; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  168|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (667:38): [True: 0, False: 0]
  ------------------
  668|      0|            IGRAPH_CHECK(igraph_incident(graph, &neis, IGRAPH_VIT_GET(vit), mode));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (649:40): [True: 0, False: 0]
  |  |  ------------------
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  669|      0|            const igraph_integer_t n = igraph_vector_int_size(&neis);
  670|      0|            for (igraph_integer_t j = 0; j < n; j++) {
  ------------------
  |  Branch (670:42): [True: 0, False: 0]
  ------------------
  671|      0|                igraph_integer_t edge = VECTOR(neis)[j];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  672|      0|                igraph_integer_t from = IGRAPH_FROM(graph, edge);
  ------------------
  |  |  113|      0|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  673|      0|                igraph_integer_t to = IGRAPH_TO(graph, edge);
  ------------------
  |  |  126|      0|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  674|      0|                if (from != to) {
  ------------------
  |  Branch (674:21): [True: 0, False: 0]
  ------------------
  675|      0|                    VECTOR(*res)[i] += VECTOR(*weights)[edge];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*res)[i] += VECTOR(*weights)[edge];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  676|      0|                }
  677|      0|            }
  678|      0|        }
  679|      0|    }
  680|       |
  681|      0|    igraph_vit_destroy(&vit);
  682|      0|    igraph_vector_int_destroy(&neis);
  683|      0|    IGRAPH_FINALLY_CLEAN(2);
  684|       |
  685|      0|    return IGRAPH_SUCCESS;
  686|      0|}

igraph_girth:
   76|  2.02k|                 igraph_vector_int_t *circle) {
   77|       |
   78|  2.02k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
   79|  2.02k|    igraph_dqueue_int_t q;
   80|  2.02k|    igraph_lazy_adjlist_t adjlist;
   81|  2.02k|    igraph_integer_t mincirc = IGRAPH_INTEGER_MAX, minvertex = 0;
  ------------------
  |  |   77|  2.02k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
   82|  2.02k|    igraph_integer_t node;
   83|  2.02k|    igraph_bool_t triangle = false;
   84|  2.02k|    igraph_vector_int_t *neis;
   85|  2.02k|    igraph_vector_int_t level;
   86|  2.02k|    igraph_integer_t stoplevel = no_of_nodes + 1;
   87|  2.02k|    igraph_bool_t anycircle = false;
   88|  2.02k|    igraph_integer_t t1 = 0, t2 = 0;
   89|       |
   90|  2.02k|    IGRAPH_CHECK(igraph_lazy_adjlist_init(graph, &adjlist, IGRAPH_ALL, IGRAPH_NO_LOOPS, IGRAPH_NO_MULTIPLE));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   91|  2.02k|    IGRAPH_FINALLY(igraph_lazy_adjlist_destroy, &adjlist);
  ------------------
  |  |  591|  2.02k|    do { \
  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   92|  2.02k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   66|  2.02k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   67|  2.02k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (67:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   93|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&level, no_of_nodes);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   94|       |
   95|   301k|    for (node = 0; !triangle && node < no_of_nodes; node++) {
  ------------------
  |  Branch (95:20): [True: 301k, False: 305]
  |  Branch (95:33): [True: 300k, False: 1.59k]
  ------------------
   96|       |
   97|       |        /* Are there circles in this graph at all? */
   98|   300k|        if (node == 1 && anycircle == 0) {
  ------------------
  |  Branch (98:13): [True: 1.90k, False: 298k]
  |  Branch (98:26): [True: 1.66k, False: 236]
  ------------------
   99|  1.66k|            igraph_bool_t conn;
  100|  1.66k|            IGRAPH_CHECK(igraph_is_connected(graph, &conn, IGRAPH_WEAK));
  ------------------
  |  |  648|  1.66k|    do { \
  |  |  649|  1.66k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.66k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.66k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.66k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.66k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  101|  1.66k|            if (conn) {
  ------------------
  |  Branch (101:17): [True: 130, False: 1.53k]
  ------------------
  102|       |                /* No, there are none */
  103|    130|                break;
  104|    130|            }
  105|  1.66k|        }
  106|       |
  107|   299k|        anycircle = 0;
  108|   299k|        igraph_dqueue_int_clear(&q);
  109|   299k|        igraph_vector_int_null(&level);
  110|   299k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, node));
  ------------------
  |  |  648|   299k|    do { \
  |  |  649|   299k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   299k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   299k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 299k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   299k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  111|   299k|        VECTOR(level)[node] = 1;
  ------------------
  |  |   65|   299k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  112|       |
  113|   299k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|   299k|    do { \
  |  |   48|   299k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 299k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|   299k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  114|       |
  115|  2.25M|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (115:16): [True: 1.96M, False: 289k]
  ------------------
  116|  1.96M|            igraph_integer_t actnode = igraph_dqueue_int_pop(&q);
  117|  1.96M|            igraph_integer_t actlevel = VECTOR(level)[actnode];
  ------------------
  |  |   65|  1.96M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  118|  1.96M|            igraph_integer_t i, n;
  119|       |
  120|  1.96M|            if (actlevel >= stoplevel) {
  ------------------
  |  Branch (120:17): [True: 10.6k, False: 1.95M]
  ------------------
  121|  10.6k|                break;
  122|  10.6k|            }
  123|       |
  124|  1.95M|            neis = igraph_lazy_adjlist_get(&adjlist, actnode);
  ------------------
  |  |  163|  1.95M|    (igraph_lazy_adjlist_has(al,no) ? ((al)->adjs[(igraph_integer_t)(no)]) \
  |  |  ------------------
  |  |  |  |  138|  1.95M|#define igraph_lazy_adjlist_has(al,no) ((al)->adjs[(igraph_integer_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (138:40): [True: 1.64M, False: 304k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  164|  1.95M|                                    : (igraph_i_lazy_adjlist_get_real(al, no)))
  ------------------
  125|  1.95M|            IGRAPH_CHECK_OOM(neis, "Failed to query neighbors.");
  ------------------
  |  |  701|  1.95M|    do { \
  |  |  702|  1.95M|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  1.95M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.95M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  1.95M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  126|       |
  127|  1.95M|            n = igraph_vector_int_size(neis);
  128|  5.42M|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (128:25): [True: 3.47M, False: 1.95M]
  ------------------
  129|  3.47M|                igraph_integer_t nei = VECTOR(*neis)[i];
  ------------------
  |  |   65|  3.47M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  130|  3.47M|                igraph_integer_t neilevel = VECTOR(level)[nei];
  ------------------
  |  |   65|  3.47M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  131|  3.47M|                if (neilevel != 0) {
  ------------------
  |  Branch (131:21): [True: 1.66M, False: 1.81M]
  ------------------
  132|  1.66M|                    if (neilevel == actlevel - 1) {
  ------------------
  |  Branch (132:25): [True: 1.65M, False: 6.97k]
  ------------------
  133|  1.65M|                        continue;
  134|  1.65M|                    } else {
  135|       |                        /* found circle */
  136|  6.97k|                        stoplevel = neilevel;
  137|  6.97k|                        anycircle = 1;
  138|  6.97k|                        if (actlevel < mincirc) {
  ------------------
  |  Branch (138:29): [True: 6.97k, False: 0]
  ------------------
  139|       |                            /* Is it a minimum circle? */
  140|  6.97k|                            mincirc = actlevel + neilevel - 1;
  141|  6.97k|                            minvertex = node;
  142|  6.97k|                            t1 = actnode; t2 = nei;
  143|  6.97k|                            if (neilevel == 2) {
  ------------------
  |  Branch (143:33): [True: 305, False: 6.66k]
  ------------------
  144|       |                                /* Is it a triangle? */
  145|    305|                                triangle = 1;
  146|    305|                            }
  147|  6.97k|                        }
  148|  6.97k|                        if (neilevel == actlevel) {
  ------------------
  |  Branch (148:29): [True: 560, False: 6.41k]
  ------------------
  149|    560|                            break;
  150|    560|                        }
  151|  6.97k|                    }
  152|  1.81M|                } else {
  153|  1.81M|                    igraph_dqueue_int_push(&q, nei);
  154|  1.81M|                    VECTOR(level)[nei] = actlevel + 1;
  ------------------
  |  |   65|  1.81M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  155|  1.81M|                }
  156|  3.47M|            }
  157|       |
  158|  1.95M|        } /* while q !empty */
  159|   299k|    } /* node */
  160|       |
  161|  2.02k|    if (girth) {
  ------------------
  |  Branch (161:9): [True: 2.02k, False: 0]
  ------------------
  162|  2.02k|        if (mincirc == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   77|  2.02k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (162:13): [True: 1.50k, False: 520]
  ------------------
  163|  1.50k|            *girth = IGRAPH_INFINITY;
  ------------------
  |  |  140|  1.50k|#define IGRAPH_INFINITY ((double)INFINITY)
  ------------------
  164|  1.50k|        } else {
  165|    520|            *girth = mincirc;
  166|    520|        }
  167|  2.02k|    }
  168|       |
  169|  2.02k|    if (mincirc == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   77|  2.02k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (169:9): [True: 1.50k, False: 520]
  ------------------
  170|  1.50k|        mincirc = 0;
  171|  1.50k|    }
  172|       |
  173|       |    /* Store the actual circle, if needed */
  174|  2.02k|    if (circle) {
  ------------------
  |  Branch (174:9): [True: 2.02k, False: 0]
  ------------------
  175|  2.02k|        IGRAPH_CHECK(igraph_vector_int_resize(circle, mincirc));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  176|  2.02k|        if (mincirc != 0) {
  ------------------
  |  Branch (176:13): [True: 520, False: 1.50k]
  ------------------
  177|    520|            igraph_integer_t i, n, idx = 0;
  178|    520|            igraph_dqueue_int_clear(&q);
  179|    520|            igraph_vector_int_null(&level); /* used for father pointers */
  180|    520|#define FATHER(x) (VECTOR(level)[(x)])
  181|    520|            IGRAPH_CHECK(igraph_dqueue_int_push(&q, minvertex));
  ------------------
  |  |  648|    520|    do { \
  |  |  649|    520|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    520|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    520|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 520]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    520|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  182|    520|            FATHER(minvertex) = minvertex;
  ------------------
  |  |  180|    520|#define FATHER(x) (VECTOR(level)[(x)])
  |  |  ------------------
  |  |  |  |   65|    520|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  183|  3.85k|            while (FATHER(t1) == 0 || FATHER(t2) == 0) {
  ------------------
  |  |  180|  3.85k|#define FATHER(x) (VECTOR(level)[(x)])
  |  |  ------------------
  |  |  |  |   65|  3.85k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                          while (FATHER(t1) == 0 || FATHER(t2) == 0) {
  ------------------
  |  |  180|    985|#define FATHER(x) (VECTOR(level)[(x)])
  |  |  ------------------
  |  |  |  |   65|    985|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (183:20): [True: 2.87k, False: 985]
  |  Branch (183:39): [True: 465, False: 520]
  ------------------
  184|  3.33k|                igraph_integer_t actnode = igraph_dqueue_int_pop(&q);
  185|  3.33k|                neis = igraph_lazy_adjlist_get(&adjlist, actnode);
  ------------------
  |  |  163|  3.33k|    (igraph_lazy_adjlist_has(al,no) ? ((al)->adjs[(igraph_integer_t)(no)]) \
  |  |  ------------------
  |  |  |  |  138|  3.33k|#define igraph_lazy_adjlist_has(al,no) ((al)->adjs[(igraph_integer_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (138:40): [True: 3.33k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  164|  3.33k|                                    : (igraph_i_lazy_adjlist_get_real(al, no)))
  ------------------
  186|  3.33k|                IGRAPH_CHECK_OOM(neis, "Failed to query neighbors.");
  ------------------
  |  |  701|  3.33k|    do { \
  |  |  702|  3.33k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  3.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 3.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  3.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  187|  3.33k|                n = igraph_vector_int_size(neis);
  188|  13.3k|                for (i = 0; i < n; i++) {
  ------------------
  |  Branch (188:29): [True: 10.0k, False: 3.33k]
  ------------------
  189|  10.0k|                    igraph_integer_t nei = VECTOR(*neis)[i];
  ------------------
  |  |   65|  10.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  190|  10.0k|                    if (FATHER(nei) == 0) {
  ------------------
  |  |  180|  10.0k|#define FATHER(x) (VECTOR(level)[(x)])
  |  |  ------------------
  |  |  |  |   65|  10.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (190:25): [True: 7.06k, False: 2.93k]
  ------------------
  191|  7.06k|                        FATHER(nei) = actnode + 1;
  ------------------
  |  |  180|  7.06k|#define FATHER(x) (VECTOR(level)[(x)])
  |  |  ------------------
  |  |  |  |   65|  7.06k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  192|  7.06k|                        igraph_dqueue_int_push(&q, nei);
  193|  7.06k|                    }
  194|  10.0k|                }
  195|  3.33k|            }  /* while q !empty */
  196|       |            /* Ok, now use FATHER to create the path */
  197|  1.98k|            while (t1 != minvertex) {
  ------------------
  |  Branch (197:20): [True: 1.46k, False: 520]
  ------------------
  198|  1.46k|                VECTOR(*circle)[idx++] = t1;
  ------------------
  |  |   65|  1.46k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  199|  1.46k|                t1 = FATHER(t1) - 1;
  ------------------
  |  |  180|  1.46k|#define FATHER(x) (VECTOR(level)[(x)])
  |  |  ------------------
  |  |  |  |   65|  1.46k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  200|  1.46k|            }
  201|    520|            VECTOR(*circle)[idx] = minvertex;
  ------------------
  |  |   65|    520|#define VECTOR(v) ((v).stor_begin)
  ------------------
  202|    520|            idx = mincirc - 1;
  203|  2.13k|            while (t2 != minvertex) {
  ------------------
  |  Branch (203:20): [True: 1.61k, False: 520]
  ------------------
  204|  1.61k|                VECTOR(*circle)[idx--] = t2;
  ------------------
  |  |   65|  1.61k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  205|  1.61k|                t2 = FATHER(t2) - 1;
  ------------------
  |  |  180|  1.61k|#define FATHER(x) (VECTOR(level)[(x)])
  |  |  ------------------
  |  |  |  |   65|  1.61k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  206|  1.61k|            }
  207|    520|        } /* anycircle */
  208|  2.02k|    } /* circle */
  209|  2.02k|#undef FATHER
  210|       |
  211|  2.02k|    igraph_vector_int_destroy(&level);
  212|  2.02k|    igraph_dqueue_int_destroy(&q);
  213|  2.02k|    igraph_lazy_adjlist_destroy(&adjlist);
  214|  2.02k|    IGRAPH_FINALLY_CLEAN(3);
  215|       |
  216|  2.02k|    return IGRAPH_SUCCESS;
  217|  2.02k|}

igraph_has_loop:
   49|  4.05k|igraph_error_t igraph_has_loop(const igraph_t *graph, igraph_bool_t *res) {
   50|  4.05k|    igraph_integer_t i, m = igraph_ecount(graph);
   51|       |
   52|  4.05k|    IGRAPH_RETURN_IF_CACHED_BOOL(graph, IGRAPH_PROP_HAS_LOOP, res);
  ------------------
  |  |   95|  4.05k|    do { \
  |  |   96|  4.05k|        if (igraph_i_property_cache_has((graphptr), (prop))) { \
  |  |  ------------------
  |  |  |  Branch (96:13): [True: 4.05k, False: 1]
  |  |  ------------------
  |  |   97|  4.05k|            *(resptr) = igraph_i_property_cache_get_bool((graphptr), (prop)); \
  |  |   98|  4.05k|            return IGRAPH_SUCCESS; \
  |  |   99|  4.05k|        } \
  |  |  100|  4.05k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (100:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   53|       |
   54|      1|    *res = false;
   55|       |
   56|      1|    for (i = 0; i < m; i++) {
  ------------------
  |  Branch (56:17): [True: 0, False: 1]
  ------------------
   57|      0|        if (IGRAPH_FROM(graph, i) == IGRAPH_TO(graph, i)) {
  ------------------
  |  |  113|      0|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                      if (IGRAPH_FROM(graph, i) == IGRAPH_TO(graph, i)) {
  ------------------
  |  |  126|      0|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (57:13): [True: 0, False: 0]
  ------------------
   58|      0|            *res = true;
   59|      0|            break;
   60|      0|        }
   61|      0|    }
   62|       |
   63|      1|    igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, *res);
   64|       |
   65|      1|    return IGRAPH_SUCCESS;
   66|  4.05k|}
igraph_is_loop:
   87|  2.02k|                              igraph_es_t es) {
   88|  2.02k|    igraph_eit_t eit;
   89|  2.02k|    igraph_bool_t found_loop = false;
   90|       |
   91|  2.02k|    IGRAPH_CHECK(igraph_eit_create(graph, es, &eit));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   92|  2.02k|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  591|  2.02k|    do { \
  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   93|       |
   94|  2.02k|    IGRAPH_CHECK(igraph_vector_bool_resize(res, IGRAPH_EIT_SIZE(eit)));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   95|       |
   96|  2.02k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (96:9): [True: 2.02k, False: 1]
  ------------------
   97|  2.02k|        ! igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (97:9): [True: 1.28k, False: 743]
  ------------------
   98|  1.28k|        igraph_vector_bool_null(res);
   99|  1.28k|        goto done;
  100|  1.28k|    }
  101|       |
  102|  37.8k|    for (igraph_integer_t i = 0; !IGRAPH_EIT_END(eit); i++, IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  370|  37.8k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                  for (igraph_integer_t i = 0; !IGRAPH_EIT_END(eit); i++, IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  358|  37.0k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (102:34): [True: 37.0k, False: 744]
  ------------------
  103|  37.0k|        igraph_integer_t e = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  404|  37.0k|    (igraph_integer_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (404:25): [True: 0, False: 37.0k]
  |  |  ------------------
  |  |  405|  37.0k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   65|  37.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  104|  37.0k|        igraph_bool_t is_loop = (IGRAPH_FROM(graph, e) == IGRAPH_TO(graph, e));
  ------------------
  |  |  113|  37.0k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  37.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                      igraph_bool_t is_loop = (IGRAPH_FROM(graph, e) == IGRAPH_TO(graph, e));
  ------------------
  |  |  126|  37.0k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  37.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  105|  37.0k|        VECTOR(*res)[i] = is_loop;
  ------------------
  |  |   65|  37.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  106|  37.0k|        if (is_loop) {
  ------------------
  |  Branch (106:13): [True: 15.1k, False: 21.8k]
  ------------------
  107|  15.1k|            found_loop = true;
  108|  15.1k|        }
  109|  37.0k|    }
  110|       |
  111|    744|    if (found_loop) {
  ------------------
  |  Branch (111:9): [True: 743, False: 1]
  ------------------
  112|    743|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, true);
  113|    743|    } else if (igraph_es_is_all(&es)) {
  ------------------
  |  Branch (113:16): [True: 0, False: 1]
  ------------------
  114|      0|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, false);
  115|      0|    }
  116|       |
  117|  2.02k|done:
  118|  2.02k|    igraph_eit_destroy(&eit);
  119|  2.02k|    IGRAPH_FINALLY_CLEAN(1);
  120|       |
  121|  2.02k|    return IGRAPH_SUCCESS;
  122|    744|}
igraph_count_loops:
  138|  2.02k|igraph_error_t igraph_count_loops(const igraph_t *graph, igraph_integer_t *loop_count) {
  139|  2.02k|    igraph_integer_t no_of_edges = igraph_ecount(graph);
  140|  2.02k|    igraph_integer_t count;
  141|       |
  142|       |    /* Nothing to do if we know that there are no loops. */
  143|  2.02k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (143:9): [True: 2.02k, False: 0]
  ------------------
  144|  2.02k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (144:9): [True: 1.28k, False: 743]
  ------------------
  145|  1.28k|        *loop_count = 0;
  146|  1.28k|        return IGRAPH_SUCCESS;
  147|  1.28k|    }
  148|       |
  149|    743|    count = 0;
  150|  37.8k|    for (igraph_integer_t e=0; e < no_of_edges; e++) {
  ------------------
  |  Branch (150:32): [True: 37.0k, False: 743]
  ------------------
  151|  37.0k|        if (IGRAPH_FROM(graph, e) == IGRAPH_TO(graph, e)) {
  ------------------
  |  |  113|  37.0k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  37.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                      if (IGRAPH_FROM(graph, e) == IGRAPH_TO(graph, e)) {
  ------------------
  |  |  126|  37.0k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  37.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (151:13): [True: 15.1k, False: 21.8k]
  ------------------
  152|  15.1k|            count++;
  153|  15.1k|        }
  154|  37.0k|    }
  155|       |
  156|       |    /* We already checked for loops, so take the opportunity to set the cache. */
  157|    743|    igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, count > 0);
  158|       |
  159|    743|    *loop_count = count;
  160|       |
  161|    743|    return IGRAPH_SUCCESS;
  162|  2.02k|}

igraph_has_multiple:
  157|  4.05k|igraph_error_t igraph_has_multiple(const igraph_t *graph, igraph_bool_t *res) {
  158|  4.05k|    igraph_integer_t vc = igraph_vcount(graph);
  159|  4.05k|    igraph_integer_t ec = igraph_ecount(graph);
  160|  4.05k|    igraph_bool_t directed = igraph_is_directed(graph);
  161|       |
  162|  4.05k|    IGRAPH_RETURN_IF_CACHED_BOOL(graph, IGRAPH_PROP_HAS_MULTI, res);
  ------------------
  |  |   95|  4.05k|    do { \
  |  |   96|  4.05k|        if (igraph_i_property_cache_has((graphptr), (prop))) { \
  |  |  ------------------
  |  |  |  Branch (96:13): [True: 4.05k, False: 1]
  |  |  ------------------
  |  |   97|  4.05k|            *(resptr) = igraph_i_property_cache_get_bool((graphptr), (prop)); \
  |  |   98|  4.05k|            return IGRAPH_SUCCESS; \
  |  |   99|  4.05k|        } \
  |  |  100|  4.05k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (100:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  163|       |
  164|      1|    if (vc == 0 || ec == 0) {
  ------------------
  |  Branch (164:9): [True: 1, False: 0]
  |  Branch (164:20): [True: 0, False: 0]
  ------------------
  165|      1|        *res = false;
  166|      1|    } else {
  167|      0|        igraph_vector_int_t neis;
  168|      0|        igraph_integer_t i, j, n;
  169|      0|        igraph_bool_t found = false;
  170|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  171|      0|        for (i = 0; i < vc && !found; i++) {
  ------------------
  |  Branch (171:21): [True: 0, False: 0]
  |  Branch (171:31): [True: 0, False: 0]
  ------------------
  172|      0|            IGRAPH_CHECK(igraph_neighbors(graph, &neis, i,
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  173|      0|                                          IGRAPH_OUT));
  174|      0|            n = igraph_vector_int_size(&neis);
  175|      0|            for (j = 1; j < n; j++) {
  ------------------
  |  Branch (175:25): [True: 0, False: 0]
  ------------------
  176|      0|                if (VECTOR(neis)[j - 1] == VECTOR(neis)[j]) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (VECTOR(neis)[j - 1] == VECTOR(neis)[j]) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (176:21): [True: 0, False: 0]
  ------------------
  177|       |                    /* If the graph is undirected, loop edges appear twice in the neighbor
  178|       |                     * list, so check the next item as well */
  179|      0|                    if (directed) {
  ------------------
  |  Branch (179:25): [True: 0, False: 0]
  ------------------
  180|       |                        /* Directed, so this is a real multiple edge */
  181|      0|                        found = true; break;
  182|      0|                    } else if (VECTOR(neis)[j - 1] != i) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (182:32): [True: 0, False: 0]
  ------------------
  183|       |                        /* Undirected, but not a loop edge */
  184|      0|                        found = true; break;
  185|      0|                    } else if (j < n - 1 && VECTOR(neis)[j] == VECTOR(neis)[j + 1]) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  } else if (j < n - 1 && VECTOR(neis)[j] == VECTOR(neis)[j + 1]) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (185:32): [True: 0, False: 0]
  |  Branch (185:45): [True: 0, False: 0]
  ------------------
  186|       |                        /* Undirected, loop edge, multiple times */
  187|      0|                        found = true; break;
  188|      0|                    }
  189|      0|                }
  190|      0|            }
  191|      0|        }
  192|      0|        *res = found;
  193|      0|        igraph_vector_int_destroy(&neis);
  194|      0|        IGRAPH_FINALLY_CLEAN(1);
  195|      0|    }
  196|       |
  197|      1|    igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_MULTI, *res);
  198|       |
  199|      1|    return IGRAPH_SUCCESS;
  200|      1|}
igraph_is_multiple:
  230|  2.02k|                                  igraph_es_t es) {
  231|  2.02k|    igraph_eit_t eit;
  232|  2.02k|    igraph_integer_t i, j, n;
  233|  2.02k|    igraph_lazy_inclist_t inclist;
  234|       |
  235|  2.02k|    IGRAPH_CHECK(igraph_eit_create(graph, es, &eit));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  236|  2.02k|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  591|  2.02k|    do { \
  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  237|       |
  238|  2.02k|    IGRAPH_CHECK(igraph_lazy_inclist_init(graph, &inclist, IGRAPH_OUT, IGRAPH_LOOPS_ONCE));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  239|  2.02k|    IGRAPH_FINALLY(igraph_lazy_inclist_destroy, &inclist);
  ------------------
  |  |  591|  2.02k|    do { \
  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  240|       |
  241|  2.02k|    IGRAPH_CHECK(igraph_vector_bool_resize(res, IGRAPH_EIT_SIZE(eit)));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  242|       |
  243|  76.9k|    for (i = 0; !IGRAPH_EIT_END(eit); i++, IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  370|  76.9k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                  for (i = 0; !IGRAPH_EIT_END(eit); i++, IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  358|  74.9k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (243:17): [True: 74.9k, False: 2.02k]
  ------------------
  244|  74.9k|        igraph_integer_t e = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  404|  74.9k|    (igraph_integer_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (404:25): [True: 74.9k, False: 0]
  |  |  ------------------
  |  |  405|  74.9k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  245|  74.9k|        igraph_integer_t from = IGRAPH_FROM(graph, e);
  ------------------
  |  |  113|  74.9k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  246|  74.9k|        igraph_integer_t to = IGRAPH_TO(graph, e);
  ------------------
  |  |  126|  74.9k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  247|  74.9k|        igraph_vector_int_t *neis = igraph_lazy_inclist_get(&inclist, from);
  ------------------
  |  |  219|  74.9k|    (igraph_lazy_inclist_has(il,no) ? ((il)->incs[(igraph_integer_t)(no)]) \
  |  |  ------------------
  |  |  |  |  194|  74.9k|#define igraph_lazy_inclist_has(il,no) ((il)->incs[(igraph_integer_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:40): [True: 37.6k, False: 37.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  220|  74.9k|                                    : (igraph_i_lazy_inclist_get_real(il,no)))
  ------------------
  248|       |
  249|  74.9k|        IGRAPH_CHECK_OOM(neis, "Failed to query incident edges.");
  ------------------
  |  |  701|  74.9k|    do { \
  |  |  702|  74.9k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  74.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 74.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  74.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  250|       |
  251|  74.9k|        VECTOR(*res)[i] = false;
  ------------------
  |  |   65|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  252|       |
  253|  74.9k|        n = igraph_vector_int_size(neis);
  254|  2.96M|        for (j = 0; j < n; j++) {
  ------------------
  |  Branch (254:21): [True: 2.89M, False: 74.9k]
  ------------------
  255|  2.89M|            igraph_integer_t e2 = VECTOR(*neis)[j];
  ------------------
  |  |   65|  2.89M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  256|  2.89M|            igraph_integer_t to2 = IGRAPH_OTHER(graph, e2, from);
  ------------------
  |  |  144|  2.89M|    ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  2.89M|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  2.89M|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  113|  1.89M|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  1.89M|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|   994k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|   994k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:25): [True: 1.89M, False: 994k]
  |  |  ------------------
  ------------------
  257|  2.89M|            if (to2 == to && e2 < e) {
  ------------------
  |  Branch (257:17): [True: 2.33M, False: 554k]
  |  Branch (257:30): [True: 1.13M, False: 1.20M]
  ------------------
  258|  1.13M|                VECTOR(*res)[i] = true;
  ------------------
  |  |   65|  1.13M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  259|  1.13M|            }
  260|  2.89M|        }
  261|  74.9k|    }
  262|       |
  263|  2.02k|    igraph_lazy_inclist_destroy(&inclist);
  264|  2.02k|    igraph_eit_destroy(&eit);
  265|  2.02k|    IGRAPH_FINALLY_CLEAN(2);
  266|  2.02k|    return IGRAPH_SUCCESS;
  267|  2.02k|}
igraph_count_multiple:
  294|  2.02k|                                     igraph_es_t es) {
  295|  2.02k|    igraph_eit_t eit;
  296|  2.02k|    igraph_integer_t i, j, n;
  297|  2.02k|    igraph_lazy_adjlist_t adjlist;
  298|       |
  299|  2.02k|    IGRAPH_CHECK(igraph_eit_create(graph, es, &eit));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  300|  2.02k|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  591|  2.02k|    do { \
  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  301|  2.02k|    IGRAPH_CHECK(igraph_lazy_adjlist_init(graph, &adjlist, IGRAPH_OUT, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  302|  2.02k|    IGRAPH_FINALLY(igraph_lazy_adjlist_destroy, &adjlist);
  ------------------
  |  |  591|  2.02k|    do { \
  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  303|       |
  304|  2.02k|    IGRAPH_CHECK(igraph_vector_int_resize(res, IGRAPH_EIT_SIZE(eit)));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  305|       |
  306|  76.9k|    for (i = 0; !IGRAPH_EIT_END(eit); i++, IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  370|  76.9k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                  for (i = 0; !IGRAPH_EIT_END(eit); i++, IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  358|  74.9k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (306:17): [True: 74.9k, False: 2.02k]
  ------------------
  307|  74.9k|        igraph_integer_t e = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  404|  74.9k|    (igraph_integer_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (404:25): [True: 0, False: 74.9k]
  |  |  ------------------
  |  |  405|  74.9k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   65|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  308|  74.9k|        igraph_integer_t from = IGRAPH_FROM(graph, e);
  ------------------
  |  |  113|  74.9k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  309|  74.9k|        igraph_integer_t to = IGRAPH_TO(graph, e);
  ------------------
  |  |  126|  74.9k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  74.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  310|  74.9k|        igraph_vector_int_t *neis = igraph_lazy_adjlist_get(&adjlist, from);
  ------------------
  |  |  163|  74.9k|    (igraph_lazy_adjlist_has(al,no) ? ((al)->adjs[(igraph_integer_t)(no)]) \
  |  |  ------------------
  |  |  |  |  138|  74.9k|#define igraph_lazy_adjlist_has(al,no) ((al)->adjs[(igraph_integer_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (138:40): [True: 37.6k, False: 37.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  164|  74.9k|                                    : (igraph_i_lazy_adjlist_get_real(al, no)))
  ------------------
  311|       |
  312|  74.9k|        IGRAPH_CHECK_OOM(neis, "Failed to query adjacent vertices.");
  ------------------
  |  |  701|  74.9k|    do { \
  |  |  702|  74.9k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  74.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 74.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  74.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  313|       |
  314|  74.9k|        VECTOR(*res)[i] = 0;
  ------------------
  |  |   65|  74.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  315|       |
  316|  74.9k|        n = igraph_vector_int_size(neis);
  317|  2.96M|        for (j = 0; j < n; j++) {
  ------------------
  |  Branch (317:21): [True: 2.89M, False: 74.9k]
  ------------------
  318|  2.89M|            if (VECTOR(*neis)[j] == to) {
  ------------------
  |  |   65|  2.89M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (318:17): [True: 2.33M, False: 554k]
  ------------------
  319|  2.33M|                VECTOR(*res)[i]++;
  ------------------
  |  |   65|  2.33M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  320|  2.33M|            }
  321|  2.89M|        }
  322|  74.9k|    }
  323|       |
  324|  2.02k|    igraph_lazy_adjlist_destroy(&adjlist);
  325|  2.02k|    igraph_eit_destroy(&eit);
  326|  2.02k|    IGRAPH_FINALLY_CLEAN(2);
  327|       |
  328|  2.02k|    return IGRAPH_SUCCESS;
  329|  2.02k|}
igraph_count_multiple_1:
  349|  2.02k|{
  350|  2.02k|    igraph_integer_t i, n, count;
  351|  2.02k|    igraph_integer_t from = IGRAPH_FROM(graph, eid);
  ------------------
  |  |  113|  2.02k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  2.02k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  352|  2.02k|    igraph_integer_t to = IGRAPH_TO(graph, eid);
  ------------------
  |  |  126|  2.02k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  2.02k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  353|  2.02k|    igraph_vector_int_t vids;
  354|       |
  355|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&vids, 0);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  356|  2.02k|    IGRAPH_CHECK(igraph_neighbors(graph, &vids, from, IGRAPH_OUT));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  357|       |
  358|  2.02k|    count = 0;
  359|  2.02k|    n = igraph_vector_int_size(&vids);
  360|  10.9k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (360:17): [True: 8.91k, False: 2.02k]
  ------------------
  361|  8.91k|        if (VECTOR(vids)[i] == to) {
  ------------------
  |  |   65|  8.91k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (361:13): [True: 2.11k, False: 6.80k]
  ------------------
  362|  2.11k|            count++;
  363|  2.11k|        }
  364|  8.91k|    }
  365|       |
  366|  2.02k|    igraph_vector_int_destroy(&vids);
  367|  2.02k|    IGRAPH_FINALLY_CLEAN(1);
  368|       |
  369|  2.02k|    *res = count;
  370|       |
  371|  2.02k|    return IGRAPH_SUCCESS;
  372|  2.02k|}

igraph_unfold_tree:
   61|  2.02k|                       igraph_vector_int_t *vertex_index) {
   62|       |
   63|  2.02k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
   64|  2.02k|    igraph_integer_t no_of_edges = igraph_ecount(graph);
   65|  2.02k|    igraph_integer_t no_of_roots = igraph_vector_int_size(roots);
   66|  2.02k|    igraph_integer_t tree_vertex_count = no_of_nodes;
   67|       |
   68|  2.02k|    igraph_vector_int_t edges;
   69|  2.02k|    igraph_bitset_t seen_vertices;
   70|  2.02k|    igraph_bitset_t seen_edges;
   71|       |
   72|  2.02k|    igraph_dqueue_int_t Q;
   73|  2.02k|    igraph_vector_int_t neis;
   74|       |
   75|  2.02k|    igraph_integer_t v_ptr = no_of_nodes;
   76|       |
   77|  2.02k|    if (! igraph_vector_int_isininterval(roots, 0, no_of_nodes-1)) {
  ------------------
  |  Branch (77:9): [True: 0, False: 2.02k]
  ------------------
   78|      0|        IGRAPH_ERROR("All roots should be vertices of the graph.", IGRAPH_EINVVID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   79|      0|    }
   80|       |
   81|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, 0);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   82|  2.02k|    IGRAPH_CHECK(igraph_vector_int_reserve(&edges, no_of_edges * 2));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   83|  2.02k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&Q, 100);
  ------------------
  |  |   66|  2.02k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   67|  2.02k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (67:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   84|  2.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  124|  2.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   85|  2.02k|    IGRAPH_BITSET_INIT_FINALLY(&seen_vertices, no_of_nodes);
  ------------------
  |  |  261|  2.02k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  262|  2.02k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  263|  2.02k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (263:62): [Folded - Ignored]
  |  |  ------------------
  ------------------
   86|  2.02k|    IGRAPH_BITSET_INIT_FINALLY(&seen_edges, no_of_edges);
  ------------------
  |  |  261|  2.02k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  262|  2.02k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.02k|    do { \
  |  |  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  263|  2.02k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.02k|    do { \
  |  |  |  |  592|  2.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (263:62): [Folded - Ignored]
  |  |  ------------------
  ------------------
   87|       |
   88|  2.02k|    if (vertex_index) {
  ------------------
  |  Branch (88:9): [True: 2.02k, False: 0]
  ------------------
   89|  2.02k|        IGRAPH_CHECK(igraph_vector_int_range(vertex_index, 0, no_of_nodes));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   90|  2.02k|    }
   91|       |
   92|  4.05k|    for (igraph_integer_t r = 0; r < no_of_roots; r++) {
  ------------------
  |  Branch (92:34): [True: 2.02k, False: 2.02k]
  ------------------
   93|       |
   94|  2.02k|        igraph_integer_t root = VECTOR(*roots)[r];
  ------------------
  |  |   65|  2.02k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   95|  2.02k|        IGRAPH_BIT_SET(seen_vertices, root);
  ------------------
  |  |  105|  2.02k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  2.02k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  2.02k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  2.02k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  2.02k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  2.02k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   96|  2.02k|        IGRAPH_CHECK(igraph_dqueue_int_push(&Q, root));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   97|       |
   98|  31.3k|        while (!igraph_dqueue_int_empty(&Q)) {
  ------------------
  |  Branch (98:16): [True: 29.3k, False: 2.02k]
  ------------------
   99|  29.3k|            igraph_integer_t actnode = igraph_dqueue_int_pop(&Q);
  100|       |
  101|  29.3k|            IGRAPH_CHECK(igraph_incident(graph, &neis, actnode, mode));
  ------------------
  |  |  648|  29.3k|    do { \
  |  |  649|  29.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  29.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  29.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 29.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  29.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  102|       |
  103|  29.3k|            igraph_integer_t n = igraph_vector_int_size(&neis);
  104|   122k|            for (igraph_integer_t i = 0; i < n; i++) {
  ------------------
  |  Branch (104:42): [True: 93.4k, False: 29.3k]
  ------------------
  105|       |
  106|  93.4k|                igraph_integer_t edge = VECTOR(neis)[i];
  ------------------
  |  |   65|  93.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  107|  93.4k|                igraph_integer_t from = IGRAPH_FROM(graph, edge);
  ------------------
  |  |  113|  93.4k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  93.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  108|  93.4k|                igraph_integer_t to = IGRAPH_TO(graph, edge);
  ------------------
  |  |  126|  93.4k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  93.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  109|  93.4k|                igraph_integer_t nei = IGRAPH_OTHER(graph, edge, actnode);
  ------------------
  |  |  144|  93.4k|    ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  93.4k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  93.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  113|  58.1k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  58.1k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  35.2k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  35.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:25): [True: 58.1k, False: 35.2k]
  |  |  ------------------
  ------------------
  110|       |
  111|  93.4k|                if (! IGRAPH_BIT_TEST(seen_edges, edge)) {
  ------------------
  |  |  144|  93.4k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  93.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  93.4k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  93.4k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  93.4k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  93.4k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (111:21): [True: 46.7k, False: 46.7k]
  ------------------
  112|       |
  113|  46.7k|                    IGRAPH_BIT_SET(seen_edges, edge);
  ------------------
  |  |  105|  46.7k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  46.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  46.7k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  46.7k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  46.7k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  46.7k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  114|       |
  115|  46.7k|                    if (! IGRAPH_BIT_TEST(seen_vertices, nei)) {
  ------------------
  |  |  144|  46.7k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  46.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  46.7k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  46.7k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  46.7k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  46.7k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (115:25): [True: 27.3k, False: 19.3k]
  ------------------
  116|       |
  117|  27.3k|                        IGRAPH_CHECK(igraph_vector_int_push_back(&edges, from));
  ------------------
  |  |  648|  27.3k|    do { \
  |  |  649|  27.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  27.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  27.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 27.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  27.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  118|  27.3k|                        IGRAPH_CHECK(igraph_vector_int_push_back(&edges, to));
  ------------------
  |  |  648|  27.3k|    do { \
  |  |  649|  27.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  27.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  27.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 27.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  27.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  119|       |
  120|  27.3k|                        IGRAPH_BIT_SET(seen_vertices, nei);
  ------------------
  |  |  105|  27.3k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  27.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  27.3k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  27.3k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  27.3k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  27.3k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  121|  27.3k|                        IGRAPH_CHECK(igraph_dqueue_int_push(&Q, nei));
  ------------------
  |  |  648|  27.3k|    do { \
  |  |  649|  27.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  27.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  27.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 27.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  27.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  122|       |
  123|  27.3k|                    } else {
  124|       |
  125|  19.3k|                        tree_vertex_count++;
  126|  19.3k|                        if (vertex_index) {
  ------------------
  |  Branch (126:29): [True: 19.3k, False: 0]
  ------------------
  127|  19.3k|                            IGRAPH_CHECK(igraph_vector_int_push_back(vertex_index, nei));
  ------------------
  |  |  648|  19.3k|    do { \
  |  |  649|  19.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  19.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  19.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 19.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  19.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  128|  19.3k|                        }
  129|       |
  130|  19.3k|                        if (from == nei) {
  ------------------
  |  Branch (130:29): [True: 17.2k, False: 2.18k]
  ------------------
  131|  17.2k|                            IGRAPH_CHECK(igraph_vector_int_push_back(&edges, v_ptr++));
  ------------------
  |  |  648|  17.2k|    do { \
  |  |  649|  17.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  17.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  17.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 17.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  17.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  132|  17.2k|                            IGRAPH_CHECK(igraph_vector_int_push_back(&edges, to));
  ------------------
  |  |  648|  17.2k|    do { \
  |  |  649|  17.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  17.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  17.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 17.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  17.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  133|  17.2k|                        } else {
  134|  2.18k|                            IGRAPH_CHECK(igraph_vector_int_push_back(&edges, from));
  ------------------
  |  |  648|  2.18k|    do { \
  |  |  649|  2.18k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.18k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.18k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.18k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  135|  2.18k|                            IGRAPH_CHECK(igraph_vector_int_push_back(&edges, v_ptr++));
  ------------------
  |  |  648|  2.18k|    do { \
  |  |  649|  2.18k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.18k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.18k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.18k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  136|  2.18k|                        }
  137|  19.3k|                    }
  138|  46.7k|                }
  139|       |
  140|  93.4k|            } /* for i<n */
  141|       |
  142|  29.3k|        } /* ! igraph_dqueue_int_empty(&Q) */
  143|       |
  144|  2.02k|    } /* r < igraph_vector_int_size(roots) */
  145|       |
  146|  2.02k|    igraph_bitset_destroy(&seen_edges);
  147|  2.02k|    igraph_bitset_destroy(&seen_vertices);
  148|  2.02k|    igraph_vector_int_destroy(&neis);
  149|  2.02k|    igraph_dqueue_int_destroy(&Q);
  150|  2.02k|    IGRAPH_FINALLY_CLEAN(4);
  151|       |
  152|  2.02k|    IGRAPH_CHECK(igraph_create(tree, &edges, tree_vertex_count, igraph_is_directed(graph)));
  ------------------
  |  |  648|  2.02k|    do { \
  |  |  649|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  153|  2.02k|    igraph_vector_int_destroy(&edges);
  154|  2.02k|    IGRAPH_FINALLY_CLEAN(1);
  155|       |
  156|  2.02k|    return IGRAPH_SUCCESS;
  157|  2.02k|}
igraph_is_tree:
  251|    175|igraph_error_t igraph_is_tree(const igraph_t *graph, igraph_bool_t *res, igraph_integer_t *root, igraph_neimode_t mode) {
  252|    175|    igraph_bool_t is_tree = false;
  253|    175|    igraph_bool_t treat_as_undirected = !igraph_is_directed(graph) || mode == IGRAPH_ALL;
  ------------------
  |  Branch (253:41): [True: 175, False: 0]
  |  Branch (253:71): [True: 0, False: 0]
  ------------------
  254|    175|    igraph_integer_t iroot = 0;
  255|    175|    igraph_integer_t visited_count;
  256|    175|    igraph_integer_t vcount, ecount;
  257|       |
  258|    175|    vcount = igraph_vcount(graph);
  259|    175|    ecount = igraph_ecount(graph);
  260|       |
  261|    175|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED)) {
  ------------------
  |  Branch (261:9): [True: 0, False: 175]
  ------------------
  262|      0|        igraph_bool_t weakly_connected = igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED);
  263|       |
  264|      0|        if (weakly_connected) {
  ------------------
  |  Branch (264:13): [True: 0, False: 0]
  ------------------
  265|       |            /* For undirected graphs and for directed graphs with mode == IGRAPH_ALL,
  266|       |             * we can return early if we know from the cache that the graph is weakly
  267|       |             * connected and is a forest. We can do this even if the user wants the
  268|       |             * root vertex because we always return zero as the root vertex for
  269|       |             * undirected graphs */
  270|      0|            if (treat_as_undirected &&
  ------------------
  |  Branch (270:17): [True: 0, False: 0]
  ------------------
  271|      0|                igraph_i_property_cache_has(graph, IGRAPH_PROP_IS_FOREST) &&
  ------------------
  |  Branch (271:17): [True: 0, False: 0]
  ------------------
  272|      0|                igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_IS_FOREST)
  ------------------
  |  Branch (272:17): [True: 0, False: 0]
  ------------------
  273|      0|            ) {
  274|      0|                is_tree = true;
  275|      0|                iroot = 0;
  276|      0|                goto success;
  277|      0|            }
  278|      0|        } else /* ! weakly_connected */ {
  279|       |            /* If the graph is not weakly connected, then it is neither an undirected
  280|       |             * not a directed tree. There is no root, so we can return early. */
  281|      0|            is_tree = false;
  282|      0|            goto success;
  283|      0|        }
  284|      0|    }
  285|       |
  286|       |    /* A tree must have precisely vcount-1 edges. */
  287|       |    /* By convention, the zero-vertex graph will not be considered a tree. */
  288|    175|    if (ecount != vcount - 1) {
  ------------------
  |  Branch (288:9): [True: 0, False: 175]
  ------------------
  289|      0|        is_tree = false;
  290|      0|        goto success;
  291|      0|    }
  292|       |
  293|       |    /* The single-vertex graph is a tree, provided it has no edges (checked in the previous if (..)) */
  294|    175|    if (vcount == 1) {
  ------------------
  |  Branch (294:9): [True: 0, False: 175]
  ------------------
  295|      0|        is_tree = true;
  296|      0|        iroot = 0;
  297|      0|        goto success;
  298|      0|    }
  299|       |
  300|       |    /* For higher vertex counts we cannot short-circuit due to the possibility
  301|       |     * of loops or multi-edges even when the edge count is correct. */
  302|       |
  303|       |    /* Ignore mode for undirected graphs. */
  304|    175|    if (! igraph_is_directed(graph)) {
  ------------------
  |  Branch (304:9): [True: 175, False: 0]
  ------------------
  305|    175|        mode = IGRAPH_ALL;
  306|    175|    }
  307|       |
  308|       |    /* The main algorithm:
  309|       |     * We find a root and check that all other vertices are reachable from it.
  310|       |     * We have already checked the number of edges, so with the additional
  311|       |     * reachability condition we can verify if the graph is a tree.
  312|       |     *
  313|       |     * For directed graphs, the root is the node with no incoming/outgoing
  314|       |     * connections, depending on 'mode'. For undirected, it is arbitrary, so
  315|       |     * we choose 0.
  316|       |     */
  317|       |
  318|    175|    is_tree = true; /* assume success */
  319|       |
  320|    175|    switch (mode) {
  321|    175|    case IGRAPH_ALL:
  ------------------
  |  Branch (321:5): [True: 175, False: 0]
  ------------------
  322|    175|        iroot = 0;
  323|    175|        break;
  324|       |
  325|      0|    case IGRAPH_IN:
  ------------------
  |  Branch (325:5): [True: 0, False: 175]
  ------------------
  326|      0|    case IGRAPH_OUT: {
  ------------------
  |  Branch (326:5): [True: 0, False: 175]
  ------------------
  327|      0|        igraph_vector_int_t degree;
  328|      0|        igraph_integer_t i;
  329|       |
  330|      0|        IGRAPH_CHECK(igraph_vector_int_init(&degree, 0));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  331|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, &degree);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  332|       |
  333|      0|        IGRAPH_CHECK(igraph_degree(graph, &degree, igraph_vss_all(), mode == IGRAPH_IN ? IGRAPH_OUT : IGRAPH_IN, IGRAPH_LOOPS));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (649:40): [True: 0, False: 0]
  |  |  ------------------
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  334|       |
  335|      0|        for (i = 0; i < vcount; ++i) {
  ------------------
  |  Branch (335:21): [True: 0, False: 0]
  ------------------
  336|      0|            if (VECTOR(degree)[i] == 0) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (336:17): [True: 0, False: 0]
  ------------------
  337|      0|                break;
  338|      0|            }
  339|      0|            if (VECTOR(degree)[i] > 1) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (339:17): [True: 0, False: 0]
  ------------------
  340|       |                /* In an out-tree, all vertices have in-degree 1, except for the root,
  341|       |                 * which has in-degree 0. Thus, if we encounter a larger in-degree,
  342|       |                 * the graph cannot be an out-tree.
  343|       |                 * We could perform this check for all degrees, but that would not
  344|       |                 * improve performance when the graph is indeed a tree, persumably
  345|       |                 * the most common case. Thus we only check until finding the root.
  346|       |                 */
  347|      0|                is_tree = false;
  348|      0|                break;
  349|      0|            }
  350|      0|        }
  351|       |
  352|       |        /* If no suitable root is found, the graph is not a tree. */
  353|      0|        if (is_tree && i == vcount) {
  ------------------
  |  Branch (353:13): [True: 0, False: 0]
  |  Branch (353:24): [True: 0, False: 0]
  ------------------
  354|      0|            is_tree = false;
  355|      0|        } else {
  356|      0|            iroot = i;
  357|      0|        }
  358|       |
  359|      0|        igraph_vector_int_destroy(&degree);
  360|      0|        IGRAPH_FINALLY_CLEAN(1);
  361|      0|    }
  362|       |
  363|      0|    break;
  364|      0|    default:
  ------------------
  |  Branch (364:5): [True: 0, False: 175]
  ------------------
  365|      0|        IGRAPH_ERROR("Invalid mode.", IGRAPH_EINVMODE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  366|    175|    }
  367|       |
  368|       |    /* if no suitable root was found, skip visiting vertices */
  369|    175|    if (is_tree) {
  ------------------
  |  Branch (369:9): [True: 175, False: 0]
  ------------------
  370|    175|        IGRAPH_CHECK(igraph_i_is_tree_visitor(graph, iroot, mode, &visited_count));
  ------------------
  |  |  648|    175|    do { \
  |  |  649|    175|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    175|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    175|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 175]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    175|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  371|    175|        is_tree = visited_count == vcount;
  372|    175|    }
  373|       |
  374|    175|success:
  375|    175|    if (res) {
  ------------------
  |  Branch (375:9): [True: 175, False: 0]
  ------------------
  376|    175|        *res = is_tree;
  377|    175|    }
  378|       |
  379|    175|    if (root) {
  ------------------
  |  Branch (379:9): [True: 0, False: 175]
  ------------------
  380|      0|        *root = iroot;
  381|      0|    }
  382|       |
  383|    175|    if (is_tree) {
  ------------------
  |  Branch (383:9): [True: 175, False: 0]
  ------------------
  384|       |        /* A graph that is a directed tree is also an undirected tree.
  385|       |         * An undirected tree is weakly connected and is a forest,
  386|       |         * so we can cache this. */
  387|    175|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_FOREST, true);
  388|    175|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED, true);
  389|    175|    }
  390|       |
  391|    175|    return IGRAPH_SUCCESS;
  392|    175|}
trees.c:igraph_i_is_tree_visitor:
  162|    175|static igraph_error_t igraph_i_is_tree_visitor(const igraph_t *graph, igraph_integer_t root, igraph_neimode_t mode, igraph_integer_t *visited_count) {
  163|    175|    igraph_stack_int_t stack;
  164|    175|    igraph_bitset_t visited;
  165|    175|    igraph_vector_int_t neighbors;
  166|    175|    igraph_integer_t i;
  167|       |
  168|    175|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neighbors, 0);
  ------------------
  |  |  124|    175|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    175|    do { \
  |  |  |  |  649|    175|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    175|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    175|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 175]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    175|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    175|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    175|    do { \
  |  |  |  |  592|    175|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    175|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    175|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    175|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    175|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    175|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  169|       |
  170|    175|    IGRAPH_BITSET_INIT_FINALLY(&visited, igraph_vcount(graph));
  ------------------
  |  |  261|    175|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  262|    175|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  648|    175|    do { \
  |  |  |  |  649|    175|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    175|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    175|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 175]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    175|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  263|    175|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  591|    175|    do { \
  |  |  |  |  592|    175|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    175|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    175|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    175|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    175|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    175|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (263:62): [Folded - Ignored]
  |  |  ------------------
  ------------------
  171|       |
  172|    175|    IGRAPH_CHECK(igraph_stack_int_init(&stack, 0));
  ------------------
  |  |  648|    175|    do { \
  |  |  649|    175|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    175|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    175|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 175]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    175|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  173|    175|    IGRAPH_FINALLY(igraph_stack_int_destroy, &stack);
  ------------------
  |  |  591|    175|    do { \
  |  |  592|    175|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    175|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    175|         * incorrect destructor function with the pointer */ \
  |  |  595|    175|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    175|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    175|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  174|       |
  175|    175|    *visited_count = 0;
  176|       |
  177|       |    /* push the root into the stack */
  178|    175|    IGRAPH_CHECK(igraph_stack_int_push(&stack, root));
  ------------------
  |  |  648|    175|    do { \
  |  |  649|    175|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    175|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    175|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 175]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    175|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  179|       |
  180|  4.34k|    while (! igraph_stack_int_empty(&stack)) {
  ------------------
  |  Branch (180:12): [True: 4.17k, False: 175]
  ------------------
  181|  4.17k|        igraph_integer_t u;
  182|  4.17k|        igraph_integer_t ncount;
  183|       |
  184|       |        /* take a vertex from the stack, mark it as visited */
  185|  4.17k|        u = igraph_stack_int_pop(&stack);
  186|  4.17k|        if (IGRAPH_LIKELY(! IGRAPH_BIT_TEST(visited, u))) {
  ------------------
  |  |  605|  4.17k|    #define IGRAPH_LIKELY(a)   __builtin_expect((a), 1)
  |  |  ------------------
  |  |  |  Branch (605:32): [True: 4.17k, False: 0]
  |  |  ------------------
  ------------------
  187|  4.17k|            IGRAPH_BIT_SET(visited, u);
  ------------------
  |  |  105|  4.17k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  4.17k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  4.17k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  4.17k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  4.17k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  4.17k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  188|  4.17k|            *visited_count += 1;
  189|  4.17k|        }
  190|       |
  191|       |        /* register all its yet-unvisited neighbours for future processing */
  192|  4.17k|        IGRAPH_CHECK(igraph_neighbors(graph, &neighbors, u, mode));
  ------------------
  |  |  648|  4.17k|    do { \
  |  |  649|  4.17k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  4.17k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  4.17k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.17k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  4.17k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  193|  4.17k|        ncount = igraph_vector_int_size(&neighbors);
  194|  12.1k|        for (i = 0; i < ncount; ++i) {
  ------------------
  |  Branch (194:21): [True: 7.99k, False: 4.17k]
  ------------------
  195|  7.99k|            igraph_integer_t v = VECTOR(neighbors)[i];
  ------------------
  |  |   65|  7.99k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  196|  7.99k|            if (! IGRAPH_BIT_TEST(visited, v)) {
  ------------------
  |  |  144|  7.99k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   65|  7.99k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   87|  7.99k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  7.99k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   68|  7.99k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  7.99k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (196:17): [True: 3.99k, False: 3.99k]
  ------------------
  197|  3.99k|                IGRAPH_CHECK(igraph_stack_int_push(&stack, v));
  ------------------
  |  |  648|  3.99k|    do { \
  |  |  649|  3.99k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  3.99k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  3.99k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 3.99k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  3.99k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  198|  3.99k|            }
  199|  7.99k|        }
  200|  4.17k|    }
  201|       |
  202|    175|    igraph_vector_int_destroy(&neighbors);
  203|    175|    igraph_stack_int_destroy(&stack);
  204|    175|    igraph_bitset_destroy(&visited);
  205|    175|    IGRAPH_FINALLY_CLEAN(3);
  206|       |
  207|    175|    return IGRAPH_SUCCESS;
  208|    175|}

igraph_rng_default:
  189|   147k|igraph_rng_t *igraph_rng_default(void) {
  190|   147k|    return igraph_i_rng_default_ptr;
  191|   147k|}
igraph_rng_bits:
  278|   146k|igraph_integer_t igraph_rng_bits(const igraph_rng_t* rng) {
  279|   146k|    return rng->type->bits;
  280|   146k|}
igraph_rng_get_bool:
  563|  48.1k|igraph_bool_t igraph_rng_get_bool(igraph_rng_t *rng) {
  564|  48.1k|    const igraph_rng_type_t *type = rng->type;
  565|  48.1k|    const igraph_integer_t rng_bitwidth = igraph_rng_bits(rng);
  566|       |    /* Keep the highest bit as RNGs sometimes tend to have lower entropy in
  567|       |     * low bits than in high bits.
  568|       |     *
  569|       |     * Ensure that the return value is stricly 0 or 1 even if igraph_bool_t is
  570|       |     * defined to something else than a native bool.
  571|       |     */
  572|  48.1k|    return (type->get(rng->state) >> (rng_bitwidth - 1)) & (igraph_uint_t)1;
  573|  48.1k|}
igraph_rng_get_integer:
  594|  98.1k|) {
  595|  98.1k|    const igraph_rng_type_t *type = rng->type;
  596|  98.1k|    igraph_uint_t range;
  597|       |
  598|  98.1k|    assert(h >= l);
  599|       |
  600|  98.1k|    if (h == l) {
  ------------------
  |  Branch (600:9): [True: 0, False: 98.1k]
  ------------------
  601|      0|        return l;
  602|      0|    }
  603|       |
  604|  98.1k|    if (type->get_int) {
  ------------------
  |  Branch (604:9): [True: 0, False: 98.1k]
  ------------------
  605|      0|        return type->get_int(rng->state, l, h);
  606|      0|    }
  607|       |
  608|  98.1k|    if (IGRAPH_UNLIKELY(l == IGRAPH_INTEGER_MIN && h == IGRAPH_INTEGER_MAX)) {
  ------------------
  |  |  604|  98.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  ------------------
  |  |  |  Branch (604:32): [True: 0, False: 98.1k]
  |  |  |  Branch (604:50): [True: 0, False: 98.1k]
  |  |  |  Branch (604:50): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  609|       |        /* Full uint range is needed, we can just grab a random number from
  610|       |         * the uint range and cast it to a signed integer */
  611|      0|        return (igraph_integer_t) igraph_i_rng_get_uint(rng);
  612|  98.1k|    } else if (l >= 0 || h < 0) {
  ------------------
  |  Branch (612:16): [True: 98.1k, False: 0]
  |  Branch (612:26): [True: 0, False: 0]
  ------------------
  613|       |        /* this is okay, (h - l) will not overflow an igraph_integer_t */
  614|  98.1k|        range = (igraph_uint_t)(h - l) + 1;
  615|  98.1k|    } else {
  616|       |        /* (h - l) could potentially overflow so we need to play it safe. If we
  617|       |         * are here, l < 0 and h >= 0 so we can cast -l into an igraph_uint_t
  618|       |         * safely and do the subtraction that way */
  619|      0|        range = ((igraph_uint_t)(h)) + ((igraph_uint_t)(-l)) + 1;
  620|      0|    }
  621|       |
  622|  98.1k|    return l + igraph_i_rng_get_uint_bounded(rng, range);
  623|  98.1k|}
random.c:igraph_i_rng_get_random_bits:
  337|  98.1k|static igraph_uint_t igraph_i_rng_get_random_bits(igraph_rng_t *rng, uint8_t bits) {
  338|  98.1k|    const igraph_rng_type_t *type = rng->type;
  339|  98.1k|    igraph_integer_t rng_bitwidth = igraph_rng_bits(rng);
  340|  98.1k|    igraph_uint_t result;
  341|       |
  342|  98.1k|    if (rng_bitwidth >= bits) {
  ------------------
  |  Branch (342:9): [True: 98.1k, False: 0]
  ------------------
  343|       |        /* keep the high bits as RNGs sometimes tend to have lower entropy in
  344|       |         * low bits than in high bits */
  345|  98.1k|        result = type->get(rng->state) >> (rng_bitwidth - bits);
  346|  98.1k|    } else {
  347|      0|        result = 0;
  348|      0|        do {
  349|      0|            result = (result << rng_bitwidth) + type->get(rng->state);
  350|      0|            bits -= rng_bitwidth;
  351|      0|        } while (bits > rng_bitwidth);
  ------------------
  |  Branch (351:18): [True: 0, False: 0]
  ------------------
  352|       |
  353|       |        /* and now the last piece */
  354|      0|        result = (result << bits) + (type->get(rng->state) >> (rng_bitwidth - bits));
  355|      0|    }
  356|       |
  357|  98.1k|    return result;
  358|  98.1k|}
random.c:igraph_i_rng_get_uint_bounded:
  533|  98.1k|static igraph_uint_t igraph_i_rng_get_uint_bounded(igraph_rng_t *rng, igraph_uint_t range) {
  534|       |    /* We must make this function behave the same way for range < 2^32 so igraph
  535|       |     * behaves the same way on 32-bit and 64-bit platforms as long as we stick
  536|       |     * to integers less than 2^32. This is to ensure that the unit tests are
  537|       |     * consistent */
  538|       |
  539|       |#if IGRAPH_INTEGER_SIZE == 32
  540|       |    return igraph_i_rng_get_uint32_bounded(rng, range);
  541|       |#else
  542|  98.1k|    if (range <= UINT32_MAX) {
  ------------------
  |  Branch (542:9): [True: 98.1k, False: 0]
  ------------------
  543|  98.1k|        return igraph_i_rng_get_uint32_bounded(rng, range);
  544|  98.1k|    } else {
  545|      0|        return igraph_i_rng_get_uint64_bounded(rng, range);
  546|      0|    }
  547|  98.1k|#endif
  548|  98.1k|}
random.c:igraph_i_rng_get_uint32_bounded:
  429|  98.1k|static uint32_t igraph_i_rng_get_uint32_bounded(igraph_rng_t *rng, uint32_t range) {
  430|       |    /* Debiased integer multiplication -- Lemire's method
  431|       |     * from https://www.pcg-random.org/posts/bounded-rands.html */
  432|  98.1k|    uint32_t x, l, t = (-range) % range;
  433|  98.1k|    uint64_t m;
  434|  98.1k|    do {
  435|  98.1k|        x = igraph_i_rng_get_uint32(rng);
  436|  98.1k|        m = (uint64_t)(x) * (uint64_t)(range);
  437|  98.1k|        l = (uint32_t)m;
  438|  98.1k|    } while (l < t);
  ------------------
  |  Branch (438:14): [True: 0, False: 98.1k]
  ------------------
  439|  98.1k|    return m >> 32;
  440|  98.1k|}
random.c:igraph_i_rng_get_uint32:
  417|  98.1k|static uint32_t igraph_i_rng_get_uint32(igraph_rng_t *rng) {
  418|  98.1k|    return igraph_i_rng_get_random_bits(rng, 32);
  419|  98.1k|}

rng_pcg32.c:igraph_rng_pcg32_get:
   38|   146k|static igraph_uint_t igraph_rng_pcg32_get(void *vstate) {
   39|   146k|    pcg32_random_t *state = (pcg32_random_t*) vstate;
   40|   146k|    return pcg32_random_r(state);
  ------------------
  |  | 2388|   146k|#define pcg32_random_r                  pcg_setseq_64_xsh_rr_32_random_r
  ------------------
   41|   146k|}

