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

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

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

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

igraph_from_prufer:
   55|    206|igraph_error_t igraph_from_prufer(igraph_t *graph, const igraph_vector_int_t *prufer) {
   56|    206|    igraph_vector_int_t degree;
   57|    206|    igraph_vector_int_t edges;
   58|    206|    igraph_int_t n;
   59|    206|    igraph_int_t i, k;
   60|    206|    igraph_int_t u, v; /* vertices */
   61|    206|    igraph_int_t ec;
   62|       |
   63|    206|    IGRAPH_SAFE_ADD(igraph_vector_int_size(prufer), 2, &n);
  ------------------
  |  |   47|    206|    do { \
  |  |   48|    206|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   49|    206|        igraph_int_t _safe_sum; \
  |  |   50|    206|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 206]
  |  |  ------------------
  |  |   51|      0|            IGRAPH_ERRORF("Overflow when adding %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  464|      0|    do { \
  |  |  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  467|      0|        return igraph_errno; \
  |  |  |  |  468|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|        } \
  |  |   53|    206|        *(res) = _safe_sum; \
  |  |   54|    206|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded, False: 206]
  |  |  ------------------
  ------------------
   64|       |
   65|    206|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degree, n); /* initializes vector to zeros */
  ------------------
  |  |  119|    206|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    206|    do { \
  |  |  |  |  657|    206|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    206|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    206|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 206]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    206|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 206]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    206|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    206|    do { \
  |  |  |  |  604|    206|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    206|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    206|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    206|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 206]
  |  |  |  |  ------------------
  |  |  |  |  608|    206|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    206|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 206]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 206]
  |  |  ------------------
  ------------------
   66|    206|    {
   67|    206|        igraph_int_t no_of_edges2;
   68|    206|        IGRAPH_SAFE_MULT(n - 1, 2, &no_of_edges2);
  ------------------
  |  |   57|    206|    do { \
  |  |   58|    206|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   59|    206|        igraph_int_t _safe_prod; \
  |  |   60|    206|        if (__builtin_mul_overflow(_safe_a, _safe_b, &_safe_prod)) { \
  |  |  ------------------
  |  |  |  Branch (60:13): [True: 0, False: 206]
  |  |  ------------------
  |  |   61|      0|            IGRAPH_ERRORF("Overflow when multiplying %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  464|      0|    do { \
  |  |  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  467|      0|        return igraph_errno; \
  |  |  |  |  468|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|      0|        } \
  |  |   63|    206|        *(res) = _safe_prod; \
  |  |   64|    206|    } while (0)
  |  |  ------------------
  |  |  |  Branch (64:14): [Folded, False: 206]
  |  |  ------------------
  ------------------
   69|    206|        IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, no_of_edges2);
  ------------------
  |  |  119|    206|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    206|    do { \
  |  |  |  |  657|    206|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    206|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    206|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 206]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    206|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 206]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    206|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    206|    do { \
  |  |  |  |  604|    206|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    206|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    206|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    206|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 206]
  |  |  |  |  ------------------
  |  |  |  |  608|    206|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    206|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 206]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 206]
  |  |  ------------------
  ------------------
   70|    206|    }
   71|       |
   72|       |    /* build out-degree vector (i.e. number of child vertices) and verify Prufer sequence */
   73|  5.51k|    for (i = 0; i < n - 2; ++i) {
  ------------------
  |  Branch (73:17): [True: 5.30k, False: 206]
  ------------------
   74|  5.30k|        igraph_int_t w = VECTOR(*prufer)[i];
  ------------------
  |  |   60|  5.30k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   75|  5.30k|        if (w >= n || w < 0) {
  ------------------
  |  Branch (75:13): [True: 0, False: 5.30k]
  |  Branch (75:23): [True: 0, False: 5.30k]
  ------------------
   76|      0|            IGRAPH_ERROR("Invalid Prufer sequence.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   77|      0|        }
   78|  5.30k|        VECTOR(degree)[w] += 1;
  ------------------
  |  |   60|  5.30k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   79|  5.30k|    }
   80|       |
   81|    206|    v = 0;  /* initialize v now, in case Prufer sequence is empty */
   82|    206|    k = 0;  /* index into the Prufer vector */
   83|    206|    ec = 0; /* index into the edges vector */
   84|  5.47k|    for (i = 0; i < n; ++i) {
  ------------------
  |  Branch (84:17): [True: 5.47k, False: 0]
  ------------------
   85|  5.47k|        u = i;
   86|       |
   87|  10.7k|        while (k < n - 2 && u <= i && (VECTOR(degree)[u] == 0)) {
  ------------------
  |  |   60|  9.41k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (87:16): [True: 10.5k, False: 206]
  |  Branch (87:29): [True: 9.41k, False: 1.16k]
  |  Branch (87:39): [True: 5.30k, False: 4.10k]
  ------------------
   88|       |            /* u is a leaf here */
   89|       |
   90|  5.30k|            v = VECTOR(*prufer)[k]; /* parent of u */
  ------------------
  |  |   60|  5.30k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   91|       |
   92|       |            /* add edge */
   93|  5.30k|            VECTOR(edges)[ec++] = v;
  ------------------
  |  |   60|  5.30k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   94|  5.30k|            VECTOR(edges)[ec++] = u;
  ------------------
  |  |   60|  5.30k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   95|       |
   96|  5.30k|            k += 1;
   97|       |
   98|  5.30k|            VECTOR(degree)[v] -= 1;
  ------------------
  |  |   60|  5.30k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   99|       |
  100|  5.30k|            u = v;
  101|  5.30k|        }
  102|       |
  103|  5.47k|        if (k == n - 2) {
  ------------------
  |  Branch (103:13): [True: 206, False: 5.26k]
  ------------------
  104|    206|            break;
  105|    206|        }
  106|  5.47k|    }
  107|       |
  108|       |    /* find u for last edge, v is already set */
  109|    230|    for (u = i + 1; u < n; ++u)
  ------------------
  |  Branch (109:21): [True: 230, False: 0]
  ------------------
  110|    230|        if ((VECTOR(degree)[u] == 0) && u != v) {
  ------------------
  |  |   60|    230|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (110:13): [True: 230, False: 0]
  |  Branch (110:41): [True: 206, False: 24]
  ------------------
  111|    206|            break;
  112|    206|        }
  113|       |
  114|       |    /* add last edge */
  115|    206|    VECTOR(edges)[ec++] = v;
  ------------------
  |  |   60|    206|#define VECTOR(v) ((v).stor_begin)
  ------------------
  116|    206|    VECTOR(edges)[ec++] = u;
  ------------------
  |  |   60|    206|#define VECTOR(v) ((v).stor_begin)
  ------------------
  117|       |
  118|    206|    IGRAPH_CHECK(igraph_create(graph, &edges, n, IGRAPH_UNDIRECTED));
  ------------------
  |  |  656|    206|    do { \
  |  |  657|    206|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    206|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    206|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 206]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    206|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 206]
  |  |  ------------------
  ------------------
  119|       |
  120|    206|    igraph_vector_int_destroy(&edges);
  121|    206|    igraph_vector_int_destroy(&degree);
  122|    206|    IGRAPH_FINALLY_CLEAN(2);
  123|       |
  124|    206|    return IGRAPH_SUCCESS;
  125|    206|}

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

igraph_dqueue_int_init:
   75|  33.1k|igraph_error_t FUNCTION(igraph_dqueue, init)(TYPE(igraph_dqueue)* q, igraph_int_t capacity) {
   76|  33.1k|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  33.1k|    do { \
  |  |  925|  33.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  33.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 33.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  33.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 33.1k]
  |  |  ------------------
  ------------------
   77|  33.1k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  33.1k|    do { \
  |  |  925|  33.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  33.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 33.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  33.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 33.1k]
  |  |  ------------------
  ------------------
   78|       |
   79|  33.1k|    if (capacity == 0) capacity = 1;
  ------------------
  |  Branch (79:9): [True: 529, False: 32.5k]
  ------------------
   80|       |
   81|  33.1k|    q->stor_begin = IGRAPH_CALLOC(capacity, BASE);
  ------------------
  |  |   33|  33.1k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  66.2k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 33.1k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 33.1k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 33.1k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   82|  33.1k|    IGRAPH_CHECK_OOM(q->stor_begin, "Cannot initialize dqueue.");
  ------------------
  |  |  709|  33.1k|    do { \
  |  |  710|  33.1k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  33.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 33.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  33.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 33.1k]
  |  |  ------------------
  ------------------
   83|  33.1k|    q->stor_end = q->stor_begin + capacity;
   84|  33.1k|    q->begin = q->stor_begin;
   85|  33.1k|    q->end = NULL;
   86|       |
   87|  33.1k|    return IGRAPH_SUCCESS;
   88|  33.1k|}
igraph_dqueue_int_destroy:
  100|  33.1k|void FUNCTION(igraph_dqueue, destroy)(TYPE(igraph_dqueue)* q) {
  101|  33.1k|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  33.1k|    do { \
  |  |  925|  33.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  33.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 33.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  33.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 33.1k]
  |  |  ------------------
  ------------------
  102|  33.1k|    IGRAPH_FREE(q->stor_begin); /* sets to NULL */
  ------------------
  |  |   36|  33.1k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  103|  33.1k|}
igraph_dqueue_int_empty:
  117|  7.10M|igraph_bool_t FUNCTION(igraph_dqueue, empty)(const TYPE(igraph_dqueue)* q) {
  118|  7.10M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  7.10M|    do { \
  |  |  925|  7.10M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  7.10M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.10M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  7.10M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 7.10M]
  |  |  ------------------
  ------------------
  119|  7.10M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  7.10M|    do { \
  |  |  925|  7.10M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  7.10M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.10M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  7.10M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 7.10M]
  |  |  ------------------
  ------------------
  120|  7.10M|    return q->end == NULL;
  121|  7.10M|}
igraph_dqueue_int_clear:
  133|   333k|void FUNCTION(igraph_dqueue, clear)(TYPE(igraph_dqueue)* q) {
  134|   333k|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|   333k|    do { \
  |  |  925|   333k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   333k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 333k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   333k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 333k]
  |  |  ------------------
  ------------------
  135|   333k|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|   333k|    do { \
  |  |  925|   333k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   333k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 333k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   333k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 333k]
  |  |  ------------------
  ------------------
  136|   333k|    q->begin = q->stor_begin;
  137|       |    q->end = NULL;
  138|   333k|}
igraph_dqueue_int_head:
  196|  52.4k|BASE FUNCTION(igraph_dqueue, head)(const TYPE(igraph_dqueue)* q) {
  197|  52.4k|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  52.4k|    do { \
  |  |  925|  52.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  52.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 52.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  52.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 52.4k]
  |  |  ------------------
  ------------------
  198|  52.4k|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  52.4k|    do { \
  |  |  925|  52.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  52.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 52.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  52.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 52.4k]
  |  |  ------------------
  ------------------
  199|  52.4k|    IGRAPH_ASSERT(q->stor_end != NULL); /* queue is not empty */
  ------------------
  |  |  924|  52.4k|    do { \
  |  |  925|  52.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  52.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 52.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  52.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 52.4k]
  |  |  ------------------
  ------------------
  200|  52.4k|    return *(q->begin);
  201|  52.4k|}
igraph_dqueue_int_pop:
  240|  5.15M|BASE FUNCTION(igraph_dqueue, pop)(TYPE(igraph_dqueue)* q) {
  241|  5.15M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  5.15M|    do { \
  |  |  925|  5.15M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  5.15M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.15M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  5.15M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 5.15M]
  |  |  ------------------
  ------------------
  242|  5.15M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  5.15M|    do { \
  |  |  925|  5.15M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  5.15M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.15M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  5.15M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 5.15M]
  |  |  ------------------
  ------------------
  243|  5.15M|    IGRAPH_ASSERT(q->stor_end != NULL); /* queue is not empty */
  ------------------
  |  |  924|  5.15M|    do { \
  |  |  925|  5.15M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  5.15M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.15M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  5.15M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 5.15M]
  |  |  ------------------
  ------------------
  244|  5.15M|    BASE tmp = *(q->begin);
  ------------------
  |  |   66|  5.15M|    #define BASE igraph_int_t
  ------------------
  245|  5.15M|    (q->begin)++;
  246|  5.15M|    if (q->begin == q->stor_end) {
  ------------------
  |  Branch (246:9): [True: 62.3k, False: 5.08M]
  ------------------
  247|  62.3k|        q->begin = q->stor_begin;
  248|  62.3k|    }
  249|  5.15M|    if (q->begin == q->end) {
  ------------------
  |  Branch (249:9): [True: 2.49M, False: 2.65M]
  ------------------
  250|  2.49M|        q->end = NULL;
  251|  2.49M|    }
  252|       |
  253|  5.15M|    return tmp;
  254|  5.15M|}
igraph_dqueue_int_push:
  307|  5.30M|igraph_error_t FUNCTION(igraph_dqueue, push)(TYPE(igraph_dqueue)* q, BASE elem) {
  308|  5.30M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  5.30M|    do { \
  |  |  925|  5.30M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  5.30M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.30M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  5.30M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 5.30M]
  |  |  ------------------
  ------------------
  309|  5.30M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  5.30M|    do { \
  |  |  925|  5.30M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  5.30M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.30M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  5.30M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 5.30M]
  |  |  ------------------
  ------------------
  310|  5.30M|    if (q->begin != q->end) {
  ------------------
  |  Branch (310:9): [True: 5.29M, False: 2.63k]
  ------------------
  311|       |        /* not full */
  312|  5.29M|        if (q->end == NULL) {
  ------------------
  |  Branch (312:13): [True: 2.51M, False: 2.78M]
  ------------------
  313|  2.51M|            q->end = q->begin;
  314|  2.51M|        }
  315|  5.29M|        *(q->end) = elem;
  316|  5.29M|        (q->end)++;
  317|  5.29M|        if (q->end == q->stor_end) {
  ------------------
  |  Branch (317:13): [True: 64.8k, False: 5.23M]
  ------------------
  318|  64.8k|            q->end = q->stor_begin;
  319|  64.8k|        }
  320|  5.29M|    } else {
  321|       |        /* full, allocate more storage */
  322|       |
  323|  2.63k|        BASE *bigger = NULL, *old = q->stor_begin;
  ------------------
  |  |   66|  2.63k|    #define BASE igraph_int_t
  ------------------
  324|  2.63k|        igraph_int_t old_size = q->stor_end - q->stor_begin;
  325|  2.63k|        igraph_int_t new_capacity = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|  2.63k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_capacity = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|  2.63k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (325:37): [True: 2.63k, False: 0]
  ------------------
  326|       |
  327|  2.63k|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   72|  2.63k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (327:13): [True: 0, False: 2.63k]
  ------------------
  328|      0|            IGRAPH_ERROR("Cannot push to dqueue, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  329|      0|        }
  330|  2.63k|        if (new_capacity == 0) {
  ------------------
  |  Branch (330:13): [True: 0, False: 2.63k]
  ------------------
  331|      0|            new_capacity = 1;
  332|      0|        }
  333|       |
  334|  2.63k|        bigger = IGRAPH_CALLOC(new_capacity, BASE);
  ------------------
  |  |   33|  2.63k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  5.26k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.63k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.63k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.63k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  335|  2.63k|        IGRAPH_CHECK_OOM(bigger, "Cannot push to dqueue.");
  ------------------
  |  |  709|  2.63k|    do { \
  |  |  710|  2.63k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.63k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  2.63k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.63k]
  |  |  ------------------
  ------------------
  336|       |
  337|  2.63k|        if (q->stor_end - q->begin > 0) {
  ------------------
  |  Branch (337:13): [True: 2.63k, False: 0]
  ------------------
  338|  2.63k|            memcpy(bigger, q->begin,
  339|  2.63k|                   (size_t)(q->stor_end - q->begin) * sizeof(BASE));
  340|  2.63k|        }
  341|  2.63k|        if (q->end - q->stor_begin > 0) {
  ------------------
  |  Branch (341:13): [True: 1.54k, False: 1.08k]
  ------------------
  342|  1.54k|            memcpy(bigger + (q->stor_end - q->begin), q->stor_begin,
  343|  1.54k|                   (size_t)(q->end - q->stor_begin) * sizeof(BASE));
  344|  1.54k|        }
  345|       |
  346|  2.63k|        q->end        = bigger + old_size;
  347|  2.63k|        q->stor_end   = bigger + new_capacity;
  348|  2.63k|        q->stor_begin = bigger;
  349|  2.63k|        q->begin      = bigger;
  350|       |
  351|  2.63k|        *(q->end) = elem;
  352|  2.63k|        (q->end)++;
  353|  2.63k|        if (q->end == q->stor_end) {
  ------------------
  |  Branch (353:13): [True: 243, False: 2.38k]
  ------------------
  354|    243|            q->end = q->stor_begin;
  355|    243|        }
  356|       |
  357|  2.63k|        IGRAPH_FREE(old);
  ------------------
  |  |   36|  2.63k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  358|  2.63k|    }
  359|       |
  360|  5.30M|    return IGRAPH_SUCCESS;
  361|  5.30M|}

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

igraph_gen2wheap_init:
  113|  2.23k|) {
  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.23k|    h->max_size = max_size;
  120|       |    /* We start with the biggest */
  121|  2.23k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&h->index2, max_size);
  ------------------
  |  |  119|  2.23k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.23k|    do { \
  |  |  |  |  657|  2.23k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.23k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.23k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.23k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.23k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.23k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.23k|    do { \
  |  |  |  |  604|  2.23k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.23k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.23k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.23k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.23k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.23k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.23k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.23k]
  |  |  ------------------
  ------------------
  122|  2.23k|    h->cmp = cmp;
  123|  2.23k|    h->item_size = item_size;
  124|  2.23k|    h->data = igraph_calloc(max_size, item_size);
  125|  2.23k|    IGRAPH_CHECK_OOM(h->data, "Cannot initialize generic heap.");
  ------------------
  |  |  709|  2.23k|    do { \
  |  |  710|  2.23k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.23k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  2.23k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.23k]
  |  |  ------------------
  ------------------
  126|  2.23k|    IGRAPH_FINALLY(igraph_free, h->data);
  ------------------
  |  |  603|  2.23k|    do { \
  |  |  604|  2.23k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.23k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.23k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.23k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.23k]
  |  |  ------------------
  |  |  608|  2.23k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.23k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.23k]
  |  |  ------------------
  ------------------
  127|  2.23k|    IGRAPH_CHECK(igraph_vector_int_init(&h->index, 0));
  ------------------
  |  |  656|  2.23k|    do { \
  |  |  657|  2.23k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.23k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.23k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.23k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.23k]
  |  |  ------------------
  ------------------
  128|       |
  129|  2.23k|    IGRAPH_FINALLY_CLEAN(2);
  130|  2.23k|    return IGRAPH_SUCCESS;
  131|  2.23k|}
igraph_gen2wheap_destroy:
  136|  2.23k|void igraph_gen2wheap_destroy(igraph_gen2wheap_t *h) {
  137|       |    IGRAPH_FREE(h->data);
  ------------------
  |  |   36|  2.23k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  138|  2.23k|    igraph_vector_int_destroy(&h->index);
  139|  2.23k|    igraph_vector_int_destroy(&h->index2);
  140|  2.23k|}
igraph_gen2wheap_size:
  145|  1.04M|igraph_int_t igraph_gen2wheap_size(const igraph_gen2wheap_t *h) {
  146|  1.04M|    return igraph_vector_int_size(&h->index);
  147|  1.04M|}
igraph_gen2wheap_empty:
  160|   389k|igraph_bool_t igraph_gen2wheap_empty(const igraph_gen2wheap_t *h) {
  161|   389k|    return igraph_vector_int_empty(&h->index);
  162|   389k|}
igraph_gen2wheap_push_with_index:
  171|   386k|                                                igraph_int_t idx, const void *elem) {
  172|       |
  173|   386k|    igraph_int_t size = igraph_vector_int_size(&h->index);
  174|       |
  175|   386k|    if (size > IGRAPH_INTEGER_MAX - 2) {
  ------------------
  |  |   72|   386k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (175:9): [True: 0, False: 386k]
  ------------------
  176|       |        /* to allow size+2 below */
  177|      0|        IGRAPH_ERROR("Cannot push to gen2wheap, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  178|      0|    }
  179|       |
  180|   386k|    memcpy(ELEM(h, size), elem, h->item_size);
  ------------------
  |  |   34|   386k|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
  181|   386k|    IGRAPH_CHECK(igraph_vector_int_push_back(&h->index, idx));
  ------------------
  |  |  656|   386k|    do { \
  |  |  657|   386k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   386k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   386k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 386k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   386k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 386k]
  |  |  ------------------
  ------------------
  182|   386k|    VECTOR(h->index2)[idx] = size + 2;
  ------------------
  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  183|       |
  184|       |    /* maintain heap */
  185|   386k|    igraph_i_gen2wheap_shift_up(h, size);
  186|       |
  187|   386k|    return IGRAPH_SUCCESS;
  188|   386k|}
igraph_gen2wheap_max_index:
  210|   386k|igraph_int_t igraph_gen2wheap_max_index(const igraph_gen2wheap_t *h) {
  211|   386k|    return VECTOR(h->index)[0];
  ------------------
  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  212|   386k|}
igraph_gen2wheap_has_elem:
  218|   113k|igraph_bool_t igraph_gen2wheap_has_elem(const igraph_gen2wheap_t *h, igraph_int_t idx) {
  219|   113k|    return VECTOR(h->index2)[idx] != 0;
  ------------------
  |  |   60|   113k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  220|   113k|}
igraph_gen2wheap_get:
  233|  56.6k|const void *igraph_gen2wheap_get(const igraph_gen2wheap_t *h, igraph_int_t idx) {
  234|  56.6k|    igraph_int_t i = VECTOR(h->index2)[idx] - 2;
  ------------------
  |  |   60|  56.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  235|  56.6k|    return ELEM(h, i);
  ------------------
  |  |   34|  56.6k|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
  236|  56.6k|}
igraph_gen2wheap_delete_max:
  244|   386k|void igraph_gen2wheap_delete_max(igraph_gen2wheap_t *h) {
  245|   386k|    igraph_int_t tmpidx = VECTOR(h->index)[0];
  ------------------
  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  246|   386k|    igraph_i_gen2wheap_switch(h, 0, igraph_gen2wheap_size(h) - 1);
  247|   386k|    igraph_vector_int_pop_back(&h->index);
  248|   386k|    VECTOR(h->index2)[tmpidx] = 0;
  ------------------
  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  249|   386k|    igraph_i_gen2wheap_sink(h, 0);
  250|   386k|}
igraph_gen2wheap_modify:
  269|  56.6k|void igraph_gen2wheap_modify(igraph_gen2wheap_t *h, igraph_int_t idx, const void *elem) {
  270|       |
  271|  56.6k|    igraph_int_t pos = VECTOR(h->index2)[idx] - 2;
  ------------------
  |  |   60|  56.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  272|       |
  273|  56.6k|    memcpy(ELEM(h, pos), elem, h->item_size);
  ------------------
  |  |   34|  56.6k|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
  274|  56.6k|    igraph_i_gen2wheap_sink(h, pos);
  275|  56.6k|    igraph_i_gen2wheap_shift_up(h, pos);
  276|  56.6k|}
genheap.c:igraph_i_gen2wheap_shift_up:
   71|  2.04M|                                        igraph_int_t elem) {
   72|  2.04M|    if (elem == 0 || h->cmp(ELEM(h, elem), ELEM(h, PARENT(elem))) < 0) {
  ------------------
  |  |   34|  1.93M|#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.93M|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
  |  Branch (72:9): [True: 105k, False: 1.93M]
  |  Branch (72:22): [True: 338k, False: 1.60M]
  ------------------
   73|       |        /* at the top */
   74|  1.60M|    } else {
   75|  1.60M|        igraph_i_gen2wheap_switch(h, elem, PARENT(elem));
  ------------------
  |  |   30|  1.60M|#define PARENT(x)     (((x)+1)/2-1)
  ------------------
   76|  1.60M|        igraph_i_gen2wheap_shift_up(h, PARENT(elem));
  ------------------
  |  |   30|  1.60M|#define PARENT(x)     (((x)+1)/2-1)
  ------------------
   77|  1.60M|    }
   78|  2.04M|}
genheap.c:igraph_i_gen2wheap_switch:
   53|  2.20M|                                      igraph_int_t e1, igraph_int_t e2) {
   54|  2.20M|    if (e1 != e2) {
  ------------------
  |  Branch (54:9): [True: 2.20M, False: 2.23k]
  ------------------
   55|  2.20M|        igraph_int_t tmp1, tmp2;
   56|       |
   57|  2.20M|        swapfunc(ELEM(h, e1), ELEM(h, e2), h->item_size);
  ------------------
  |  |   34|  2.20M|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
                      swapfunc(ELEM(h, e1), ELEM(h, e2), h->item_size);
  ------------------
  |  |   34|  2.20M|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
   58|       |
   59|  2.20M|        tmp1 = VECTOR(h->index)[e1];
  ------------------
  |  |   60|  2.20M|#define VECTOR(v) ((v).stor_begin)
  ------------------
   60|  2.20M|        tmp2 = VECTOR(h->index)[e2];
  ------------------
  |  |   60|  2.20M|#define VECTOR(v) ((v).stor_begin)
  ------------------
   61|       |
   62|  2.20M|        VECTOR(h->index2)[tmp1] = e2 + 2;
  ------------------
  |  |   60|  2.20M|#define VECTOR(v) ((v).stor_begin)
  ------------------
   63|  2.20M|        VECTOR(h->index2)[tmp2] = e1 + 2;
  ------------------
  |  |   60|  2.20M|#define VECTOR(v) ((v).stor_begin)
  ------------------
   64|       |
   65|  2.20M|        VECTOR(h->index)[e1] = tmp2;
  ------------------
  |  |   60|  2.20M|#define VECTOR(v) ((v).stor_begin)
  ------------------
   66|  2.20M|        VECTOR(h->index)[e2] = tmp1;
  ------------------
  |  |   60|  2.20M|#define VECTOR(v) ((v).stor_begin)
  ------------------
   67|  2.20M|    }
   68|  2.20M|}
genheap.c:swapfunc:
   42|  2.20M|static void swapfunc(char * restrict a, char * restrict b, size_t es) {
   43|  2.20M|    char t;
   44|       |
   45|  35.2M|    do {
   46|  35.2M|        t = *a;
   47|  35.2M|        *a++ = *b;
   48|  35.2M|        *b++ = t;
   49|  35.2M|    } while (--es > 0);
  ------------------
  |  Branch (49:14): [True: 33.0M, False: 2.20M]
  ------------------
   50|  2.20M|}
genheap.c:igraph_i_gen2wheap_sink:
   81|   662k|                                    igraph_int_t head) {
   82|   662k|    igraph_int_t size = igraph_gen2wheap_size(h);
   83|   662k|    if (LEFTCHILD(head) >= size) {
  ------------------
  |  |   31|   662k|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
  |  Branch (83:9): [True: 30.3k, False: 632k]
  ------------------
   84|       |        /* no subtrees */
   85|   632k|    } else if (RIGHTCHILD(head) == size ||
  ------------------
  |  |   32|   632k|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
  |  Branch (85:16): [True: 2.77k, False: 629k]
  ------------------
   86|   629k|               h->cmp(ELEM(h, LEFTCHILD(head)), ELEM(h, RIGHTCHILD(head))) >= 0) {
  ------------------
  |  |   34|   629k|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
                             h->cmp(ELEM(h, LEFTCHILD(head)), ELEM(h, RIGHTCHILD(head))) >= 0) {
  ------------------
  |  |   34|   629k|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
  |  Branch (86:16): [True: 511k, False: 118k]
  ------------------
   87|       |        /* sink to the left if needed */
   88|   514k|        if (h->cmp(ELEM(h, head), ELEM(h, LEFTCHILD(head))) < 0) {
  ------------------
  |  |   34|   514k|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
                      if (h->cmp(ELEM(h, head), ELEM(h, LEFTCHILD(head))) < 0) {
  ------------------
  |  |   34|   514k|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
  |  Branch (88:13): [True: 111k, False: 402k]
  ------------------
   89|   111k|            igraph_i_gen2wheap_switch(h, head, LEFTCHILD(head));
  ------------------
  |  |   31|   111k|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
   90|   111k|            igraph_i_gen2wheap_sink(h, LEFTCHILD(head));
  ------------------
  |  |   31|   111k|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
   91|   111k|        }
   92|   514k|    } else {
   93|       |        /* sink to the right */
   94|   118k|        if (h->cmp(ELEM(h, head), ELEM(h, RIGHTCHILD(head))) < 0) {
  ------------------
  |  |   34|   118k|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
                      if (h->cmp(ELEM(h, head), ELEM(h, RIGHTCHILD(head))) < 0) {
  ------------------
  |  |   34|   118k|#define ELEM(h, x) ((char *) h->data + x * h->item_size)
  ------------------
  |  Branch (94:13): [True: 107k, False: 10.5k]
  ------------------
   95|   107k|            igraph_i_gen2wheap_switch(h, head, RIGHTCHILD(head));
  ------------------
  |  |   32|   107k|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
   96|   107k|            igraph_i_gen2wheap_sink(h, RIGHTCHILD(head));
  ------------------
  |  |   32|   107k|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
   97|   107k|        }
   98|   118k|    }
   99|   662k|}

igraph_2wheap_init:
  800|  2.23k|igraph_error_t igraph_2wheap_init(igraph_2wheap_t *h, igraph_int_t max_size) {
  801|  2.23k|    h->max_size = max_size;
  802|       |    /* We start with the biggest */
  803|  2.23k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&h->index2, max_size);
  ------------------
  |  |  119|  2.23k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.23k|    do { \
  |  |  |  |  657|  2.23k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.23k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.23k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.23k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.23k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.23k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.23k|    do { \
  |  |  |  |  604|  2.23k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.23k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.23k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.23k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.23k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.23k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.23k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.23k]
  |  |  ------------------
  ------------------
  804|  2.23k|    IGRAPH_VECTOR_INIT_FINALLY(&h->data, 0);
  ------------------
  |  |  104|  2.23k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.23k|    do { \
  |  |  |  |  657|  2.23k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.23k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.23k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.23k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.23k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  2.23k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.23k|    do { \
  |  |  |  |  604|  2.23k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.23k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.23k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.23k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.23k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.23k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.23k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 2.23k]
  |  |  ------------------
  ------------------
  805|  2.23k|    IGRAPH_CHECK(igraph_vector_int_init(&h->index, 0));
  ------------------
  |  |  656|  2.23k|    do { \
  |  |  657|  2.23k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.23k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.23k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.23k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.23k]
  |  |  ------------------
  ------------------
  806|       |    /* IGRAPH_FINALLY(igraph_vector_int_destroy, &h->index); */
  807|       |
  808|  2.23k|    IGRAPH_FINALLY_CLEAN(2);
  809|  2.23k|    return IGRAPH_SUCCESS;
  810|  2.23k|}
igraph_2wheap_destroy:
  815|  2.23k|void igraph_2wheap_destroy(igraph_2wheap_t *h) {
  816|  2.23k|    igraph_vector_destroy(&h->data);
  817|  2.23k|    igraph_vector_int_destroy(&h->index);
  818|  2.23k|    igraph_vector_int_destroy(&h->index2);
  819|  2.23k|}
igraph_2wheap_empty:
  833|   386k|igraph_bool_t igraph_2wheap_empty(const igraph_2wheap_t *h) {
  834|   386k|    return igraph_vector_empty(&h->data);
  835|   386k|}
igraph_2wheap_push_with_index:
  844|   384k|                                  igraph_int_t idx, igraph_real_t elem) {
  845|       |
  846|       |    /*   printf("-> %.2g [%li]\n", elem, idx); */
  847|       |
  848|   384k|    igraph_int_t size = igraph_vector_size(&h->data);
  849|       |
  850|   384k|    if (size > IGRAPH_INTEGER_MAX - 2) {
  ------------------
  |  |   72|   384k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (850:9): [True: 0, False: 384k]
  ------------------
  851|       |        /* to allow size+2 below */
  852|      0|        IGRAPH_ERROR("Cannot push to 2wheap, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  853|      0|    }
  854|       |
  855|   384k|    IGRAPH_CHECK(igraph_vector_push_back(&h->data, elem));
  ------------------
  |  |  656|   384k|    do { \
  |  |  657|   384k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   384k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   384k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 384k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   384k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 384k]
  |  |  ------------------
  ------------------
  856|   384k|    IGRAPH_CHECK(igraph_vector_int_push_back(&h->index, idx));
  ------------------
  |  |  656|   384k|    do { \
  |  |  657|   384k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   384k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   384k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 384k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   384k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 384k]
  |  |  ------------------
  ------------------
  857|   384k|    VECTOR(h->index2)[idx] = size + 2;
  ------------------
  |  |   60|   384k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  858|       |
  859|       |    /* maintain heap */
  860|   384k|    igraph_i_2wheap_shift_up(h, size);
  861|   384k|    return IGRAPH_SUCCESS;
  862|   384k|}
igraph_2wheap_size:
  867|   942k|igraph_int_t igraph_2wheap_size(const igraph_2wheap_t *h) {
  868|   942k|    return igraph_vector_size(&h->data);
  869|   942k|}
igraph_2wheap_has_elem:
  899|   163k|igraph_bool_t igraph_2wheap_has_elem(const igraph_2wheap_t *h, igraph_int_t idx) {
  900|   163k|    return (VECTOR(h->index2)[idx] != 0);
  ------------------
  |  |   60|   163k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  901|   163k|}
igraph_2wheap_get:
  914|  67.1k|igraph_real_t igraph_2wheap_get(const igraph_2wheap_t *h, igraph_int_t idx) {
  915|  67.1k|    igraph_int_t i = VECTOR(h->index2)[idx] - 2;
  ------------------
  |  |   60|  67.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  916|  67.1k|    return VECTOR(h->data)[i];
  ------------------
  |  |   60|  67.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  917|  67.1k|}
igraph_2wheap_delete_max_index:
  966|   384k|igraph_real_t igraph_2wheap_delete_max_index(igraph_2wheap_t *h, igraph_int_t *idx) {
  967|       |
  968|   384k|    igraph_real_t tmp = VECTOR(h->data)[0];
  ------------------
  |  |   60|   384k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  969|   384k|    igraph_int_t tmpidx = VECTOR(h->index)[0];
  ------------------
  |  |   60|   384k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  970|   384k|    igraph_i_2wheap_switch(h, 0, igraph_2wheap_size(h) - 1);
  971|   384k|    igraph_vector_pop_back(&h->data);
  972|   384k|    igraph_vector_int_pop_back(&h->index);
  973|   384k|    VECTOR(h->index2)[tmpidx] = 0;
  ------------------
  |  |   60|   384k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  974|   384k|    igraph_i_2wheap_sink(h, 0);
  975|       |
  976|   384k|    if (idx) {
  ------------------
  |  Branch (976:9): [True: 384k, False: 0]
  ------------------
  977|   384k|        *idx = tmpidx;
  978|   384k|    }
  979|   384k|    return tmp;
  980|   384k|}
igraph_2wheap_modify:
  985|  67.1k|void igraph_2wheap_modify(igraph_2wheap_t *h, igraph_int_t idx, igraph_real_t elem) {
  986|       |
  987|  67.1k|    igraph_int_t pos = VECTOR(h->index2)[idx] - 2;
  ------------------
  |  |   60|  67.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  988|       |
  989|       |    /*   printf("-- %.2g -> %.2g\n", VECTOR(h->data)[pos], elem); */
  990|       |
  991|  67.1k|    VECTOR(h->data)[pos] = elem;
  ------------------
  |  |   60|  67.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  992|  67.1k|    igraph_i_2wheap_sink(h, pos);
  993|  67.1k|    igraph_i_2wheap_shift_up(h, pos);
  994|  67.1k|}
indheap.c:igraph_i_2wheap_shift_up:
  762|  2.99M|                                     igraph_int_t elem) {
  763|  2.99M|    if (elem == 0 || VECTOR(h->data)[elem] < VECTOR(h->data)[PARENT(elem)]) {
  ------------------
  |  |   60|  2.54M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                  if (elem == 0 || VECTOR(h->data)[elem] < VECTOR(h->data)[PARENT(elem)]) {
  ------------------
  |  |   60|  2.54M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                  if (elem == 0 || VECTOR(h->data)[elem] < VECTOR(h->data)[PARENT(elem)]) {
  ------------------
  |  |  733|  2.54M|#define PARENT(x)     (((x)+1)/2-1)
  ------------------
  |  Branch (763:9): [True: 444k, False: 2.54M]
  |  Branch (763:22): [True: 7.47k, False: 2.54M]
  ------------------
  764|       |        /* at the top */
  765|  2.54M|    } else {
  766|  2.54M|        igraph_i_2wheap_switch(h, elem, PARENT(elem));
  ------------------
  |  |  733|  2.54M|#define PARENT(x)     (((x)+1)/2-1)
  ------------------
  767|  2.54M|        igraph_i_2wheap_shift_up(h, PARENT(elem));
  ------------------
  |  |  733|  2.54M|#define PARENT(x)     (((x)+1)/2-1)
  ------------------
  768|  2.54M|    }
  769|  2.99M|}
indheap.c:igraph_i_2wheap_switch:
  743|  3.03M|                                   igraph_int_t e1, igraph_int_t e2) {
  744|  3.03M|    if (e1 != e2) {
  ------------------
  |  Branch (744:9): [True: 3.03M, False: 2.23k]
  ------------------
  745|  3.03M|        igraph_int_t tmp1, tmp2;
  746|  3.03M|        igraph_real_t tmp3 = VECTOR(h->data)[e1];
  ------------------
  |  |   60|  3.03M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  747|  3.03M|        VECTOR(h->data)[e1] = VECTOR(h->data)[e2];
  ------------------
  |  |   60|  3.03M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(h->data)[e1] = VECTOR(h->data)[e2];
  ------------------
  |  |   60|  3.03M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  748|  3.03M|        VECTOR(h->data)[e2] = tmp3;
  ------------------
  |  |   60|  3.03M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  749|       |
  750|  3.03M|        tmp1 = VECTOR(h->index)[e1];
  ------------------
  |  |   60|  3.03M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  751|  3.03M|        tmp2 = VECTOR(h->index)[e2];
  ------------------
  |  |   60|  3.03M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  752|       |
  753|  3.03M|        VECTOR(h->index2)[tmp1] = e2 + 2;
  ------------------
  |  |   60|  3.03M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  754|  3.03M|        VECTOR(h->index2)[tmp2] = e1 + 2;
  ------------------
  |  |   60|  3.03M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  755|       |
  756|  3.03M|        VECTOR(h->index)[e1] = tmp2;
  ------------------
  |  |   60|  3.03M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  757|  3.03M|        VECTOR(h->index)[e2] = tmp1;
  ------------------
  |  |   60|  3.03M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  758|  3.03M|    }
  759|  3.03M|}
indheap.c:igraph_i_2wheap_sink:
  772|   557k|                                 igraph_int_t head) {
  773|   557k|    igraph_int_t size = igraph_2wheap_size(h);
  774|   557k|    if (LEFTCHILD(head) >= size) {
  ------------------
  |  |  734|   557k|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
  |  Branch (774:9): [True: 41.6k, False: 515k]
  ------------------
  775|       |        /* no subtrees */
  776|   515k|    } else if (RIGHTCHILD(head) == size ||
  ------------------
  |  |  735|   515k|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
  |  Branch (776:16): [True: 3.56k, False: 512k]
  ------------------
  777|   512k|               VECTOR(h->data)[LEFTCHILD(head)] >= VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |   60|   512k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                             VECTOR(h->data)[LEFTCHILD(head)] >= VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |  734|   512k|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
                             VECTOR(h->data)[LEFTCHILD(head)] >= VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |   60|   512k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                             VECTOR(h->data)[LEFTCHILD(head)] >= VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |  735|   512k|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
  |  Branch (777:16): [True: 459k, False: 52.7k]
  ------------------
  778|       |        /* sink to the left if needed */
  779|   463k|        if (VECTOR(h->data)[head] < VECTOR(h->data)[LEFTCHILD(head)]) {
  ------------------
  |  |   60|   463k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (VECTOR(h->data)[head] < VECTOR(h->data)[LEFTCHILD(head)]) {
  ------------------
  |  |   60|   463k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (VECTOR(h->data)[head] < VECTOR(h->data)[LEFTCHILD(head)]) {
  ------------------
  |  |  734|   463k|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
  |  Branch (779:13): [True: 56.5k, False: 406k]
  ------------------
  780|  56.5k|            igraph_i_2wheap_switch(h, head, LEFTCHILD(head));
  ------------------
  |  |  734|  56.5k|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
  781|  56.5k|            igraph_i_2wheap_sink(h, LEFTCHILD(head));
  ------------------
  |  |  734|  56.5k|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
  782|  56.5k|        }
  783|   463k|    } else {
  784|       |        /* sink to the right */
  785|  52.7k|        if (VECTOR(h->data)[head] < VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |   60|  52.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (VECTOR(h->data)[head] < VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |   60|  52.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (VECTOR(h->data)[head] < VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |  735|  52.7k|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
  |  Branch (785:13): [True: 49.2k, False: 3.51k]
  ------------------
  786|  49.2k|            igraph_i_2wheap_switch(h, head, RIGHTCHILD(head));
  ------------------
  |  |  735|  49.2k|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
  787|  49.2k|            igraph_i_2wheap_sink(h, RIGHTCHILD(head));
  ------------------
  |  |  735|  49.2k|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
  788|  49.2k|        }
  789|  52.7k|    }
  790|   557k|}

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

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

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

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

igraph_vector_int_list_init:
  109|  9.03k|igraph_error_t FUNCTION(init)(TYPE *v, igraph_int_t size) {
  110|  9.03k|    igraph_int_t alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (110:31): [True: 0, False: 9.03k]
  ------------------
  111|  9.03k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  9.03k|    do { \
  |  |  925|  9.03k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  9.03k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.03k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  9.03k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 9.03k]
  |  |  ------------------
  ------------------
  112|  9.03k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, ITEM_TYPE);
  ------------------
  |  |   33|  9.03k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  18.0k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 9.03k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 9.03k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 9.03k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  113|  9.03k|    if (v->stor_begin == 0) {
  ------------------
  |  Branch (113:9): [True: 0, False: 9.03k]
  ------------------
  114|      0|        IGRAPH_ERROR("Cannot initialize list.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  115|      0|    }
  116|  9.03k|    v->stor_end = v->stor_begin + alloc_size;
  117|  9.03k|    v->end = v->stor_begin + size;
  118|       |
  119|  9.03k|    IGRAPH_CHECK(INTERNAL_FUNCTION(init_slice)(v, v->stor_begin, v->end));
  ------------------
  |  |  656|  9.03k|    do { \
  |  |  657|  9.03k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  9.03k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  9.03k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.03k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  9.03k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 9.03k]
  |  |  ------------------
  ------------------
  120|       |
  121|  9.03k|    return IGRAPH_SUCCESS;
  122|  9.03k|}
igraph_vector_int_list_destroy:
  176|  9.03k|void FUNCTION(destroy)(TYPE *v) {
  177|  9.03k|    IGRAPH_ASSERT(v != 0);
  ------------------
  |  |  924|  9.03k|    do { \
  |  |  925|  9.03k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  9.03k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.03k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  9.03k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 9.03k]
  |  |  ------------------
  ------------------
  178|       |
  179|  9.03k|    if (v->stor_begin != 0) {
  ------------------
  |  Branch (179:9): [True: 9.03k, False: 0]
  ------------------
  180|  9.03k|        FUNCTION(clear)(v);
  ------------------
  |  |  136|  9.03k|        #define FUNCTION(c) CONCAT4(igraph_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  9.03k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  9.03k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  181|  9.03k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  9.03k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  182|       |        v->stor_begin = NULL;
  183|  9.03k|    }
  184|  9.03k|}
igraph_vector_int_list_capacity:
  203|  26.5k|igraph_int_t FUNCTION(capacity)(const TYPE *v) {
  204|  26.5k|    return v->stor_end - v->stor_begin;
  205|  26.5k|}
igraph_vector_int_list_reserve:
  233|  26.5k|igraph_error_t FUNCTION(reserve)(TYPE *v, igraph_int_t capacity) {
  234|  26.5k|    igraph_int_t current_capacity;
  235|  26.5k|    ITEM_TYPE *tmp;
  ------------------
  |  |   31|  26.5k|    #define ITEM_TYPE BASE_VECTOR
  |  |  ------------------
  |  |  |  |   67|  26.5k|    #define BASE_VECTOR igraph_vector_int_t
  |  |  ------------------
  ------------------
  236|       |
  237|  26.5k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  26.5k|    do { \
  |  |  925|  26.5k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  26.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 26.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  26.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 26.5k]
  |  |  ------------------
  ------------------
  238|  26.5k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  26.5k|    do { \
  |  |  925|  26.5k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  26.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 26.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  26.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 26.5k]
  |  |  ------------------
  ------------------
  239|  26.5k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  26.5k|    do { \
  |  |  925|  26.5k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  26.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 26.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  26.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 26.5k]
  |  |  ------------------
  ------------------
  240|       |
  241|  26.5k|    current_capacity = FUNCTION(capacity)(v);
  ------------------
  |  |  136|  26.5k|        #define FUNCTION(c) CONCAT4(igraph_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  26.5k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  26.5k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  242|       |
  243|  26.5k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (243:9): [True: 322, False: 26.1k]
  ------------------
  244|    322|        return IGRAPH_SUCCESS;
  245|    322|    }
  246|       |
  247|  26.1k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, ITEM_TYPE);
  ------------------
  |  |   35|  26.1k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|  52.3k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 26.1k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 26.1k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 26.1k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  248|  26.1k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for list.");
  ------------------
  |  |  709|  26.1k|    do { \
  |  |  710|  26.1k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  26.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 26.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  26.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 26.1k]
  |  |  ------------------
  ------------------
  249|       |
  250|  26.1k|    v->end = tmp + (v->end - v->stor_begin);
  251|  26.1k|    v->stor_begin = tmp;
  252|  26.1k|    v->stor_end = v->stor_begin + capacity;
  253|       |
  254|  26.1k|    return IGRAPH_SUCCESS;
  255|  26.1k|}
igraph_vector_int_list_size:
  287|  26.5k|igraph_int_t FUNCTION(size)(const TYPE *v) {
  288|  26.5k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  26.5k|    do { \
  |  |  925|  26.5k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  26.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 26.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  26.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 26.5k]
  |  |  ------------------
  ------------------
  289|  26.5k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  26.5k|    do { \
  |  |  925|  26.5k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  26.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 26.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  26.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 26.5k]
  |  |  ------------------
  ------------------
  290|  26.5k|    return v->end - v->stor_begin;
  291|  26.5k|}
igraph_vector_int_list_resize:
  324|  4.51k|igraph_error_t FUNCTION(resize)(TYPE *v, igraph_int_t new_size) {
  325|  4.51k|    igraph_int_t old_size;
  326|       |
  327|  4.51k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  4.51k|    do { \
  |  |  925|  4.51k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.51k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.51k]
  |  |  ------------------
  ------------------
  328|  4.51k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  4.51k|    do { \
  |  |  925|  4.51k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.51k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.51k]
  |  |  ------------------
  ------------------
  329|       |
  330|  4.51k|    IGRAPH_CHECK(FUNCTION(reserve)(v, new_size));
  ------------------
  |  |  656|  4.51k|    do { \
  |  |  657|  4.51k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.51k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.51k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.51k]
  |  |  ------------------
  ------------------
  331|       |
  332|  4.51k|    old_size = FUNCTION(size)(v);
  ------------------
  |  |  136|  4.51k|        #define FUNCTION(c) CONCAT4(igraph_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  4.51k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  4.51k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  333|       |
  334|  4.51k|    if (old_size < new_size) {
  ------------------
  |  Branch (334:9): [True: 4.51k, False: 0]
  ------------------
  335|  4.51k|        IGRAPH_CHECK(INTERNAL_FUNCTION(init_slice)(v, v->stor_begin + old_size, v->stor_begin + new_size));
  ------------------
  |  |  656|  4.51k|    do { \
  |  |  657|  4.51k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.51k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.51k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.51k]
  |  |  ------------------
  ------------------
  336|  4.51k|    } else if (old_size > new_size) {
  ------------------
  |  Branch (336:16): [True: 0, False: 0]
  ------------------
  337|      0|        INTERNAL_FUNCTION(destroy_slice)(v, v->stor_begin + new_size, v->stor_begin + old_size);
  ------------------
  |  |  137|      0|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|      0|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  338|      0|    }
  339|       |
  340|  4.51k|    v->end = v->stor_begin + new_size;
  341|       |
  342|  4.51k|    return IGRAPH_SUCCESS;
  343|  4.51k|}
igraph_vector_int_list_clear:
  357|  18.0k|void FUNCTION(clear)(TYPE *v) {
  358|  18.0k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  18.0k|    do { \
  |  |  925|  18.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  18.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 18.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  18.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 18.0k]
  |  |  ------------------
  ------------------
  359|  18.0k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  18.0k|    do { \
  |  |  925|  18.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  18.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 18.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  18.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 18.0k]
  |  |  ------------------
  ------------------
  360|  18.0k|    INTERNAL_FUNCTION(destroy_slice)(v, v->stor_begin, v->end);
  ------------------
  |  |  137|  18.0k|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  18.0k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  18.0k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  361|  18.0k|    v->end = v->stor_begin;
  362|  18.0k|}
igraph_vector_int_list_get_ptr:
  377|  5.27M|ITEM_TYPE *FUNCTION(get_ptr)(const TYPE *v, igraph_int_t pos) {
  378|  5.27M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  5.27M|    do { \
  |  |  925|  5.27M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  5.27M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.27M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  5.27M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 5.27M]
  |  |  ------------------
  ------------------
  379|  5.27M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  5.27M|    do { \
  |  |  925|  5.27M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  5.27M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.27M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  5.27M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 5.27M]
  |  |  ------------------
  ------------------
  380|  5.27M|    return v->stor_begin + pos;
  381|  5.27M|}
igraph_vector_int_list_push_back_new:
  640|  4.55M|igraph_error_t FUNCTION(push_back_new)(TYPE *v, ITEM_TYPE** e) {
  641|  4.55M|    IGRAPH_CHECK(INTERNAL_FUNCTION(expand_if_full)(v));
  ------------------
  |  |  656|  4.55M|    do { \
  |  |  657|  4.55M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.55M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.55M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.55M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.55M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.55M]
  |  |  ------------------
  ------------------
  642|  4.55M|    IGRAPH_CHECK(INTERNAL_FUNCTION(init_item)(v, v->end));
  ------------------
  |  |  656|  4.55M|    do { \
  |  |  657|  4.55M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.55M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.55M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.55M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.55M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.55M]
  |  |  ------------------
  ------------------
  643|  4.55M|    if (e) {
  ------------------
  |  Branch (643:9): [True: 4.55M, False: 0]
  ------------------
  644|  4.55M|        *e = v->end;
  645|  4.55M|    }
  646|  4.55M|    v->end += 1;
  647|  4.55M|    return IGRAPH_SUCCESS;
  648|  4.55M|}
vector_list.c:igraph_i_vector_int_list_init_item:
 1051|  5.23M|static igraph_error_t INTERNAL_FUNCTION(init_item)(const TYPE *list, ITEM_TYPE *item) {
 1052|  5.23M|    IGRAPH_UNUSED(list);
  ------------------
  |  |   30|  5.23M|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
 1053|  5.23M|    return ITEM_FUNCTION(init)(item, 0);
  ------------------
  |  |   42|  5.23M|        #define ITEM_FUNCTION(f) CONCAT3(igraph_vector,SHORT,f)
  |  |  ------------------
  |  |  |  |   22|  5.23M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  5.23M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1054|  5.23M|}
vector_list.c:igraph_i_vector_int_list_destroy_item:
 1060|  5.23M|static void INTERNAL_FUNCTION(destroy_item)(ITEM_TYPE *item) {
 1061|  5.23M|    ITEM_FUNCTION(destroy)(item);
  ------------------
  |  |   42|  5.23M|        #define ITEM_FUNCTION(f) CONCAT3(igraph_vector,SHORT,f)
  |  |  ------------------
  |  |  |  |   22|  5.23M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  5.23M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1062|  5.23M|}
vector_list.c:igraph_i_vector_int_list_init_slice:
 1068|  13.5k|static igraph_error_t INTERNAL_FUNCTION(init_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1069|  13.5k|    ITEM_TYPE *current;
  ------------------
  |  |   31|  13.5k|    #define ITEM_TYPE BASE_VECTOR
  |  |  ------------------
  |  |  |  |   67|  13.5k|    #define BASE_VECTOR igraph_vector_int_t
  |  |  ------------------
  ------------------
 1070|  13.5k|    igraph_error_t retval;
 1071|       |
 1072|   696k|    for (current = start; current < end; current++) {
  ------------------
  |  Branch (1072:27): [True: 683k, False: 13.5k]
  ------------------
 1073|   683k|        retval = INTERNAL_FUNCTION(init_item)(list, current);
  ------------------
  |  |  137|   683k|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|   683k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|   683k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1074|   683k|        if (retval) {
  ------------------
  |  Branch (1074:13): [True: 0, False: 683k]
  ------------------
 1075|      0|            INTERNAL_FUNCTION(destroy_slice)(list, start, current);
  ------------------
  |  |  137|      0|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|      0|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1076|      0|            IGRAPH_CHECK(retval);
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1077|      0|        }
 1078|   683k|    }
 1079|       |
 1080|  13.5k|    return IGRAPH_SUCCESS;
 1081|  13.5k|}
vector_list.c:igraph_i_vector_int_list_destroy_slice:
 1083|  18.0k|static void INTERNAL_FUNCTION(destroy_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1084|  18.0k|    IGRAPH_UNUSED(list);
  ------------------
  |  |   30|  18.0k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
 1085|  5.25M|    for (; start < end; start++) {
  ------------------
  |  Branch (1085:12): [True: 5.23M, False: 18.0k]
  ------------------
 1086|  5.23M|        INTERNAL_FUNCTION(destroy_item)(start);
  ------------------
  |  |  137|  5.23M|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  5.23M|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  5.23M|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1087|  5.23M|    }
 1088|  18.0k|}
vector_list.c:igraph_i_vector_int_list_expand_if_full:
 1094|  4.55M|static igraph_error_t INTERNAL_FUNCTION(expand_if_full)(TYPE *v) {
 1095|  4.55M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  4.55M|    do { \
  |  |  925|  4.55M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.55M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.55M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.55M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.55M]
  |  |  ------------------
  ------------------
 1096|  4.55M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  4.55M|    do { \
  |  |  925|  4.55M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.55M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.55M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.55M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.55M]
  |  |  ------------------
  ------------------
 1097|       |
 1098|  4.55M|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (1098:9): [True: 22.0k, False: 4.53M]
  ------------------
 1099|  22.0k|        igraph_int_t old_size = FUNCTION(size)(v);
  ------------------
  |  |  136|  22.0k|        #define FUNCTION(c) CONCAT4(igraph_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  22.0k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  22.0k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1100|  22.0k|        igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|  22.0k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|  22.0k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (1100:33): [True: 22.0k, False: 0]
  ------------------
 1101|  22.0k|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   72|  22.0k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (1101:13): [True: 0, False: 22.0k]
  ------------------
 1102|      0|            IGRAPH_ERROR("Cannot add new item to list, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1103|      0|        }
 1104|  22.0k|        if (new_size == 0) {
  ------------------
  |  Branch (1104:13): [True: 0, False: 22.0k]
  ------------------
 1105|      0|            new_size = 1;
 1106|      0|        }
 1107|  22.0k|        IGRAPH_CHECK(FUNCTION(reserve)(v, new_size));
  ------------------
  |  |  656|  22.0k|    do { \
  |  |  657|  22.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  22.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  22.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 22.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  22.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
 1108|  22.0k|    }
 1109|       |
 1110|  4.55M|    return IGRAPH_SUCCESS;
 1111|  4.55M|}
igraph_graph_list_init:
  109|  2.25k|igraph_error_t FUNCTION(init)(TYPE *v, igraph_int_t size) {
  110|  2.25k|    igraph_int_t alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (110:31): [True: 0, False: 2.25k]
  ------------------
  111|  2.25k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  2.25k|    do { \
  |  |  925|  2.25k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  112|  2.25k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, ITEM_TYPE);
  ------------------
  |  |   33|  2.25k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.51k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.25k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.25k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.25k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  113|  2.25k|    if (v->stor_begin == 0) {
  ------------------
  |  Branch (113:9): [True: 0, False: 2.25k]
  ------------------
  114|      0|        IGRAPH_ERROR("Cannot initialize list.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  115|      0|    }
  116|  2.25k|    v->stor_end = v->stor_begin + alloc_size;
  117|  2.25k|    v->end = v->stor_begin + size;
  118|       |
  119|  2.25k|    IGRAPH_CHECK(INTERNAL_FUNCTION(init_slice)(v, v->stor_begin, v->end));
  ------------------
  |  |  656|  2.25k|    do { \
  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  120|       |
  121|  2.25k|    return IGRAPH_SUCCESS;
  122|  2.25k|}
igraph_graph_list_destroy:
  176|  2.25k|void FUNCTION(destroy)(TYPE *v) {
  177|  2.25k|    IGRAPH_ASSERT(v != 0);
  ------------------
  |  |  924|  2.25k|    do { \
  |  |  925|  2.25k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  178|       |
  179|  2.25k|    if (v->stor_begin != 0) {
  ------------------
  |  Branch (179:9): [True: 2.25k, False: 0]
  ------------------
  180|  2.25k|        FUNCTION(clear)(v);
  ------------------
  |  |  157|  2.25k|    #define FUNCTION(c) CONCAT2x(igraph_graph_list,c)
  |  |  ------------------
  |  |  |  |   19|  2.25k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  181|  2.25k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  2.25k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  182|       |        v->stor_begin = NULL;
  183|  2.25k|    }
  184|  2.25k|}
igraph_graph_list_capacity:
  203|    311|igraph_int_t FUNCTION(capacity)(const TYPE *v) {
  204|    311|    return v->stor_end - v->stor_begin;
  205|    311|}
igraph_graph_list_reserve:
  233|    311|igraph_error_t FUNCTION(reserve)(TYPE *v, igraph_int_t capacity) {
  234|    311|    igraph_int_t current_capacity;
  235|    311|    ITEM_TYPE *tmp;
  ------------------
  |  |   61|    311|    #define ITEM_TYPE BASE
  |  |  ------------------
  |  |  |  |  112|    311|    #define BASE igraph_t
  |  |  ------------------
  ------------------
  236|       |
  237|    311|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|    311|    do { \
  |  |  925|    311|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    311|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 311]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    311|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 311]
  |  |  ------------------
  ------------------
  238|    311|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|    311|    do { \
  |  |  925|    311|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    311|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 311]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    311|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 311]
  |  |  ------------------
  ------------------
  239|    311|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|    311|    do { \
  |  |  925|    311|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    311|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 311]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    311|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 311]
  |  |  ------------------
  ------------------
  240|       |
  241|    311|    current_capacity = FUNCTION(capacity)(v);
  ------------------
  |  |  157|    311|    #define FUNCTION(c) CONCAT2x(igraph_graph_list,c)
  |  |  ------------------
  |  |  |  |   19|    311|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  242|       |
  243|    311|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (243:9): [True: 0, False: 311]
  ------------------
  244|      0|        return IGRAPH_SUCCESS;
  245|      0|    }
  246|       |
  247|    311|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, ITEM_TYPE);
  ------------------
  |  |   35|    311|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|    622|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 311, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 311, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 311, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  248|    311|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for list.");
  ------------------
  |  |  709|    311|    do { \
  |  |  710|    311|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|    311|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 311]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|    311|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 311]
  |  |  ------------------
  ------------------
  249|       |
  250|    311|    v->end = tmp + (v->end - v->stor_begin);
  251|    311|    v->stor_begin = tmp;
  252|    311|    v->stor_end = v->stor_begin + capacity;
  253|       |
  254|    311|    return IGRAPH_SUCCESS;
  255|    311|}
igraph_graph_list_size:
  287|    311|igraph_int_t FUNCTION(size)(const TYPE *v) {
  288|    311|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|    311|    do { \
  |  |  925|    311|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    311|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 311]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    311|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 311]
  |  |  ------------------
  ------------------
  289|    311|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|    311|    do { \
  |  |  925|    311|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    311|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 311]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    311|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 311]
  |  |  ------------------
  ------------------
  290|    311|    return v->end - v->stor_begin;
  291|    311|}
igraph_graph_list_clear:
  357|  4.51k|void FUNCTION(clear)(TYPE *v) {
  358|  4.51k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  4.51k|    do { \
  |  |  925|  4.51k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.51k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.51k]
  |  |  ------------------
  ------------------
  359|  4.51k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  4.51k|    do { \
  |  |  925|  4.51k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.51k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.51k]
  |  |  ------------------
  ------------------
  360|  4.51k|    INTERNAL_FUNCTION(destroy_slice)(v, v->stor_begin, v->end);
  ------------------
  |  |  158|  4.51k|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_graph_list,c)
  |  |  ------------------
  |  |  |  |   19|  4.51k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  361|  4.51k|    v->end = v->stor_begin;
  362|  4.51k|}
igraph_graph_list_push_back:
  587|  2.27k|igraph_error_t FUNCTION(push_back)(TYPE *v, ITEM_TYPE *e) {
  588|  2.27k|    IGRAPH_CHECK(INTERNAL_FUNCTION(expand_if_full)(v));
  ------------------
  |  |  656|  2.27k|    do { \
  |  |  657|  2.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.27k]
  |  |  ------------------
  ------------------
  589|  2.27k|    *(v->end) = *e;
  590|  2.27k|    v->end += 1;
  591|  2.27k|    return IGRAPH_SUCCESS;
  592|  2.27k|}
graph_list.c:igraph_i_graph_list_init_slice:
 1068|  2.25k|static igraph_error_t INTERNAL_FUNCTION(init_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1069|  2.25k|    ITEM_TYPE *current;
  ------------------
  |  |   61|  2.25k|    #define ITEM_TYPE BASE
  |  |  ------------------
  |  |  |  |  112|  2.25k|    #define BASE igraph_t
  |  |  ------------------
  ------------------
 1070|  2.25k|    igraph_error_t retval;
 1071|       |
 1072|  2.25k|    for (current = start; current < end; current++) {
  ------------------
  |  Branch (1072:27): [True: 0, False: 2.25k]
  ------------------
 1073|      0|        retval = INTERNAL_FUNCTION(init_item)(list, current);
  ------------------
  |  |  158|      0|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_graph_list,c)
  |  |  ------------------
  |  |  |  |   19|      0|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1074|      0|        if (retval) {
  ------------------
  |  Branch (1074:13): [True: 0, False: 0]
  ------------------
 1075|      0|            INTERNAL_FUNCTION(destroy_slice)(list, start, current);
  ------------------
  |  |  158|      0|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_graph_list,c)
  |  |  ------------------
  |  |  |  |   19|      0|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1076|      0|            IGRAPH_CHECK(retval);
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1077|      0|        }
 1078|      0|    }
 1079|       |
 1080|  2.25k|    return IGRAPH_SUCCESS;
 1081|  2.25k|}
graph_list.c:igraph_i_graph_list_destroy_slice:
 1083|  4.51k|static void INTERNAL_FUNCTION(destroy_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1084|  4.51k|    IGRAPH_UNUSED(list);
  ------------------
  |  |   30|  4.51k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
 1085|  6.78k|    for (; start < end; start++) {
  ------------------
  |  Branch (1085:12): [True: 2.27k, False: 4.51k]
  ------------------
 1086|  2.27k|        INTERNAL_FUNCTION(destroy_item)(start);
  ------------------
  |  |  158|  2.27k|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_graph_list,c)
  |  |  ------------------
  |  |  |  |   19|  2.27k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1087|  2.27k|    }
 1088|  4.51k|}
graph_list.c:igraph_i_graph_list_expand_if_full:
 1094|  2.27k|static igraph_error_t INTERNAL_FUNCTION(expand_if_full)(TYPE *v) {
 1095|  2.27k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  2.27k|    do { \
  |  |  925|  2.27k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.27k]
  |  |  ------------------
  ------------------
 1096|  2.27k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  2.27k|    do { \
  |  |  925|  2.27k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.27k]
  |  |  ------------------
  ------------------
 1097|       |
 1098|  2.27k|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (1098:9): [True: 311, False: 1.96k]
  ------------------
 1099|    311|        igraph_int_t old_size = FUNCTION(size)(v);
  ------------------
  |  |  157|    311|    #define FUNCTION(c) CONCAT2x(igraph_graph_list,c)
  |  |  ------------------
  |  |  |  |   19|    311|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1100|    311|        igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|    311|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|    311|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (1100:33): [True: 311, False: 0]
  ------------------
 1101|    311|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   72|    311|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (1101:13): [True: 0, False: 311]
  ------------------
 1102|      0|            IGRAPH_ERROR("Cannot add new item to list, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1103|      0|        }
 1104|    311|        if (new_size == 0) {
  ------------------
  |  Branch (1104:13): [True: 0, False: 311]
  ------------------
 1105|      0|            new_size = 1;
 1106|      0|        }
 1107|    311|        IGRAPH_CHECK(FUNCTION(reserve)(v, new_size));
  ------------------
  |  |  656|    311|    do { \
  |  |  657|    311|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    311|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    311|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 311]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    311|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 311]
  |  |  ------------------
  ------------------
 1108|    311|    }
 1109|       |
 1110|  2.27k|    return IGRAPH_SUCCESS;
 1111|  2.27k|}

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

igraph_vector_init:
  134|  9.01k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  9.01k|    igraph_int_t alloc_size;
  136|  9.01k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  9.01k|    do { \
  |  |  925|  9.01k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  9.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  9.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 9.01k]
  |  |  ------------------
  ------------------
  137|  9.01k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 4.51k, False: 4.49k]
  ------------------
  138|       |
  139|       |    /* When this function fails, it should leave stor_begin set to NULL,
  140|       |     * so that vector_destroy() is still safe to call on the vector.
  141|       |     * This simplifies freeing partially initialized data structures,
  142|       |     * such as adjacency lists, when an error occurs mid-initialization. */
  143|  9.01k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  9.01k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  18.0k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 9.01k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 9.01k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 9.01k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  9.01k|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  9.01k|    do { \
  |  |  710|  9.01k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  9.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  9.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 9.01k]
  |  |  ------------------
  ------------------
  145|  9.01k|    v->stor_end = v->stor_begin + alloc_size;
  146|  9.01k|    v->end = v->stor_begin + size;
  147|       |
  148|  9.01k|    return IGRAPH_SUCCESS;
  149|  9.01k|}
igraph_vector_destroy:
  408|  9.01k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  9.01k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  9.01k|    do { \
  |  |  925|  9.01k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  9.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  9.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 9.01k]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  9.01k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 9.01k, False: 0]
  ------------------
  413|  9.01k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  9.01k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  9.01k|    }
  416|  9.01k|}
igraph_vector_capacity:
  436|  24.8k|igraph_int_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  437|  24.8k|    return v->stor_end - v->stor_begin;
  438|  24.8k|}
igraph_vector_reserve:
  468|  24.8k|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_int_t capacity) {
  469|  24.8k|    igraph_int_t current_capacity;
  470|  24.8k|    BASE *tmp;
  ------------------
  |  |   29|  24.8k|    #define BASE igraph_real_t
  ------------------
  471|       |
  472|  24.8k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  24.8k|    do { \
  |  |  925|  24.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  24.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 24.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  24.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 24.8k]
  |  |  ------------------
  ------------------
  473|  24.8k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  24.8k|    do { \
  |  |  925|  24.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  24.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 24.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  24.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 24.8k]
  |  |  ------------------
  ------------------
  474|  24.8k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  24.8k|    do { \
  |  |  925|  24.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  24.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 24.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  24.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 24.8k]
  |  |  ------------------
  ------------------
  475|       |
  476|  24.8k|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  170|  24.8k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  24.8k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  24.8k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|       |
  478|  24.8k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (478:9): [True: 7.48k, False: 17.4k]
  ------------------
  479|  7.48k|        return IGRAPH_SUCCESS;
  480|  7.48k|    }
  481|       |
  482|  17.4k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   35|  17.4k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|  34.8k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 17.4k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 17.4k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 17.4k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|  17.4k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  709|  17.4k|    do { \
  |  |  710|  17.4k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  17.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 17.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  17.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 17.4k]
  |  |  ------------------
  ------------------
  484|       |
  485|  17.4k|    v->end = tmp + (v->end - v->stor_begin);
  486|  17.4k|    v->stor_begin = tmp;
  487|  17.4k|    v->stor_end = v->stor_begin + capacity;
  488|       |
  489|  17.4k|    return IGRAPH_SUCCESS;
  490|  17.4k|}
igraph_vector_empty:
  503|   386k|igraph_bool_t FUNCTION(igraph_vector, empty)(const TYPE(igraph_vector) *v) {
  504|   386k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   386k|    do { \
  |  |  925|   386k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   386k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 386k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   386k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 386k]
  |  |  ------------------
  ------------------
  505|   386k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   386k|    do { \
  |  |  925|   386k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   386k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 386k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   386k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 386k]
  |  |  ------------------
  ------------------
  506|   386k|    return v->stor_begin == v->end;
  507|   386k|}
igraph_vector_size:
  522|  1.34M|igraph_int_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  523|  1.34M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.34M|    do { \
  |  |  925|  1.34M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.34M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.34M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.34M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.34M]
  |  |  ------------------
  ------------------
  524|  1.34M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  1.34M|    do { \
  |  |  925|  1.34M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.34M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.34M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.34M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.34M]
  |  |  ------------------
  ------------------
  525|  1.34M|    return v->end - v->stor_begin;
  526|  1.34M|}
igraph_vector_push_back:
  573|   384k|igraph_error_t FUNCTION(igraph_vector, push_back)(TYPE(igraph_vector) *v, BASE e) {
  574|   384k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   384k|    do { \
  |  |  925|   384k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   384k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 384k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   384k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 384k]
  |  |  ------------------
  ------------------
  575|   384k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   384k|    do { \
  |  |  925|   384k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   384k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 384k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   384k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 384k]
  |  |  ------------------
  ------------------
  576|       |
  577|   384k|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (577:9): [True: 15.1k, False: 369k]
  ------------------
  578|       |        /* full, allocate more storage */
  579|  15.1k|        igraph_int_t old_size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  170|  15.1k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  15.1k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  15.1k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  580|  15.1k|        igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|  15.1k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|  15.1k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (580:33): [True: 15.1k, False: 0]
  ------------------
  581|  15.1k|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   72|  15.1k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (581:13): [True: 0, False: 15.1k]
  ------------------
  582|      0|            IGRAPH_ERROR("Cannot push to vector, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  583|      0|        }
  584|  15.1k|        if (new_size == 0) {
  ------------------
  |  Branch (584:13): [True: 0, False: 15.1k]
  ------------------
  585|      0|            new_size = 1;
  586|      0|        }
  587|  15.1k|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  15.1k|    do { \
  |  |  657|  15.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  15.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  15.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  15.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  588|  15.1k|    }
  589|       |
  590|   384k|    *(v->end) = e;
  591|   384k|    v->end += 1;
  592|       |
  593|   384k|    return IGRAPH_SUCCESS;
  594|   384k|}
igraph_vector_fill:
  745|  7.46k|void FUNCTION(igraph_vector, fill)(TYPE(igraph_vector) *v, BASE e) {
  746|  7.46k|    BASE *ptr;
  ------------------
  |  |   29|  7.46k|    #define BASE igraph_real_t
  ------------------
  747|  7.46k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  7.46k|    do { \
  |  |  925|  7.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  7.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  7.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 7.46k]
  |  |  ------------------
  ------------------
  748|  7.46k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  7.46k|    do { \
  |  |  925|  7.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  7.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  7.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 7.46k]
  |  |  ------------------
  ------------------
  749|       |
  750|       |    /* Optimize the commonly used integer case when filling with 0
  751|       |     * or -1, which are an all-0 and all-1 bit pattern that the
  752|       |     * compiler can generate higher efficiency code for. */
  753|       |#if defined(BASE_INT)
  754|       |    if (e == 0) {
  755|       |        FUNCTION(igraph_vector, null)(v);
  756|       |        return;
  757|       |    }
  758|       |    if (e == -1) {
  759|       |        for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  760|       |            *ptr = -1;
  761|       |        }
  762|       |        return;
  763|       |    }
  764|       |#endif
  765|       |
  766|   399k|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (766:31): [True: 392k, False: 7.46k]
  ------------------
  767|   392k|        *ptr = e;
  768|   392k|    }
  769|  7.46k|}
igraph_vector_pop_back:
  838|   384k|BASE FUNCTION(igraph_vector, pop_back)(TYPE(igraph_vector) *v) {
  839|   384k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   384k|    do { \
  |  |  925|   384k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   384k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 384k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   384k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 384k]
  |  |  ------------------
  ------------------
  840|   384k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   384k|    do { \
  |  |  925|   384k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   384k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 384k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   384k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 384k]
  |  |  ------------------
  ------------------
  841|   384k|    IGRAPH_ASSERT(v->end != NULL);
  ------------------
  |  |  924|   384k|    do { \
  |  |  925|   384k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   384k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 384k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   384k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 384k]
  |  |  ------------------
  ------------------
  842|   384k|    IGRAPH_ASSERT(v->end != v->stor_begin);
  ------------------
  |  |  924|   384k|    do { \
  |  |  925|   384k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   384k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 384k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   384k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 384k]
  |  |  ------------------
  ------------------
  843|       |
  844|   384k|    (v->end)--;
  845|       |
  846|   384k|    return *(v->end);
  847|   384k|}
igraph_vector_resize:
 1264|  9.72k|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_int_t new_size) {
 1265|  9.72k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  9.72k|    do { \
  |  |  925|  9.72k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  9.72k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  9.72k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 9.72k]
  |  |  ------------------
  ------------------
 1266|  9.72k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  9.72k|    do { \
  |  |  925|  9.72k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  9.72k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  9.72k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 9.72k]
  |  |  ------------------
  ------------------
 1267|  9.72k|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  9.72k|    do { \
  |  |  657|  9.72k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  9.72k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  9.72k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  9.72k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 9.72k]
  |  |  ------------------
  ------------------
 1268|  9.72k|    v->end = v->stor_begin + new_size;
 1269|  9.72k|    return IGRAPH_SUCCESS;
 1270|  9.72k|}
igraph_vector_char_init:
  134|  2.16k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  2.16k|    igraph_int_t alloc_size;
  136|  2.16k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  2.16k|    do { \
  |  |  925|  2.16k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.16k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.16k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.16k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.16k]
  |  |  ------------------
  ------------------
  137|  2.16k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 2.16k, False: 0]
  ------------------
  138|       |
  139|       |    /* When this function fails, it should leave stor_begin set to NULL,
  140|       |     * so that vector_destroy() is still safe to call on the vector.
  141|       |     * This simplifies freeing partially initialized data structures,
  142|       |     * such as adjacency lists, when an error occurs mid-initialization. */
  143|  2.16k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  2.16k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.32k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.16k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.16k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.16k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  2.16k|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  2.16k|    do { \
  |  |  710|  2.16k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.16k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.16k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  2.16k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.16k]
  |  |  ------------------
  ------------------
  145|  2.16k|    v->stor_end = v->stor_begin + alloc_size;
  146|  2.16k|    v->end = v->stor_begin + size;
  147|       |
  148|  2.16k|    return IGRAPH_SUCCESS;
  149|  2.16k|}
igraph_vector_char_destroy:
  408|  2.16k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  2.16k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  2.16k|    do { \
  |  |  925|  2.16k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.16k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.16k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.16k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.16k]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  2.16k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 2.16k, False: 0]
  ------------------
  413|  2.16k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  2.16k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  2.16k|    }
  416|  2.16k|}
igraph_vector_bool_init:
  134|  2.25k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  2.25k|    igraph_int_t alloc_size;
  136|  2.25k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  2.25k|    do { \
  |  |  925|  2.25k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  137|  2.25k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 0, False: 2.25k]
  ------------------
  138|       |
  139|       |    /* When this function fails, it should leave stor_begin set to NULL,
  140|       |     * so that vector_destroy() is still safe to call on the vector.
  141|       |     * This simplifies freeing partially initialized data structures,
  142|       |     * such as adjacency lists, when an error occurs mid-initialization. */
  143|  2.25k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  2.25k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.51k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.25k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.25k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.25k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  2.25k|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  2.25k|    do { \
  |  |  710|  2.25k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  145|  2.25k|    v->stor_end = v->stor_begin + alloc_size;
  146|  2.25k|    v->end = v->stor_begin + size;
  147|       |
  148|  2.25k|    return IGRAPH_SUCCESS;
  149|  2.25k|}
igraph_vector_bool_destroy:
  408|  2.25k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  2.25k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  2.25k|    do { \
  |  |  925|  2.25k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  2.25k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 2.25k, False: 0]
  ------------------
  413|  2.25k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  2.25k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  2.25k|    }
  416|  2.25k|}
igraph_vector_bool_capacity:
  436|  4.51k|igraph_int_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  437|  4.51k|    return v->stor_end - v->stor_begin;
  438|  4.51k|}
igraph_vector_bool_reserve:
  468|  4.51k|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_int_t capacity) {
  469|  4.51k|    igraph_int_t current_capacity;
  470|  4.51k|    BASE *tmp;
  ------------------
  |  |   53|  4.51k|    #define BASE igraph_bool_t
  ------------------
  471|       |
  472|  4.51k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  4.51k|    do { \
  |  |  925|  4.51k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.51k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.51k]
  |  |  ------------------
  ------------------
  473|  4.51k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  4.51k|    do { \
  |  |  925|  4.51k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.51k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.51k]
  |  |  ------------------
  ------------------
  474|  4.51k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  4.51k|    do { \
  |  |  925|  4.51k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.51k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.51k]
  |  |  ------------------
  ------------------
  475|       |
  476|  4.51k|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  175|  4.51k|        #define FUNCTION(a,c) CONCAT3x(a,bool,c)
  |  |  ------------------
  |  |  |  |   21|  4.51k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  ------------------
  ------------------
  477|       |
  478|  4.51k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (478:9): [True: 2.48k, False: 2.02k]
  ------------------
  479|  2.48k|        return IGRAPH_SUCCESS;
  480|  2.48k|    }
  481|       |
  482|  2.02k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   35|  2.02k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|  4.05k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.02k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.02k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.02k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|  2.02k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  709|  2.02k|    do { \
  |  |  710|  2.02k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  2.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.02k]
  |  |  ------------------
  ------------------
  484|       |
  485|  2.02k|    v->end = tmp + (v->end - v->stor_begin);
  486|  2.02k|    v->stor_begin = tmp;
  487|  2.02k|    v->stor_end = v->stor_begin + capacity;
  488|       |
  489|  2.02k|    return IGRAPH_SUCCESS;
  490|  2.02k|}
igraph_vector_bool_size:
  522|  2.76k|igraph_int_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  523|  2.76k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  2.76k|    do { \
  |  |  925|  2.76k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.76k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.76k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.76k]
  |  |  ------------------
  ------------------
  524|  2.76k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  2.76k|    do { \
  |  |  925|  2.76k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.76k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.76k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.76k]
  |  |  ------------------
  ------------------
  525|  2.76k|    return v->end - v->stor_begin;
  526|  2.76k|}
igraph_vector_bool_null:
  725|  1.43k|void FUNCTION(igraph_vector, null)(TYPE(igraph_vector) *v) {
  726|  1.43k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.43k|    do { \
  |  |  925|  1.43k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.43k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.43k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.43k]
  |  |  ------------------
  ------------------
  727|  1.43k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  1.43k|    do { \
  |  |  925|  1.43k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.43k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.43k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.43k]
  |  |  ------------------
  ------------------
  728|  1.43k|    if (FUNCTION(igraph_vector, size)(v) > 0) {
  ------------------
  |  |  175|  1.43k|        #define FUNCTION(a,c) CONCAT3x(a,bool,c)
  |  |  ------------------
  |  |  |  |   21|  1.43k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  ------------------
  ------------------
  |  Branch (728:9): [True: 1.33k, False: 97]
  ------------------
  729|  1.33k|        memset(v->stor_begin, 0, sizeof(BASE) * FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  175|  1.33k|        #define FUNCTION(a,c) CONCAT3x(a,bool,c)
  |  |  ------------------
  |  |  |  |   21|  1.33k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  ------------------
  ------------------
  730|  1.33k|    }
  731|  1.43k|}
igraph_vector_bool_resize:
 1264|  4.51k|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_int_t new_size) {
 1265|  4.51k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  4.51k|    do { \
  |  |  925|  4.51k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.51k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.51k]
  |  |  ------------------
  ------------------
 1266|  4.51k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  4.51k|    do { \
  |  |  925|  4.51k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.51k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.51k]
  |  |  ------------------
  ------------------
 1267|  4.51k|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  4.51k|    do { \
  |  |  657|  4.51k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.51k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.51k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.51k]
  |  |  ------------------
  ------------------
 1268|  4.51k|    v->end = v->stor_begin + new_size;
 1269|  4.51k|    return IGRAPH_SUCCESS;
 1270|  4.51k|}
igraph_vector_int_init:
  134|  9.56M|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  9.56M|    igraph_int_t alloc_size;
  136|  9.56M|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  9.56M|    do { \
  |  |  925|  9.56M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  9.56M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.56M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  9.56M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 9.56M]
  |  |  ------------------
  ------------------
  137|  9.56M|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 839k, False: 8.72M]
  ------------------
  138|       |
  139|       |    /* When this function fails, it should leave stor_begin set to NULL,
  140|       |     * so that vector_destroy() is still safe to call on the vector.
  141|       |     * This simplifies freeing partially initialized data structures,
  142|       |     * such as adjacency lists, when an error occurs mid-initialization. */
  143|  9.56M|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  9.56M|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  19.1M|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 9.56M, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 9.56M, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 9.56M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  9.56M|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  9.56M|    do { \
  |  |  710|  9.56M|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  9.56M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.56M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  9.56M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 9.56M]
  |  |  ------------------
  ------------------
  145|  9.56M|    v->stor_end = v->stor_begin + alloc_size;
  146|  9.56M|    v->end = v->stor_begin + size;
  147|       |
  148|  9.56M|    return IGRAPH_SUCCESS;
  149|  9.56M|}
igraph_vector_int_destroy:
  408|  9.56M|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  9.56M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  9.56M|    do { \
  |  |  925|  9.56M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  9.56M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.56M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  9.56M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 9.56M]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  9.56M|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 9.56M, False: 0]
  ------------------
  413|  9.56M|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  9.56M|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  9.56M|    }
  416|  9.56M|}
igraph_vector_int_capacity:
  436|  22.3M|igraph_int_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  437|  22.3M|    return v->stor_end - v->stor_begin;
  438|  22.3M|}
igraph_vector_int_reserve:
  468|  22.3M|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_int_t capacity) {
  469|  22.3M|    igraph_int_t current_capacity;
  470|  22.3M|    BASE *tmp;
  ------------------
  |  |   66|  22.3M|    #define BASE igraph_int_t
  ------------------
  471|       |
  472|  22.3M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  22.3M|    do { \
  |  |  925|  22.3M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  22.3M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 22.3M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  22.3M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 22.3M]
  |  |  ------------------
  ------------------
  473|  22.3M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  22.3M|    do { \
  |  |  925|  22.3M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  22.3M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 22.3M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  22.3M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 22.3M]
  |  |  ------------------
  ------------------
  474|  22.3M|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  22.3M|    do { \
  |  |  925|  22.3M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  22.3M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 22.3M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  22.3M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 22.3M]
  |  |  ------------------
  ------------------
  475|       |
  476|  22.3M|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  178|  22.3M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  22.3M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  22.3M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|       |
  478|  22.3M|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (478:9): [True: 17.2M, False: 5.09M]
  ------------------
  479|  17.2M|        return IGRAPH_SUCCESS;
  480|  17.2M|    }
  481|       |
  482|  5.09M|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   35|  5.09M|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|  10.1M|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 5.09M, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 5.09M, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 5.09M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|  5.09M|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  709|  5.09M|    do { \
  |  |  710|  5.09M|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  5.09M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.09M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  5.09M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 5.09M]
  |  |  ------------------
  ------------------
  484|       |
  485|  5.09M|    v->end = tmp + (v->end - v->stor_begin);
  486|  5.09M|    v->stor_begin = tmp;
  487|  5.09M|    v->stor_end = v->stor_begin + capacity;
  488|       |
  489|  5.09M|    return IGRAPH_SUCCESS;
  490|  5.09M|}
igraph_vector_int_empty:
  503|   466k|igraph_bool_t FUNCTION(igraph_vector, empty)(const TYPE(igraph_vector) *v) {
  504|   466k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   466k|    do { \
  |  |  925|   466k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   466k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 466k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   466k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 466k]
  |  |  ------------------
  ------------------
  505|   466k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   466k|    do { \
  |  |  925|   466k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   466k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 466k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   466k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 466k]
  |  |  ------------------
  ------------------
  506|   466k|    return v->stor_begin == v->end;
  507|   466k|}
igraph_vector_int_size:
  522|  23.1M|igraph_int_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  523|  23.1M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  23.1M|    do { \
  |  |  925|  23.1M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  23.1M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  23.1M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 23.1M]
  |  |  ------------------
  ------------------
  524|  23.1M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  23.1M|    do { \
  |  |  925|  23.1M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  23.1M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  23.1M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 23.1M]
  |  |  ------------------
  ------------------
  525|  23.1M|    return v->end - v->stor_begin;
  526|  23.1M|}
igraph_vector_int_clear:
  542|  2.19M|void FUNCTION(igraph_vector, clear)(TYPE(igraph_vector)* v) {
  543|  2.19M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  2.19M|    do { \
  |  |  925|  2.19M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.19M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.19M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.19M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.19M]
  |  |  ------------------
  ------------------
  544|  2.19M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  2.19M|    do { \
  |  |  925|  2.19M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.19M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.19M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.19M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.19M]
  |  |  ------------------
  ------------------
  545|  2.19M|    v->end = v->stor_begin;
  546|  2.19M|}
igraph_vector_int_push_back:
  573|  9.79M|igraph_error_t FUNCTION(igraph_vector, push_back)(TYPE(igraph_vector) *v, BASE e) {
  574|  9.79M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  9.79M|    do { \
  |  |  925|  9.79M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  9.79M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.79M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  9.79M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 9.79M]
  |  |  ------------------
  ------------------
  575|  9.79M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  9.79M|    do { \
  |  |  925|  9.79M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  9.79M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.79M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  9.79M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 9.79M]
  |  |  ------------------
  ------------------
  576|       |
  577|  9.79M|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (577:9): [True: 2.36M, False: 7.43M]
  ------------------
  578|       |        /* full, allocate more storage */
  579|  2.36M|        igraph_int_t old_size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  178|  2.36M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  2.36M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  2.36M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  580|  2.36M|        igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|  2.36M|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|  2.36M|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (580:33): [True: 2.36M, False: 0]
  ------------------
  581|  2.36M|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   72|  2.36M|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (581:13): [True: 0, False: 2.36M]
  ------------------
  582|      0|            IGRAPH_ERROR("Cannot push to vector, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  583|      0|        }
  584|  2.36M|        if (new_size == 0) {
  ------------------
  |  Branch (584:13): [True: 0, False: 2.36M]
  ------------------
  585|      0|            new_size = 1;
  586|      0|        }
  587|  2.36M|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  2.36M|    do { \
  |  |  657|  2.36M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.36M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.36M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.36M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.36M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.36M]
  |  |  ------------------
  ------------------
  588|  2.36M|    }
  589|       |
  590|  9.79M|    *(v->end) = e;
  591|  9.79M|    v->end += 1;
  592|       |
  593|  9.79M|    return IGRAPH_SUCCESS;
  594|  9.79M|}
igraph_vector_int_insert:
  611|  60.6k|        TYPE(igraph_vector) *v, igraph_int_t pos, BASE value) {
  612|  60.6k|    igraph_int_t size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  178|  60.6k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  60.6k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  60.6k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  613|  60.6k|    IGRAPH_ASSERT(0 <= pos && pos <= size);
  ------------------
  |  |  924|  60.6k|    do { \
  |  |  925|  60.6k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   121k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 60.6k]
  |  |  |  |  |  Branch (612:52): [True: 60.6k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 60.6k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  60.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 60.6k]
  |  |  ------------------
  ------------------
  614|  60.6k|    if (size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   72|  60.6k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (614:9): [True: 0, False: 60.6k]
  ------------------
  615|      0|        IGRAPH_ERROR("Cannot insert to vector, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  616|      0|    }
  617|  60.6k|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(v, size + 1));
  ------------------
  |  |  656|  60.6k|    do { \
  |  |  657|  60.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  60.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  60.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 60.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  60.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 60.6k]
  |  |  ------------------
  ------------------
  618|  60.6k|    if (pos < size) {
  ------------------
  |  Branch (618:9): [True: 39.1k, False: 21.4k]
  ------------------
  619|  39.1k|        memmove(v->stor_begin + pos + 1, v->stor_begin + pos,
  620|  39.1k|                sizeof(BASE) * (size - pos));
  621|  39.1k|    }
  622|  60.6k|    v->stor_begin[pos] = value;
  623|  60.6k|    return IGRAPH_SUCCESS;
  624|  60.6k|}
igraph_vector_int_get_ptr:
  682|   439k|BASE* FUNCTION(igraph_vector, get_ptr)(const TYPE(igraph_vector) *v, igraph_int_t pos) {
  683|   439k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   439k|    do { \
  |  |  925|   439k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   439k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 439k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   439k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 439k]
  |  |  ------------------
  ------------------
  684|   439k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   439k|    do { \
  |  |  925|   439k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   439k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 439k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   439k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 439k]
  |  |  ------------------
  ------------------
  685|   439k|    return v->stor_begin + pos;
  686|   439k|}
igraph_vector_int_null:
  725|   581k|void FUNCTION(igraph_vector, null)(TYPE(igraph_vector) *v) {
  726|   581k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   581k|    do { \
  |  |  925|   581k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   581k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 581k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   581k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 581k]
  |  |  ------------------
  ------------------
  727|   581k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   581k|    do { \
  |  |  925|   581k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   581k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 581k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   581k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 581k]
  |  |  ------------------
  ------------------
  728|   581k|    if (FUNCTION(igraph_vector, size)(v) > 0) {
  ------------------
  |  |  178|   581k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   581k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   581k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (728:9): [True: 576k, False: 5.06k]
  ------------------
  729|   576k|        memset(v->stor_begin, 0, sizeof(BASE) * FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  178|   576k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   576k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   576k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  730|   576k|    }
  731|   581k|}
igraph_vector_int_fill:
  745|  29.3k|void FUNCTION(igraph_vector, fill)(TYPE(igraph_vector) *v, BASE e) {
  746|  29.3k|    BASE *ptr;
  ------------------
  |  |   66|  29.3k|    #define BASE igraph_int_t
  ------------------
  747|  29.3k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  29.3k|    do { \
  |  |  925|  29.3k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  29.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 29.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  29.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 29.3k]
  |  |  ------------------
  ------------------
  748|  29.3k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  29.3k|    do { \
  |  |  925|  29.3k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  29.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 29.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  29.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 29.3k]
  |  |  ------------------
  ------------------
  749|       |
  750|       |    /* Optimize the commonly used integer case when filling with 0
  751|       |     * or -1, which are an all-0 and all-1 bit pattern that the
  752|       |     * compiler can generate higher efficiency code for. */
  753|  29.3k|#if defined(BASE_INT)
  754|  29.3k|    if (e == 0) {
  ------------------
  |  Branch (754:9): [True: 0, False: 29.3k]
  ------------------
  755|      0|        FUNCTION(igraph_vector, null)(v);
  ------------------
  |  |  178|      0|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|      0|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|      0|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  756|      0|        return;
  757|      0|    }
  758|  29.3k|    if (e == -1) {
  ------------------
  |  Branch (758:9): [True: 20.2k, False: 9.02k]
  ------------------
  759|  3.50M|        for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (759:35): [True: 3.48M, False: 20.2k]
  ------------------
  760|  3.48M|            *ptr = -1;
  761|  3.48M|        }
  762|  20.2k|        return;
  763|  20.2k|    }
  764|  9.02k|#endif
  765|       |
  766|  1.55M|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (766:31): [True: 1.54M, False: 9.02k]
  ------------------
  767|  1.54M|        *ptr = e;
  768|  1.54M|    }
  769|  9.02k|}
igraph_vector_int_range:
  791|  2.25k|igraph_error_t FUNCTION(igraph_vector, range)(TYPE(igraph_vector) *v, BASE start, BASE end) {
  792|  2.25k|    BASE *p;
  ------------------
  |  |   66|  2.25k|    #define BASE igraph_int_t
  ------------------
  793|  2.25k|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(v, (end - start)));
  ------------------
  |  |  656|  2.25k|    do { \
  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  794|       |
  795|   389k|    for (p = v->stor_begin; p < v->end; p++) {
  ------------------
  |  Branch (795:29): [True: 386k, False: 2.25k]
  ------------------
  796|   386k|        *p = start;
  797|   386k|        start = start + ONE;
  ------------------
  |  |   72|   386k|    #define ONE 1
  ------------------
  798|   386k|    }
  799|       |
  800|  2.25k|    return IGRAPH_SUCCESS;
  801|  2.25k|}
igraph_vector_int_pop_back:
  838|  1.12M|BASE FUNCTION(igraph_vector, pop_back)(TYPE(igraph_vector) *v) {
  839|  1.12M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.12M|    do { \
  |  |  925|  1.12M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.12M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.12M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.12M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.12M]
  |  |  ------------------
  ------------------
  840|  1.12M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  1.12M|    do { \
  |  |  925|  1.12M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.12M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.12M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.12M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.12M]
  |  |  ------------------
  ------------------
  841|  1.12M|    IGRAPH_ASSERT(v->end != NULL);
  ------------------
  |  |  924|  1.12M|    do { \
  |  |  925|  1.12M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.12M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.12M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.12M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.12M]
  |  |  ------------------
  ------------------
  842|  1.12M|    IGRAPH_ASSERT(v->end != v->stor_begin);
  ------------------
  |  |  924|  1.12M|    do { \
  |  |  925|  1.12M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.12M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.12M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.12M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.12M]
  |  |  ------------------
  ------------------
  843|       |
  844|  1.12M|    (v->end)--;
  845|       |
  846|  1.12M|    return *(v->end);
  847|  1.12M|}
igraph_vector_int_sort:
  958|   775k|void FUNCTION(igraph_vector, sort)(TYPE(igraph_vector) *v) {
  959|   775k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   775k|    do { \
  |  |  925|   775k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   775k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 775k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   775k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 775k]
  |  |  ------------------
  ------------------
  960|   775k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   775k|    do { \
  |  |  925|   775k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   775k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 775k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   775k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 775k]
  |  |  ------------------
  ------------------
  961|   775k|    igraph_qsort(v->stor_begin, FUNCTION(igraph_vector, size)(v),
  ------------------
  |  |  178|   775k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   775k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   775k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  962|   775k|                 sizeof(BASE), FUNCTION(igraph_vector, sort_cmp));
  ------------------
  |  |  178|   775k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   775k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   775k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  963|   775k|}
igraph_vector_int_resize:
 1264|  19.1M|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_int_t new_size) {
 1265|  19.1M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  19.1M|    do { \
  |  |  925|  19.1M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  19.1M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 19.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  19.1M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 19.1M]
  |  |  ------------------
  ------------------
 1266|  19.1M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  19.1M|    do { \
  |  |  925|  19.1M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  19.1M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 19.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  19.1M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 19.1M]
  |  |  ------------------
  ------------------
 1267|  19.1M|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  19.1M|    do { \
  |  |  657|  19.1M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  19.1M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  19.1M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 19.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  19.1M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 19.1M]
  |  |  ------------------
  ------------------
 1268|  19.1M|    v->end = v->stor_begin + new_size;
 1269|  19.1M|    return IGRAPH_SUCCESS;
 1270|  19.1M|}
igraph_vector_int_max:
 1327|  40.6k|BASE FUNCTION(igraph_vector, max)(const TYPE(igraph_vector) *v) {
 1328|  40.6k|    BASE max;
  ------------------
  |  |   66|  40.6k|    #define BASE igraph_int_t
  ------------------
 1329|  40.6k|    BASE *ptr;
  ------------------
  |  |   66|  40.6k|    #define BASE igraph_int_t
  ------------------
 1330|  40.6k|    IGRAPH_ASSERT(!FUNCTION(igraph_vector, empty)(v));
  ------------------
  |  |  924|  40.6k|    do { \
  |  |  925|  40.6k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  40.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 40.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  40.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 40.6k]
  |  |  ------------------
  ------------------
 1331|  40.6k|    max = *(v->stor_begin);
 1332|       |#if defined(BASE_IGRAPH_REAL)
 1333|       |    if (isnan(max)) { return max; }; /* Result is NaN */
 1334|       |#endif
 1335|  40.6k|    ptr = v->stor_begin + 1;
 1336|  3.37M|    while (ptr < v->end) {
  ------------------
  |  Branch (1336:12): [True: 3.33M, False: 40.6k]
  ------------------
 1337|  3.33M|        if ((*ptr) > max) {
  ------------------
  |  Branch (1337:13): [True: 225k, False: 3.10M]
  ------------------
 1338|   225k|            max = *ptr;
 1339|   225k|        }
 1340|       |#if defined(BASE_IGRAPH_REAL)
 1341|       |        else if (isnan(*ptr))
 1342|       |            return *ptr; /* Result is NaN */
 1343|       |#endif
 1344|  3.33M|        ptr++;
 1345|  3.33M|    }
 1346|  40.6k|    return max;
 1347|  40.6k|}
igraph_vector_int_which_max:
 1365|  2.23k|igraph_int_t FUNCTION(igraph_vector, which_max)(const TYPE(igraph_vector) *v) {
 1366|  2.23k|    BASE *max;
  ------------------
  |  |   66|  2.23k|    #define BASE igraph_int_t
  ------------------
 1367|  2.23k|    BASE *ptr;
  ------------------
  |  |   66|  2.23k|    #define BASE igraph_int_t
  ------------------
 1368|  2.23k|    IGRAPH_ASSERT(!FUNCTION(igraph_vector, empty)(v));
  ------------------
  |  |  924|  2.23k|    do { \
  |  |  925|  2.23k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.23k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.23k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.23k]
  |  |  ------------------
  ------------------
 1369|  2.23k|    max = ptr = v->stor_begin;
 1370|       |#if defined(BASE_IGRAPH_REAL)
 1371|       |    if (isnan(*ptr)) { return ptr - v->stor_begin; } /* Result is NaN */
 1372|       |#endif
 1373|  2.23k|    ptr++;
 1374|   386k|    while (ptr < v->end) {
  ------------------
  |  Branch (1374:12): [True: 384k, False: 2.23k]
  ------------------
 1375|   384k|        if (*ptr > *max) {
  ------------------
  |  Branch (1375:13): [True: 2.21k, False: 382k]
  ------------------
 1376|  2.21k|            max = ptr;
 1377|  2.21k|        }
 1378|       |#if defined(BASE_IGRAPH_REAL)
 1379|       |        else if (isnan(*ptr)) {
 1380|       |            return ptr - v->stor_begin; /* Result is NaN */
 1381|       |        }
 1382|       |#endif
 1383|   384k|        ptr++;
 1384|   384k|    }
 1385|  2.23k|    return max - v->stor_begin;
 1386|  2.23k|}
igraph_vector_int_min:
 1401|  34.8k|BASE FUNCTION(igraph_vector, min)(const TYPE(igraph_vector) *v) {
 1402|  34.8k|    BASE min;
  ------------------
  |  |   66|  34.8k|    #define BASE igraph_int_t
  ------------------
 1403|  34.8k|    BASE *ptr;
  ------------------
  |  |   66|  34.8k|    #define BASE igraph_int_t
  ------------------
 1404|  34.8k|    IGRAPH_ASSERT(!FUNCTION(igraph_vector, empty)(v));
  ------------------
  |  |  924|  34.8k|    do { \
  |  |  925|  34.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  34.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 34.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  34.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 34.8k]
  |  |  ------------------
  ------------------
 1405|  34.8k|    min = *(v->stor_begin);
 1406|       |#if defined(BASE_IGRAPH_REAL)
 1407|       |    if (isnan(min)) { return min; }; /* Result is NaN */
 1408|       |#endif
 1409|  34.8k|    ptr = v->stor_begin + 1;
 1410|  6.05M|    while (ptr < v->end) {
  ------------------
  |  Branch (1410:12): [True: 6.01M, False: 34.8k]
  ------------------
 1411|  6.01M|        if ((*ptr) < min) {
  ------------------
  |  Branch (1411:13): [True: 25.1k, False: 5.99M]
  ------------------
 1412|  25.1k|            min = *ptr;
 1413|  25.1k|        }
 1414|       |#if defined(BASE_IGRAPH_REAL)
 1415|       |        else if (isnan(*ptr)) {
 1416|       |            return *ptr; /* Result is NaN */
 1417|       |        }
 1418|       |#endif
 1419|  6.01M|        ptr++;
 1420|  6.01M|    }
 1421|  34.8k|    return min;
 1422|  34.8k|}
igraph_vector_int_init_copy:
 1538|  24.7k|) {
 1539|  24.7k|    igraph_int_t from_size;
 1540|       |
 1541|  24.7k|    IGRAPH_ASSERT(from != NULL);
  ------------------
  |  |  924|  24.7k|    do { \
  |  |  925|  24.7k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  24.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 24.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  24.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 24.7k]
  |  |  ------------------
  ------------------
 1542|  24.7k|    IGRAPH_ASSERT(from->stor_begin != NULL);
  ------------------
  |  |  924|  24.7k|    do { \
  |  |  925|  24.7k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  24.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 24.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  24.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 24.7k]
  |  |  ------------------
  ------------------
 1543|       |
 1544|  24.7k|    from_size = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  178|  24.7k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  24.7k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  24.7k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1545|  24.7k|    IGRAPH_CHECK(FUNCTION(igraph_vector, init)(to, from_size));
  ------------------
  |  |  656|  24.7k|    do { \
  |  |  657|  24.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  24.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  24.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 24.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  24.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 24.7k]
  |  |  ------------------
  ------------------
 1546|       |
 1547|  24.7k|    memcpy(to->stor_begin, from->stor_begin, from_size * sizeof(BASE));
 1548|       |
 1549|  24.7k|    return IGRAPH_SUCCESS;
 1550|  24.7k|}
igraph_vector_int_remove_section:
 1716|  60.6k|        TYPE(igraph_vector) *v, igraph_int_t from, igraph_int_t to) {
 1717|  60.6k|    igraph_int_t size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  178|  60.6k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  60.6k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  60.6k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1718|       |
 1719|  60.6k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  60.6k|    do { \
  |  |  925|  60.6k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  60.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 60.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  60.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 60.6k]
  |  |  ------------------
  ------------------
 1720|  60.6k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  60.6k|    do { \
  |  |  925|  60.6k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  60.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 60.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  60.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 60.6k]
  |  |  ------------------
  ------------------
 1721|       |
 1722|  60.6k|    if (from < 0) {
  ------------------
  |  Branch (1722:9): [True: 0, False: 60.6k]
  ------------------
 1723|      0|        from = 0;
 1724|      0|    }
 1725|       |
 1726|  60.6k|    if (to > size) {
  ------------------
  |  Branch (1726:9): [True: 0, False: 60.6k]
  ------------------
 1727|      0|        to = size;
 1728|      0|    }
 1729|       |
 1730|  60.6k|    if (to > from) {
  ------------------
  |  Branch (1730:9): [True: 60.6k, False: 0]
  ------------------
 1731|  60.6k|        memmove(v->stor_begin + from, v->stor_begin + to,
 1732|  60.6k|                sizeof(BASE) * (v->end - v->stor_begin - to));
 1733|  60.6k|        v->end -= (to - from);
 1734|  60.6k|    }
 1735|  60.6k|}
igraph_vector_int_remove:
 1751|  60.6k|void FUNCTION(igraph_vector, remove)(TYPE(igraph_vector) *v, igraph_int_t elem) {
 1752|  60.6k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  60.6k|    do { \
  |  |  925|  60.6k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  60.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 60.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  60.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 60.6k]
  |  |  ------------------
  ------------------
 1753|  60.6k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  60.6k|    do { \
  |  |  925|  60.6k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  60.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 60.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  60.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 60.6k]
  |  |  ------------------
  ------------------
 1754|  60.6k|    FUNCTION(igraph_vector, remove_section)(v, elem, elem + 1);
  ------------------
  |  |  178|  60.6k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  60.6k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  60.6k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1755|  60.6k|}
igraph_vector_int_isininterval:
 1832|  93.6k|        BASE high) {
 1833|  93.6k|    BASE *ptr;
  ------------------
  |  |   66|  93.6k|    #define BASE igraph_int_t
  ------------------
 1834|  93.6k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  93.6k|    do { \
  |  |  925|  93.6k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  93.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 93.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  93.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 93.6k]
  |  |  ------------------
  ------------------
 1835|  93.6k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  93.6k|    do { \
  |  |  925|  93.6k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  93.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 93.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  93.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 93.6k]
  |  |  ------------------
  ------------------
 1836|  5.72M|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (1836:31): [True: 5.63M, False: 93.6k]
  ------------------
 1837|       |        /* Note that the following is not equivalent to *ptr < low || *ptr > high
 1838|       |         * when *ptr is NaN! */
 1839|  5.63M|        if (!(*ptr >= low && *ptr <= high)) {
  ------------------
  |  Branch (1839:15): [True: 5.63M, False: 0]
  |  Branch (1839:30): [True: 5.63M, False: 0]
  ------------------
 1840|      0|            return 0;
 1841|      0|        }
 1842|  5.63M|    }
 1843|  93.6k|    return 1;
 1844|  93.6k|}
igraph_vector_int_binsearch:
 2130|   121k|        BASE what, igraph_int_t *pos) {
 2131|   121k|    return FUNCTION(igraph_i_vector, binsearch_slice)(v, what, pos,
  ------------------
  |  |  178|   121k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   121k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   121k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2132|   121k|            0, FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  178|   121k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   121k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   121k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2133|   121k|}
igraph_vector_int_contains_sorted:
 2224|  67.0k|igraph_bool_t FUNCTION(igraph_vector, contains_sorted)(const TYPE(igraph_vector) *v, BASE what) {
 2225|  67.0k|    igraph_int_t left = 0;
 2226|  67.0k|    igraph_int_t right = FUNCTION(igraph_vector, size)(v) - 1;
  ------------------
  |  |  178|  67.0k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  67.0k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  67.0k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2227|       |
 2228|   170k|    while (left <= right) {
  ------------------
  |  Branch (2228:12): [True: 108k, False: 62.3k]
  ------------------
 2229|       |        /* (right + left) / 2 could theoretically overflow for long vectors */
 2230|   108k|        igraph_int_t middle = left + ((right - left) >> 1);
 2231|   108k|        if (what < VECTOR(*v)[middle]) {
  ------------------
  |  |   60|   108k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2231:13): [True: 63.9k, False: 44.4k]
  ------------------
 2232|  63.9k|            right = middle - 1;
 2233|  63.9k|        } else if (what > VECTOR(*v)[middle]) {
  ------------------
  |  |   60|  44.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2233:20): [True: 39.7k, False: 4.74k]
  ------------------
 2234|  39.7k|            left = middle + 1;
 2235|  39.7k|        } else {
 2236|  4.74k|            return true;
 2237|  4.74k|        }
 2238|   108k|    }
 2239|       |
 2240|  62.3k|    return false;
 2241|  67.0k|}
igraph_vector_int_add_constant:
 2291|  2.23k|void FUNCTION(igraph_vector, add_constant)(TYPE(igraph_vector) *v, BASE plus) {
 2292|  2.23k|    const igraph_int_t n = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  178|  2.23k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  2.23k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  2.23k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2293|       |#ifdef EQ
 2294|       |    const BASE zero = ZERO;
 2295|       |    if (EQ(plus, zero)) {
 2296|       |        return;
 2297|       |    }
 2298|       |#else
 2299|  2.23k|    if (plus == ZERO) {
  ------------------
  |  |   71|  2.23k|    #define ZERO 0
  ------------------
  |  Branch (2299:9): [True: 0, False: 2.23k]
  ------------------
 2300|      0|        return;
 2301|      0|    }
 2302|  2.23k|#endif
 2303|   389k|    for (igraph_int_t i = 0; i < n; i++) {
  ------------------
  |  Branch (2303:30): [True: 386k, False: 2.23k]
  ------------------
 2304|       |#ifdef SUM
 2305|       |        SUM(VECTOR(*v)[i], VECTOR(*v)[i], plus);
 2306|       |#else
 2307|   386k|        VECTOR(*v)[i] += plus;
  ------------------
  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 2308|   386k|#endif
 2309|   386k|    }
 2310|  2.23k|}
igraph_vector_int_update:
 2524|  2.22M|                                    const TYPE(igraph_vector) *from) {
 2525|  2.22M|    igraph_int_t n = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  178|  2.22M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  2.22M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  2.22M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2526|  2.22M|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(to, n));
  ------------------
  |  |  656|  2.22M|    do { \
  |  |  657|  2.22M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.22M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.22M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.22M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.22M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.22M]
  |  |  ------------------
  ------------------
 2527|  2.22M|    memcpy(to->stor_begin, from->stor_begin, sizeof(BASE)*n);
 2528|  2.22M|    return IGRAPH_SUCCESS;
 2529|  2.22M|}
igraph_vector_int_swap:
 2541|  2.23M|void FUNCTION(igraph_vector, swap)(TYPE(igraph_vector) *v1, TYPE(igraph_vector) *v2) {
 2542|       |
 2543|  2.23M|    TYPE(igraph_vector) tmp;
  ------------------
  |  |  179|  2.23M|        #define TYPE(a) CONCAT3(a,SHORT,t)
  |  |  ------------------
  |  |  |  |   22|  2.23M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  2.23M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2544|       |
 2545|  2.23M|    tmp = *v1;
 2546|  2.23M|    *v1 = *v2;
 2547|  2.23M|    *v2 = tmp;
 2548|  2.23M|}
vector.c:igraph_vector_int_sort_cmp:
  924|   275k|static int FUNCTION(igraph_vector, sort_cmp)(const void *a, const void *b) {
  925|   275k|    const BASE *da = (const BASE *) a;
  926|   275k|    const BASE *db = (const BASE *) b;
  927|       |
  928|   275k|    return (*da > *db) - (*da < *db);
  929|   275k|}
vector.c:igraph_i_vector_int_binsearch_slice:
 2183|   121k|        BASE what, igraph_int_t *pos, igraph_int_t start, igraph_int_t end) {
 2184|   121k|    igraph_int_t left  = start;
 2185|   121k|    igraph_int_t right = end - 1;
 2186|       |
 2187|   227k|    while (left <= right) {
  ------------------
  |  Branch (2187:12): [True: 167k, False: 60.6k]
  ------------------
 2188|       |        /* (right + left) / 2 could theoretically overflow for long vectors */
 2189|   167k|        igraph_int_t middle = left + ((right - left) >> 1);
 2190|   167k|        if (VECTOR(*v)[middle] > what) {
  ------------------
  |  |   60|   167k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2190:13): [True: 63.4k, False: 103k]
  ------------------
 2191|  63.4k|            right = middle - 1;
 2192|   103k|        } else if (VECTOR(*v)[middle] < what) {
  ------------------
  |  |   60|   103k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2192:20): [True: 43.0k, False: 60.6k]
  ------------------
 2193|  43.0k|            left = middle + 1;
 2194|  60.6k|        } else {
 2195|  60.6k|            if (pos != 0) {
  ------------------
  |  Branch (2195:17): [True: 60.6k, False: 0]
  ------------------
 2196|  60.6k|                *pos = middle;
 2197|  60.6k|            }
 2198|  60.6k|            return true;
 2199|  60.6k|        }
 2200|   167k|    }
 2201|       |
 2202|       |    /* if we are here, the element was not found */
 2203|  60.6k|    if (pos != 0) {
  ------------------
  |  Branch (2203:9): [True: 60.6k, False: 0]
  ------------------
 2204|  60.6k|        *pos = left;
 2205|  60.6k|    }
 2206|       |
 2207|       |    return false;
 2208|   121k|}

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

igraph_adjlist_init:
  155|  7.63k|                        igraph_bool_t multiple) {
  156|       |
  157|  7.63k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  158|  7.63k|    igraph_vector_int_t degrees;
  159|  7.63k|    int iter = 0;
  160|       |
  161|  7.63k|    multiple = !!multiple; /* normalize Boolean value to enable == comparisons below */
  162|       |
  163|  7.63k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (163:9): [True: 7.63k, False: 0]
  |  Branch (163:30): [True: 6.75k, False: 880]
  |  Branch (163:52): [True: 0, False: 6.75k]
  ------------------
  164|      0|        IGRAPH_ERROR("Cannot create adjacency list view.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  165|      0|    }
  166|       |
  167|  7.63k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (167:9): [True: 7.63k, False: 0]
  ------------------
  168|  7.63k|        mode = IGRAPH_ALL;
  169|  7.63k|    }
  170|       |
  171|  7.63k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  119|  7.63k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  7.63k|    do { \
  |  |  |  |  657|  7.63k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  7.63k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  7.63k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.63k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  7.63k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 7.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  7.63k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  7.63k|    do { \
  |  |  |  |  604|  7.63k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  7.63k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  7.63k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  7.63k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 7.63k]
  |  |  |  |  ------------------
  |  |  |  |  608|  7.63k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  7.63k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 7.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 7.63k]
  |  |  ------------------
  ------------------
  172|       |    /* igraph_degree() is fast when loops=true */
  173|  7.63k|    IGRAPH_CHECK(igraph_degree(graph, &degrees, igraph_vss_all(), mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  7.63k|    do { \
  |  |  657|  7.63k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  7.63k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  7.63k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  7.63k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 7.63k]
  |  |  ------------------
  ------------------
  174|       |
  175|  7.63k|    al->length = no_of_nodes;
  176|  7.63k|    al->adjs = IGRAPH_CALLOC(al->length, igraph_vector_int_t);
  ------------------
  |  |   33|  7.63k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  15.2k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 7.63k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 7.63k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 7.63k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  177|  7.63k|    IGRAPH_CHECK_OOM(al->adjs, "Insufficient memory for creating adjacency list view.");
  ------------------
  |  |  709|  7.63k|    do { \
  |  |  710|  7.63k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  7.63k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  7.63k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 7.63k]
  |  |  ------------------
  ------------------
  178|  7.63k|    IGRAPH_FINALLY(igraph_adjlist_destroy, al);
  ------------------
  |  |  603|  7.63k|    do { \
  |  |  604|  7.63k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  7.63k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  7.63k|         * incorrect destructor function with the pointer */ \
  |  |  607|  7.63k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 7.63k]
  |  |  ------------------
  |  |  608|  7.63k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  7.63k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 7.63k]
  |  |  ------------------
  ------------------
  179|       |
  180|       |    /* if we already know there are no multi-edges, they don't need to be removed */
  181|  7.63k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MULTI) &&
  ------------------
  |  Branch (181:9): [True: 4.49k, False: 3.13k]
  ------------------
  182|  4.49k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_MULTI)) {
  ------------------
  |  Branch (182:9): [True: 2.89k, False: 1.59k]
  ------------------
  183|       |
  184|       |        /* special case: if the graph is directed, but we are ignoring edge directions,
  185|       |         * mutual edges also act as multi-edges */
  186|  2.89k|        if (igraph_is_directed(graph) && mode == IGRAPH_ALL) {
  ------------------
  |  Branch (186:13): [True: 0, False: 2.89k]
  |  Branch (186:42): [True: 0, False: 0]
  ------------------
  187|      0|            if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MUTUAL) &&
  ------------------
  |  Branch (187:17): [True: 0, False: 0]
  ------------------
  188|      0|                !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_MUTUAL)) {
  ------------------
  |  Branch (188:17): [True: 0, False: 0]
  ------------------
  189|      0|                multiple = IGRAPH_MULTIPLE;
  190|      0|            }
  191|  2.89k|        } else {
  192|  2.89k|            multiple = IGRAPH_MULTIPLE;
  193|  2.89k|        }
  194|  2.89k|    }
  195|       |
  196|       |    /* if we already know there are no loops, they don't need to be removed */
  197|  7.63k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (197:9): [True: 4.49k, False: 3.13k]
  ------------------
  198|  4.49k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (198:9): [True: 2.86k, False: 1.63k]
  ------------------
  199|  2.86k|        if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (199:13): [True: 2.86k, False: 0]
  ------------------
  200|  2.86k|            loops = IGRAPH_LOOPS_TWICE;
  201|  2.86k|        } else {
  202|      0|            loops = IGRAPH_LOOPS_ONCE;
  203|      0|        }
  204|  2.86k|    }
  205|       |
  206|  7.63k|    igraph_bool_t has_loops = false;
  207|  7.63k|    igraph_bool_t has_multiple = false;
  208|       |
  209|       |    /* In theory, we could just run igraph_neighbors() in a loop with 'loops'
  210|       |     * and 'multiple' set exactly how the caller wants it. However, we take the
  211|       |     * opportunity to also _cache_ whether the graph has multiple or loop edges
  212|       |     * if we are looping over all vertices anyway, and that requires us to query
  213|       |     * the neighbors in full */
  214|       |
  215|  1.36M|    for (igraph_int_t i = 0; i < al->length; i++) {
  ------------------
  |  Branch (215:30): [True: 1.35M, False: 7.63k]
  ------------------
  216|  1.35M|        IGRAPH_ALLOW_INTERRUPTION_LIMITED(iter, 1000);
  ------------------
  |  |   71|  1.35M|    do { \
  |  |   72|  1.35M|        if (++iter >= skips) { \
  |  |  ------------------
  |  |  |  Branch (72:13): [True: 0, False: 1.35M]
  |  |  ------------------
  |  |   73|      0|            IGRAPH_ALLOW_INTERRUPTION(); \
  |  |  ------------------
  |  |  |  |   46|      0|    do { \
  |  |  |  |   47|      0|        if (igraph_i_interruption_handler) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (47:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |  |  |   50|      0|            } \
  |  |  |  |   51|      0|        } \
  |  |  |  |   52|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   74|      0|            iter = 0; \
  |  |   75|      0|        } \
  |  |   76|  1.35M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (76:14): [Folded, False: 1.35M]
  |  |  ------------------
  ------------------
  217|       |
  218|  1.35M|        IGRAPH_CHECK(igraph_vector_int_init(&al->adjs[i], VECTOR(degrees)[i]));
  ------------------
  |  |  656|  1.35M|    do { \
  |  |  657|  1.35M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.35M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.35M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.35M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.35M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.35M]
  |  |  ------------------
  ------------------
  219|  1.35M|        IGRAPH_CHECK(igraph_neighbors(graph, &al->adjs[i], i, mode, IGRAPH_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  1.35M|    do { \
  |  |  657|  1.35M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.35M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.35M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.35M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.35M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.35M]
  |  |  ------------------
  ------------------
  220|       |
  221|       |        /* Attention: This function will only set values for has_loops and has_multiple
  222|       |         * if it finds loops/multi-edges. Otherwise, they are left at their original value. */
  223|  1.35M|        IGRAPH_CHECK(igraph_i_simplify_sorted_int_adjacency_vector_in_place(
  ------------------
  |  |  656|  1.35M|    do { \
  |  |  657|  1.35M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.35M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.35M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.35M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.35M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.35M]
  |  |  ------------------
  ------------------
  224|  1.35M|            &al->adjs[i], i, mode, loops, multiple, &has_loops, &has_multiple
  225|  1.35M|        ));
  226|  1.35M|    }
  227|  7.63k|    if (has_loops) {
  ------------------
  |  Branch (227:9): [True: 1.63k, False: 5.99k]
  ------------------
  228|       |        /* If we have found at least one loop above, set the cache to true. */
  229|  1.63k|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, true);
  230|  5.99k|    } else if (loops == IGRAPH_NO_LOOPS) {
  ------------------
  |  Branch (230:16): [True: 1.43k, False: 4.56k]
  ------------------
  231|       |        /* If we explicitly _checked_ for loops (to remove them) and haven't
  232|       |         * found one, set the cache to false. This is the only case when a
  233|       |         * definite "no" from has_loops really means that there are no loops at
  234|       |         * all. */
  235|  1.43k|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, false);
  236|  1.43k|    }
  237|  7.63k|    if (has_multiple) {
  ------------------
  |  Branch (237:9): [True: 1.59k, False: 6.03k]
  ------------------
  238|       |        /* If we have found at least one multiedge above, set the cache to true,
  239|       |         * except when treating a directed graph as undirected. In that case, mutual
  240|       |         * edges would also look like multi-edges in this check. */
  241|  1.59k|        if (! igraph_is_directed(graph) || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (241:13): [True: 1.59k, False: 0]
  |  Branch (241:44): [True: 0, False: 0]
  ------------------
  242|  1.59k|            igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_MULTI, true);
  243|  1.59k|        }
  244|  6.03k|    } else if (multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (244:16): [True: 1.45k, False: 4.58k]
  ------------------
  245|       |        /* If we explicitly _checked_ for multi-edges (to remove them) and
  246|       |         * haven't found one, set the cache to false. This is the only case
  247|       |         * when a definite "no" from has_multiple really means that there are
  248|       |         * no multi-edges at all. */
  249|  1.45k|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_MULTI, false);
  250|  1.45k|    }
  251|       |
  252|  7.63k|    igraph_vector_int_destroy(&degrees);
  253|  7.63k|    IGRAPH_FINALLY_CLEAN(2); /* + igraph_adjlist_destroy */
  254|       |
  255|  7.63k|    return IGRAPH_SUCCESS;
  256|  7.63k|}
igraph_adjlist_destroy:
  475|  7.63k|void igraph_adjlist_destroy(igraph_adjlist_t *al) {
  476|  1.36M|    for (igraph_int_t i = 0; i < al->length; i++) {
  ------------------
  |  Branch (476:30): [True: 1.35M, False: 7.63k]
  ------------------
  477|       |        /* This works if some igraph_vector_int_t's contain NULL,
  478|       |           because igraph_vector_int_destroy can handle this. */
  479|  1.35M|        igraph_vector_int_destroy(&al->adjs[i]);
  480|  1.35M|    }
  481|       |    IGRAPH_FREE(al->adjs);
  ------------------
  |  |   36|  7.63k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  482|  7.63k|}
igraph_adjlist_has_edge:
  626|  67.0k|        igraph_bool_t directed) {
  627|       |
  628|  67.0k|    const igraph_vector_int_t *fromvec;
  629|  67.0k|    ADJLIST_CANON_EDGE(from, to, directed);
  ------------------
  |  |  603|  67.0k|    do {                     \
  |  |  604|  67.0k|        igraph_int_t temp;         \
  |  |  605|  67.0k|        if ((!directed) && from < to) {     \
  |  |  ------------------
  |  |  |  Branch (605:13): [True: 67.0k, False: 0]
  |  |  |  Branch (605:28): [True: 40.4k, False: 26.6k]
  |  |  ------------------
  |  |  606|  40.4k|            temp = to;               \
  |  |  607|  40.4k|            to = from;               \
  |  |  608|  40.4k|            from = temp;             \
  |  |  609|  40.4k|        }                      \
  |  |  610|  67.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (610:14): [Folded, False: 67.0k]
  |  |  ------------------
  ------------------
  630|  67.0k|    fromvec = igraph_adjlist_get(al, from);
  ------------------
  |  |   73|  67.0k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  631|  67.0k|    return igraph_vector_int_contains_sorted(fromvec, to);
  632|  67.0k|}
igraph_adjlist_replace_edge:
  637|  60.6k|        igraph_bool_t directed) {
  638|       |
  639|  60.6k|    igraph_vector_int_t *oldfromvec, *newfromvec;
  640|  60.6k|    igraph_bool_t found_old, found_new;
  641|  60.6k|    igraph_int_t oldpos, newpos;
  642|  60.6k|    igraph_int_t oldfrom = from, newfrom = from;
  643|       |
  644|  60.6k|    ADJLIST_CANON_EDGE(oldfrom, oldto, directed);
  ------------------
  |  |  603|  60.6k|    do {                     \
  |  |  604|  60.6k|        igraph_int_t temp;         \
  |  |  605|  60.6k|        if ((!directed) && from < to) {     \
  |  |  ------------------
  |  |  |  Branch (605:13): [True: 60.6k, False: 0]
  |  |  |  Branch (605:28): [True: 38.8k, False: 21.7k]
  |  |  ------------------
  |  |  606|  38.8k|            temp = to;               \
  |  |  607|  38.8k|            to = from;               \
  |  |  608|  38.8k|            from = temp;             \
  |  |  609|  38.8k|        }                      \
  |  |  610|  60.6k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (610:14): [Folded, False: 60.6k]
  |  |  ------------------
  ------------------
  645|  60.6k|    ADJLIST_CANON_EDGE(newfrom, newto, directed);
  ------------------
  |  |  603|  60.6k|    do {                     \
  |  |  604|  60.6k|        igraph_int_t temp;         \
  |  |  605|  60.6k|        if ((!directed) && from < to) {     \
  |  |  ------------------
  |  |  |  Branch (605:13): [True: 60.6k, False: 0]
  |  |  |  Branch (605:28): [True: 36.5k, False: 24.0k]
  |  |  ------------------
  |  |  606|  36.5k|            temp = to;               \
  |  |  607|  36.5k|            to = from;               \
  |  |  608|  36.5k|            from = temp;             \
  |  |  609|  36.5k|        }                      \
  |  |  610|  60.6k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (610:14): [Folded, False: 60.6k]
  |  |  ------------------
  ------------------
  646|       |
  647|  60.6k|    oldfromvec = igraph_adjlist_get(al, oldfrom);
  ------------------
  |  |   73|  60.6k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  648|  60.6k|    newfromvec = igraph_adjlist_get(al, newfrom);
  ------------------
  |  |   73|  60.6k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  649|       |
  650|       |    /* oldfrom -> oldto should exist; newfrom -> newto should not. */
  651|  60.6k|    found_old = igraph_vector_int_binsearch(oldfromvec, oldto, &oldpos);
  652|  60.6k|    if (! found_old) {
  ------------------
  |  Branch (652:9): [True: 0, False: 60.6k]
  ------------------
  653|      0|        IGRAPH_ERROR("Edge to replace does not exist.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  654|      0|    }
  655|  60.6k|    found_new = igraph_vector_int_binsearch(newfromvec, newto, &newpos);
  656|  60.6k|    if (found_new) {
  ------------------
  |  Branch (656:9): [True: 0, False: 60.6k]
  ------------------
  657|      0|        IGRAPH_ERROR("New edge already exists.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  658|      0|    }
  659|       |
  660|  60.6k|    if (oldfromvec != newfromvec) {
  ------------------
  |  Branch (660:9): [True: 47.7k, False: 12.9k]
  ------------------
  661|       |        /* grow the new vector first and then remove the item from the old one
  662|       |         * to ensure that we don't end up in a situation where the removal
  663|       |         * succeeds but the addition does not */
  664|  47.7k|        IGRAPH_CHECK(igraph_vector_int_insert(newfromvec, newpos, newto));
  ------------------
  |  |  656|  47.7k|    do { \
  |  |  657|  47.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  47.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  47.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 47.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  47.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 47.7k]
  |  |  ------------------
  ------------------
  665|  47.7k|        igraph_vector_int_remove(oldfromvec, oldpos);
  666|  47.7k|    } else {
  667|       |        /* moving item within the same vector; here we can safely remove first
  668|       |         * and insert afterwards because there is no need to re-allocate memory */
  669|  12.9k|        igraph_vector_int_remove(oldfromvec, oldpos);
  670|  12.9k|        if (oldpos < newpos) {
  ------------------
  |  Branch (670:13): [True: 6.90k, False: 6.02k]
  ------------------
  671|  6.90k|            --newpos;
  672|  6.90k|        }
  673|  12.9k|        IGRAPH_CHECK(igraph_vector_int_insert(newfromvec, newpos, newto));
  ------------------
  |  |  656|  12.9k|    do { \
  |  |  657|  12.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  12.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  12.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  12.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 12.9k]
  |  |  ------------------
  ------------------
  674|  12.9k|    }
  675|       |
  676|  60.6k|    return IGRAPH_SUCCESS;
  677|       |
  678|  60.6k|}
igraph_inclist_init:
  746|  5.70k|                        igraph_loops_t loops) {
  747|  5.70k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  748|  5.70k|    igraph_vector_int_t degrees;
  749|  5.70k|    int iter = 0;
  750|       |
  751|  5.70k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (751:9): [True: 5.70k, False: 0]
  |  Branch (751:30): [True: 4.51k, False: 1.18k]
  |  Branch (751:52): [True: 0, False: 4.51k]
  ------------------
  752|      0|        IGRAPH_ERROR("Cannot create incidence list view.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  753|      0|    }
  754|       |
  755|  5.70k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (755:9): [True: 5.70k, False: 0]
  ------------------
  756|  5.70k|        mode = IGRAPH_ALL;
  757|  5.70k|    }
  758|       |
  759|  5.70k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  119|  5.70k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  5.70k|    do { \
  |  |  |  |  657|  5.70k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  5.70k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  5.70k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.70k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  5.70k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 5.70k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  5.70k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  5.70k|    do { \
  |  |  |  |  604|  5.70k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  5.70k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  5.70k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  5.70k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 5.70k]
  |  |  |  |  ------------------
  |  |  |  |  608|  5.70k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  5.70k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 5.70k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 5.70k]
  |  |  ------------------
  ------------------
  760|       |    /* igraph_degrees() is fast when loops=true */
  761|  5.70k|    IGRAPH_CHECK(igraph_degree(graph, &degrees, igraph_vss_all(), mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  5.70k|    do { \
  |  |  657|  5.70k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.70k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.70k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.70k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  5.70k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.70k]
  |  |  ------------------
  ------------------
  762|       |
  763|  5.70k|    il->length = no_of_nodes;
  764|  5.70k|    il->incs = IGRAPH_CALLOC(il->length, igraph_vector_int_t);
  ------------------
  |  |   33|  5.70k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  11.4k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 5.70k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 5.70k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 5.70k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  765|  5.70k|    if (il->incs == 0) {
  ------------------
  |  Branch (765:9): [True: 0, False: 5.70k]
  ------------------
  766|      0|        IGRAPH_ERROR("Cannot create incidence list view.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  767|      0|    }
  768|       |
  769|  5.70k|    IGRAPH_FINALLY(igraph_inclist_destroy, il);
  ------------------
  |  |  603|  5.70k|    do { \
  |  |  604|  5.70k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  5.70k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  5.70k|         * incorrect destructor function with the pointer */ \
  |  |  607|  5.70k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 5.70k]
  |  |  ------------------
  |  |  608|  5.70k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  5.70k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 5.70k]
  |  |  ------------------
  ------------------
  770|   930k|    for (igraph_int_t i = 0; i < il->length; i++) {
  ------------------
  |  Branch (770:30): [True: 925k, False: 5.70k]
  ------------------
  771|   925k|        IGRAPH_ALLOW_INTERRUPTION_LIMITED(iter, 1000);
  ------------------
  |  |   71|   925k|    do { \
  |  |   72|   925k|        if (++iter >= skips) { \
  |  |  ------------------
  |  |  |  Branch (72:13): [True: 0, False: 925k]
  |  |  ------------------
  |  |   73|      0|            IGRAPH_ALLOW_INTERRUPTION(); \
  |  |  ------------------
  |  |  |  |   46|      0|    do { \
  |  |  |  |   47|      0|        if (igraph_i_interruption_handler) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (47:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |  |  |   50|      0|            } \
  |  |  |  |   51|      0|        } \
  |  |  |  |   52|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   74|      0|            iter = 0; \
  |  |   75|      0|        } \
  |  |   76|   925k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (76:14): [Folded, False: 925k]
  |  |  ------------------
  ------------------
  772|       |
  773|   925k|        IGRAPH_CHECK(igraph_vector_int_init(&il->incs[i], VECTOR(degrees)[i]));
  ------------------
  |  |  656|   925k|    do { \
  |  |  657|   925k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   925k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   925k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 925k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   925k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 925k]
  |  |  ------------------
  ------------------
  774|   925k|        IGRAPH_CHECK(igraph_incident(graph, &il->incs[i], i, mode, loops));
  ------------------
  |  |  656|   925k|    do { \
  |  |  657|   925k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   925k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   925k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 925k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   925k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 925k]
  |  |  ------------------
  ------------------
  775|   925k|    }
  776|       |
  777|  5.70k|    igraph_vector_int_destroy(&degrees);
  778|  5.70k|    IGRAPH_FINALLY_CLEAN(2); /* + igraph_inclist_destroy */
  779|       |
  780|  5.70k|    return IGRAPH_SUCCESS;
  781|  5.70k|}
igraph_inclist_destroy:
  825|  5.70k|void igraph_inclist_destroy(igraph_inclist_t *il) {
  826|   930k|    for (igraph_int_t i = 0; i < il->length; i++) {
  ------------------
  |  Branch (826:30): [True: 925k, False: 5.70k]
  ------------------
  827|       |        /* This works if some igraph_vector_int_t's contain NULL,
  828|       |           because igraph_vector_int_destroy can handle this. */
  829|   925k|        igraph_vector_int_destroy(&il->incs[i]);
  830|   925k|    }
  831|       |    IGRAPH_FREE(il->incs);
  ------------------
  |  |   36|  5.70k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  832|  5.70k|}
igraph_lazy_adjlist_init:
 1070|  11.2k|                             igraph_bool_t multiple) {
 1071|  11.2k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1071:9): [True: 11.2k, False: 0]
  |  Branch (1071:30): [True: 9.02k, False: 2.25k]
  |  Branch (1071:52): [True: 0, False: 9.02k]
  ------------------
 1072|      0|        IGRAPH_ERROR("Cannot create lazy adjacency list view.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1073|      0|    }
 1074|       |
 1075|  11.2k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1075:9): [True: 11.2k, False: 0]
  ------------------
 1076|  11.2k|        mode = IGRAPH_ALL;
 1077|  11.2k|    }
 1078|       |
 1079|       |    /* if we already know there are no multi-edges, they don't need to be removed */
 1080|  11.2k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MULTI) &&
  ------------------
  |  Branch (1080:9): [True: 11.2k, False: 2]
  ------------------
 1081|  11.2k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_MULTI)) {
  ------------------
  |  Branch (1081:9): [True: 7.25k, False: 4.03k]
  ------------------
 1082|       |
 1083|       |        /* special case: if the graph is directed, but we are ignoring edge directions,
 1084|       |         * mutual edges also act as multi-edges */
 1085|  7.25k|        if (igraph_is_directed(graph) && mode == IGRAPH_ALL) {
  ------------------
  |  Branch (1085:13): [True: 0, False: 7.25k]
  |  Branch (1085:42): [True: 0, False: 0]
  ------------------
 1086|      0|            if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MUTUAL) &&
  ------------------
  |  Branch (1086:17): [True: 0, False: 0]
  ------------------
 1087|      0|                !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_MUTUAL)) {
  ------------------
  |  Branch (1087:17): [True: 0, False: 0]
  ------------------
 1088|      0|                multiple = IGRAPH_MULTIPLE;
 1089|      0|            }
 1090|  7.25k|        } else {
 1091|  7.25k|            multiple = IGRAPH_MULTIPLE;
 1092|  7.25k|        }
 1093|  7.25k|    }
 1094|       |
 1095|       |    /* if we already know there are no loops, they don't need to be removed */
 1096|  11.2k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (1096:9): [True: 11.2k, False: 2]
  ------------------
 1097|  11.2k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (1097:9): [True: 7.15k, False: 4.13k]
  ------------------
 1098|  7.15k|        if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (1098:13): [True: 7.15k, False: 0]
  ------------------
 1099|  7.15k|            loops = IGRAPH_LOOPS_TWICE;
 1100|  7.15k|        } else {
 1101|      0|            loops = IGRAPH_LOOPS_ONCE;
 1102|      0|        }
 1103|  7.15k|    }
 1104|       |
 1105|  11.2k|    al->mode = mode;
 1106|  11.2k|    al->loops = loops;
 1107|  11.2k|    al->multiple = multiple;
 1108|  11.2k|    al->graph = graph;
 1109|       |
 1110|  11.2k|    al->length = igraph_vcount(graph);
 1111|  11.2k|    al->adjs = IGRAPH_CALLOC(al->length, igraph_vector_int_t*);
  ------------------
  |  |   33|  11.2k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  22.5k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 11.2k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 11.2k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 11.2k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1112|  11.2k|    IGRAPH_CHECK_OOM(al->adjs, "Insufficient memory for creating lazy adjacency list view.");
  ------------------
  |  |  709|  11.2k|    do { \
  |  |  710|  11.2k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  11.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 11.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  11.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 11.2k]
  |  |  ------------------
  ------------------
 1113|       |
 1114|  11.2k|    return IGRAPH_SUCCESS;
 1115|  11.2k|}
igraph_lazy_adjlist_destroy:
 1127|  11.2k|void igraph_lazy_adjlist_destroy(igraph_lazy_adjlist_t *al) {
 1128|  11.2k|    igraph_lazy_adjlist_clear(al);
 1129|       |    IGRAPH_FREE(al->adjs);
  ------------------
  |  |   36|  11.2k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1130|  11.2k|}
igraph_lazy_adjlist_clear:
 1140|  11.2k|void igraph_lazy_adjlist_clear(igraph_lazy_adjlist_t *al) {
 1141|  11.2k|    igraph_int_t i, n = al->length;
 1142|  1.94M|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (1142:17): [True: 1.93M, False: 11.2k]
  ------------------
 1143|  1.93M|        if (al->adjs[i] != 0) {
  ------------------
  |  Branch (1143:13): [True: 1.18M, False: 748k]
  ------------------
 1144|  1.18M|            igraph_vector_int_destroy(al->adjs[i]);
 1145|       |            IGRAPH_FREE(al->adjs[i]);
  ------------------
  |  |   36|  1.18M|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1146|  1.18M|        }
 1147|  1.93M|    }
 1148|  11.2k|}
igraph_i_lazy_adjlist_get_real:
 1163|  1.18M|igraph_vector_int_t *igraph_i_lazy_adjlist_get_real(igraph_lazy_adjlist_t *al, igraph_int_t no) {
 1164|  1.18M|    igraph_error_t ret;
 1165|       |
 1166|  1.18M|    if (al->adjs[no] == NULL) {
  ------------------
  |  Branch (1166:9): [True: 1.18M, False: 0]
  ------------------
 1167|  1.18M|        al->adjs[no] = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   33|  1.18M|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  2.37M|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 1.18M, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1168|  1.18M|        if (al->adjs[no] == NULL) {
  ------------------
  |  Branch (1168:13): [True: 0, False: 1.18M]
  ------------------
 1169|      0|            return NULL;
 1170|      0|        }
 1171|       |
 1172|  1.18M|        ret = igraph_vector_int_init(al->adjs[no], 0);
 1173|  1.18M|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1173:13): [True: 0, False: 1.18M]
  ------------------
 1174|      0|            IGRAPH_FREE(al->adjs[no]);
  ------------------
  |  |   36|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1175|      0|            return NULL;
 1176|      0|        }
 1177|       |
 1178|  1.18M|        ret = igraph_neighbors(al->graph, al->adjs[no], no, al->mode, al->loops, al->multiple);
 1179|  1.18M|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1179:13): [True: 0, False: 1.18M]
  ------------------
 1180|      0|            igraph_vector_int_destroy(al->adjs[no]);
 1181|      0|            IGRAPH_FREE(al->adjs[no]);
  ------------------
  |  |   36|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1182|      0|            return NULL;
 1183|      0|        }
 1184|  1.18M|    }
 1185|       |
 1186|  1.18M|    return al->adjs[no];
 1187|  1.18M|}
igraph_lazy_inclist_init:
 1232|  2.25k|                             igraph_loops_t loops) {
 1233|       |
 1234|  2.25k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1234:9): [True: 2.25k, False: 0]
  |  Branch (1234:30): [True: 0, False: 2.25k]
  |  Branch (1234:52): [True: 0, False: 0]
  ------------------
 1235|      0|        IGRAPH_ERROR("Cannot create lazy incidence list view", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1236|      0|    }
 1237|       |
 1238|  2.25k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1238:9): [True: 2.25k, False: 0]
  ------------------
 1239|  2.25k|        mode = IGRAPH_ALL;
 1240|  2.25k|    }
 1241|       |
 1242|  2.25k|    il->graph = graph;
 1243|  2.25k|    il->loops = loops;
 1244|  2.25k|    il->mode = mode;
 1245|       |
 1246|  2.25k|    il->length = igraph_vcount(graph);
 1247|  2.25k|    il->incs = IGRAPH_CALLOC(il->length, igraph_vector_int_t*);
  ------------------
  |  |   33|  2.25k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.51k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.25k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.25k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.25k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1248|  2.25k|    if (il->incs == 0) {
  ------------------
  |  Branch (1248:9): [True: 0, False: 2.25k]
  ------------------
 1249|      0|        IGRAPH_ERROR("Cannot create lazy incidence list view", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1250|      0|    }
 1251|       |
 1252|  2.25k|    return IGRAPH_SUCCESS;
 1253|       |
 1254|  2.25k|}
igraph_lazy_inclist_destroy:
 1267|  2.25k|void igraph_lazy_inclist_destroy(igraph_lazy_inclist_t *il) {
 1268|  2.25k|    igraph_lazy_inclist_clear(il);
 1269|       |    IGRAPH_FREE(il->incs);
  ------------------
  |  |   36|  2.25k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1270|  2.25k|}
igraph_lazy_inclist_clear:
 1281|  2.25k|void igraph_lazy_inclist_clear(igraph_lazy_inclist_t *il) {
 1282|  2.25k|    igraph_int_t i, n = il->length;
 1283|   389k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (1283:17): [True: 386k, False: 2.25k]
  ------------------
 1284|   386k|        if (il->incs[i] != 0) {
  ------------------
  |  Branch (1284:13): [True: 39.8k, False: 346k]
  ------------------
 1285|  39.8k|            igraph_vector_int_destroy(il->incs[i]);
 1286|       |            IGRAPH_FREE(il->incs[i]);
  ------------------
  |  |   36|  39.8k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1287|  39.8k|        }
 1288|   386k|    }
 1289|  2.25k|}
igraph_i_lazy_inclist_get_real:
 1304|  39.8k|igraph_vector_int_t *igraph_i_lazy_inclist_get_real(igraph_lazy_inclist_t *il, igraph_int_t no) {
 1305|  39.8k|    igraph_error_t ret;
 1306|       |
 1307|  39.8k|    if (il->incs[no] == NULL) {
  ------------------
  |  Branch (1307:9): [True: 39.8k, False: 0]
  ------------------
 1308|  39.8k|        il->incs[no] = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   33|  39.8k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  79.6k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 39.8k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1309|  39.8k|        if (il->incs[no] == NULL) {
  ------------------
  |  Branch (1309:13): [True: 0, False: 39.8k]
  ------------------
 1310|      0|            return NULL;
 1311|      0|        }
 1312|       |
 1313|  39.8k|        ret = igraph_vector_int_init(il->incs[no], 0);
 1314|  39.8k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1314:13): [True: 0, False: 39.8k]
  ------------------
 1315|      0|            IGRAPH_FREE(il->incs[no]);
  ------------------
  |  |   36|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1316|      0|            return NULL;
 1317|      0|        }
 1318|       |
 1319|  39.8k|        ret = igraph_incident(il->graph, il->incs[no], no, il->mode, il->loops);
 1320|  39.8k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1320:13): [True: 0, False: 39.8k]
  ------------------
 1321|      0|            igraph_vector_int_destroy(il->incs[no]);
 1322|      0|            IGRAPH_FREE(il->incs[no]);
  ------------------
  |  |   36|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1323|      0|            return NULL;
 1324|      0|        }
 1325|  39.8k|    }
 1326|       |
 1327|  39.8k|    return il->incs[no];
 1328|  39.8k|}
adjlist.c:igraph_i_simplify_sorted_int_adjacency_vector_in_place:
  871|  1.35M|) {
  872|  1.35M|    igraph_bool_t dummy1 = true, dummy2 = true; /* set dummies to avoid uninitialized read */
  873|  1.35M|    if (has_loops == NULL) {
  ------------------
  |  Branch (873:9): [True: 0, False: 1.35M]
  ------------------
  874|      0|        has_loops = &dummy1;
  875|      0|    }
  876|  1.35M|    if (has_multiple == NULL) {
  ------------------
  |  Branch (876:9): [True: 0, False: 1.35M]
  ------------------
  877|      0|        has_multiple = &dummy2;
  878|      0|    }
  879|       |
  880|  1.35M|    igraph_int_t i, p = 0;
  881|  1.35M|    igraph_int_t n = igraph_vector_int_size(v);
  882|       |
  883|  1.35M|    multiple = !!multiple; /* normalize Boolean value to enable == comparisons below */
  884|       |
  885|  1.35M|    if (
  886|  1.35M|        multiple == IGRAPH_MULTIPLE &&
  ------------------
  |  Branch (886:9): [True: 841k, False: 513k]
  ------------------
  887|   841k|        (
  888|   841k|            loops == IGRAPH_LOOPS_TWICE ||
  ------------------
  |  Branch (888:13): [True: 599k, False: 241k]
  ------------------
  889|   241k|            (loops == IGRAPH_LOOPS_ONCE && (mode == IGRAPH_IN || mode == IGRAPH_OUT))
  ------------------
  |  Branch (889:14): [True: 194k, False: 46.5k]
  |  Branch (889:45): [True: 0, False: 194k]
  |  Branch (889:66): [True: 0, False: 194k]
  ------------------
  890|   841k|        )
  891|  1.35M|    ) {
  892|       |        /* nothing to simplify */
  893|   599k|        return IGRAPH_SUCCESS;
  894|   599k|    }
  895|       |
  896|   755k|    if (loops == IGRAPH_NO_LOOPS) {
  ------------------
  |  Branch (896:9): [True: 517k, False: 237k]
  ------------------
  897|   517k|        if (multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (897:13): [True: 470k, False: 46.5k]
  ------------------
  898|       |            /* We need to get rid of loops and multiple edges completely */
  899|   694k|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (899:25): [True: 223k, False: 470k]
  ------------------
  900|   223k|                if (VECTOR(*v)[i] != index &&
  ------------------
  |  |   60|   223k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (900:21): [True: 164k, False: 59.6k]
  ------------------
  901|   164k|                    (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i])) {
  ------------------
  |  |   60|  92.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i])) {
  ------------------
  |  |   60|  92.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (901:22): [True: 71.3k, False: 92.7k]
  |  Branch (901:36): [True: 61.4k, False: 31.3k]
  ------------------
  902|   132k|                    VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|   132k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|   132k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  903|   132k|                    p++;
  904|   132k|                } else {
  905|  90.9k|                    if (VECTOR(*v)[i] == index) {
  ------------------
  |  |   60|  90.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (905:25): [True: 59.6k, False: 31.3k]
  ------------------
  906|  59.6k|                        *has_loops = true;
  907|       |                        /* If we haven't found multi-edges yet, we also need to check
  908|       |                         * if this is a multi-loop, to set 'has_multiple' correctly. */
  909|  59.6k|                        if (! *has_multiple) {
  ------------------
  |  Branch (909:29): [True: 2.30k, False: 57.3k]
  ------------------
  910|  2.30k|                            if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (910:33): [True: 2.30k, False: 0]
  ------------------
  911|       |                                /* Undirected loops appear twice in the neighbour list,
  912|       |                                 * so we check two following items instead of one. */
  913|  2.30k|                                if (i < n - 2 &&
  ------------------
  |  Branch (913:37): [True: 1.32k, False: 979]
  ------------------
  914|  1.32k|                                    VECTOR(*v)[i + 1] == VECTOR(*v)[i] &&
  ------------------
  |  |   60|  1.32k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                                  VECTOR(*v)[i + 1] == VECTOR(*v)[i] &&
  ------------------
  |  |   60|  1.32k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (914:37): [True: 1.08k, False: 243]
  ------------------
  915|  1.08k|                                    VECTOR(*v)[i + 2] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|  1.08k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                                  VECTOR(*v)[i + 2] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|  1.08k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (915:37): [True: 708, False: 374]
  ------------------
  916|    708|                                    *has_multiple = true;
  917|    708|                                }
  918|  2.30k|                            } else {
  919|      0|                                if (i != n - 1 && VECTOR(*v)[i + 1] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                              if (i != n - 1 && VECTOR(*v)[i + 1] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (919:37): [True: 0, False: 0]
  |  Branch (919:51): [True: 0, False: 0]
  ------------------
  920|      0|                                    *has_multiple = true;
  921|      0|                                }
  922|      0|                            }
  923|  2.30k|                        }
  924|  59.6k|                    } else if (i != n - 1 && VECTOR(*v)[i + 1] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|  31.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  } else if (i != n - 1 && VECTOR(*v)[i + 1] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|  31.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (924:32): [True: 31.3k, False: 0]
  |  Branch (924:46): [True: 31.3k, False: 0]
  ------------------
  925|  31.3k|                        *has_multiple = true;
  926|  31.3k|                    }
  927|  90.9k|                }
  928|   223k|            }
  929|   470k|        } else {
  930|       |            /* We need to get rid of loops but keep multiple edges */
  931|  61.1k|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (931:25): [True: 14.6k, False: 46.5k]
  ------------------
  932|  14.6k|                if (VECTOR(*v)[i] != index) {
  ------------------
  |  |   60|  14.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (932:21): [True: 13.7k, False: 866]
  ------------------
  933|  13.7k|                    VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|  13.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|  13.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  934|  13.7k|                    p++;
  935|  13.7k|                } else {
  936|    866|                    *has_loops = true;
  937|    866|                }
  938|  14.6k|            }
  939|  46.5k|        }
  940|   517k|    } else if (loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (940:16): [True: 194k, False: 43.0k]
  ------------------
  941|   194k|        if (multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (941:13): [True: 0, False: 194k]
  ------------------
  942|       |            /* We need to get rid of multiple edges completely (including
  943|       |             * multiple loop edges), but keep one edge from each loop edge */
  944|      0|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (944:25): [True: 0, False: 0]
  ------------------
  945|      0|                if (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (945:21): [True: 0, False: 0]
  |  Branch (945:35): [True: 0, False: 0]
  ------------------
  946|      0|                    VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  947|      0|                    p++;
  948|      0|                } else if (
  949|       |                        /* If this is not a loop then we have a multigraph.
  950|       |                           Else we have at least two loops.
  951|       |                           The v vector comes from a call to igraph_neighbors.
  952|       |                           This will count loops twice if mode == IGRAPH_ALL.
  953|       |                           So if mode != IGRAPH_ALL,
  954|       |                           then we have a multigraph.
  955|       |                           If mode == IGRAPH_ALL and we have three loops
  956|       |                           then we also have a multigraph
  957|       |                           */
  958|      0|                        (VECTOR(*v)[i] != index) ||
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (958:25): [True: 0, False: 0]
  ------------------
  959|      0|                       (mode != IGRAPH_ALL)  ||
  ------------------
  |  Branch (959:24): [True: 0, False: 0]
  ------------------
  960|      0|                       (mode == IGRAPH_ALL && i < n - 2 && VECTOR(*v)[i + 2] == VECTOR(*v)[i])
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                     (mode == IGRAPH_ALL && i < n - 2 && VECTOR(*v)[i + 2] == VECTOR(*v)[i])
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (960:25): [True: 0, False: 0]
  |  Branch (960:47): [True: 0, False: 0]
  |  Branch (960:60): [True: 0, False: 0]
  ------------------
  961|      0|                       ){
  962|      0|                    *has_multiple = true;
  963|      0|                }
  964|      0|            }
  965|   194k|        } else {
  966|       |            /* We need to keep one edge from each loop edge and we don't need to
  967|       |             * touch multiple edges. Note that we can get here only if
  968|       |             * mode == IGRAPH_ALL; if mode was IGRAPH_IN or IGRAPH_OUT, we would
  969|       |             * have bailed out earlier */
  970|   293k|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (970:25): [True: 99.3k, False: 194k]
  ------------------
  971|  99.3k|                VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|  99.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|  99.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  972|  99.3k|                if (VECTOR(*v)[i] == index) {
  ------------------
  |  |   60|  99.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (972:21): [True: 0, False: 99.3k]
  ------------------
  973|      0|                    *has_loops = true;
  974|       |                    /* this was a loop edge so if the next element is the same, we
  975|       |                    * need to skip that */
  976|      0|                    if (i < n-1 && VECTOR(*v)[i + 1] == index) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (976:25): [True: 0, False: 0]
  |  Branch (976:36): [True: 0, False: 0]
  ------------------
  977|      0|                        i++;
  978|      0|                    }
  979|      0|                }
  980|  99.3k|                p++;
  981|  99.3k|            }
  982|   194k|        }
  983|   194k|    } else if (loops == IGRAPH_LOOPS_TWICE && multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (983:16): [True: 43.0k, False: 0]
  |  Branch (983:47): [True: 43.0k, False: 0]
  ------------------
  984|       |        /* We need to get rid of multiple edges completely (including
  985|       |         * multiple loop edges), but keep both edge from each loop edge */
  986|  65.3k|        for (i = 0; i < n; i++) {
  ------------------
  |  Branch (986:21): [True: 22.2k, False: 43.0k]
  ------------------
  987|  22.2k|            if (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i]) {
  ------------------
  |  |   60|  16.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i]) {
  ------------------
  |  |   60|  16.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (987:17): [True: 5.73k, False: 16.5k]
  |  Branch (987:31): [True: 5.98k, False: 10.5k]
  ------------------
  988|  11.7k|                VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|  11.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|  11.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  989|  11.7k|                p++;
  990|  11.7k|            } else {
  991|  10.5k|                *has_multiple = true;
  992|       |                /* Current item is the same as the next one, but if it is a
  993|       |                 * loop edge, then the first one or two items are okay. We need
  994|       |                 * to keep one if mode == IGRAPH_IN or mode == IGRAPH_OUT,
  995|       |                 * otherwise we need to keep two */
  996|  10.5k|                if (VECTOR(*v)[i] == index) {
  ------------------
  |  |   60|  10.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (996:21): [True: 0, False: 10.5k]
  ------------------
  997|      0|                    VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  998|      0|                    p++;
  999|      0|                    if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (999:25): [True: 0, False: 0]
  ------------------
 1000|      0|                        VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1001|      0|                        p++;
 1002|      0|                    }
 1003|       |                    /* skip over all the items corresponding to the loop edges */
 1004|      0|                    while (i < n && VECTOR(*v)[i] == index) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1004:28): [True: 0, False: 0]
  |  Branch (1004:37): [True: 0, False: 0]
  ------------------
 1005|      0|                        i++;
 1006|      0|                    }
 1007|      0|                    i--; /* because the for loop also increases i by 1 */
 1008|      0|                }
 1009|  10.5k|            }
 1010|  22.2k|        }
 1011|  43.0k|    } else {
 1012|       |        /* TODO; we don't use this combination yet */
 1013|      0|        return IGRAPH_UNIMPLEMENTED;
 1014|      0|    }
 1015|       |
 1016|       |    /* always succeeds since we are never growing the vector */
 1017|   755k|    igraph_vector_int_resize(v, p);
 1018|       |
 1019|   755k|    return IGRAPH_SUCCESS;
 1020|   755k|}

igraph_i_attribute_init:
  617|  38.9k|) {
  618|  38.9k|    graph->attr = NULL;
  619|  38.9k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (619:9): [True: 0, False: 38.9k]
  ------------------
  620|      0|        IGRAPH_CHECK(igraph_i_attribute_table->init(graph, attr));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  621|      0|        if (graph->attr == NULL) {
  ------------------
  |  Branch (621:13): [True: 0, False: 0]
  ------------------
  622|      0|            IGRAPH_ERROR("Attribute handler did not initialize attr pointer", IGRAPH_FAILURE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  623|      0|        }
  624|      0|    }
  625|  38.9k|    return IGRAPH_SUCCESS;
  626|  38.9k|}
igraph_i_attribute_destroy:
  628|  51.9k|void igraph_i_attribute_destroy(igraph_t *graph) {
  629|  51.9k|    if (graph->attr && igraph_i_attribute_table) {
  ------------------
  |  Branch (629:9): [True: 0, False: 51.9k]
  |  Branch (629:24): [True: 0, False: 0]
  ------------------
  630|      0|        igraph_i_attribute_table->destroy(graph);
  631|      0|    }
  632|       |    graph->attr = NULL;
  633|  51.9k|}
igraph_i_attribute_copy:
  636|  7.87k|                            igraph_bool_t va, igraph_bool_t ea) {
  637|  7.87k|    igraph_i_attribute_destroy(to);
  638|  7.87k|    if (from->attr && igraph_i_attribute_table) {
  ------------------
  |  Branch (638:9): [True: 0, False: 7.87k]
  |  Branch (638:23): [True: 0, False: 0]
  ------------------
  639|      0|        IGRAPH_CHECK(igraph_i_attribute_table->copy(to, from, ga, va, ea));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  640|      0|        if (to->attr == NULL) {
  ------------------
  |  Branch (640:13): [True: 0, False: 0]
  ------------------
  641|      0|            IGRAPH_ERROR("Attribute handler did not initialize attr pointer", IGRAPH_FAILURE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  642|      0|        }
  643|      0|    }
  644|  7.87k|    return IGRAPH_SUCCESS;
  645|  7.87k|}
igraph_i_attribute_permute_vertices:
  659|  1.99k|                                        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.99k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (663:9): [True: 0, False: 1.99k]
  ------------------
  664|      0|        return igraph_i_attribute_table->permute_vertices(graph, newgraph, idx);
  665|  1.99k|    } else {
  666|  1.99k|        return IGRAPH_SUCCESS;
  667|  1.99k|    }
  668|  1.99k|}
igraph_i_attribute_permute_edges:
  700|  1.99k|                                     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.99k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (704:9): [True: 0, False: 1.99k]
  ------------------
  705|      0|        return igraph_i_attribute_table->permute_edges(graph, newgraph, idx);
  706|  1.99k|    } else {
  707|  1.99k|        return IGRAPH_SUCCESS;
  708|  1.99k|    }
  709|  1.99k|}

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

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

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

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

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

igraph_empty_attrs:
  102|  38.9k|) {
  103|       |
  104|  38.9k|    if (n < 0) {
  ------------------
  |  Branch (104:9): [True: 0, False: 38.9k]
  ------------------
  105|      0|        IGRAPH_ERROR("Number of vertices must not be negative.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  106|      0|    }
  107|       |
  108|  38.9k|    memset(graph, 0, sizeof(igraph_t));
  109|       |
  110|  38.9k|    graph->n = 0;
  111|  38.9k|    graph->directed = directed;
  112|  38.9k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->from, 0);
  ------------------
  |  |  119|  38.9k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  38.9k|    do { \
  |  |  |  |  657|  38.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  38.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  38.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 38.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  38.9k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 38.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  38.9k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  38.9k|    do { \
  |  |  |  |  604|  38.9k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  38.9k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  38.9k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  38.9k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 38.9k]
  |  |  |  |  ------------------
  |  |  |  |  608|  38.9k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  38.9k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 38.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 38.9k]
  |  |  ------------------
  ------------------
  113|  38.9k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->to, 0);
  ------------------
  |  |  119|  38.9k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  38.9k|    do { \
  |  |  |  |  657|  38.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  38.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  38.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 38.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  38.9k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 38.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  38.9k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  38.9k|    do { \
  |  |  |  |  604|  38.9k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  38.9k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  38.9k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  38.9k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 38.9k]
  |  |  |  |  ------------------
  |  |  |  |  608|  38.9k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  38.9k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 38.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 38.9k]
  |  |  ------------------
  ------------------
  114|  38.9k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->oi, 0);
  ------------------
  |  |  119|  38.9k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  38.9k|    do { \
  |  |  |  |  657|  38.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  38.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  38.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 38.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  38.9k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 38.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  38.9k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  38.9k|    do { \
  |  |  |  |  604|  38.9k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  38.9k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  38.9k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  38.9k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 38.9k]
  |  |  |  |  ------------------
  |  |  |  |  608|  38.9k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  38.9k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 38.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 38.9k]
  |  |  ------------------
  ------------------
  115|  38.9k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->ii, 0);
  ------------------
  |  |  119|  38.9k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  38.9k|    do { \
  |  |  |  |  657|  38.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  38.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  38.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 38.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  38.9k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 38.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  38.9k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  38.9k|    do { \
  |  |  |  |  604|  38.9k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  38.9k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  38.9k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  38.9k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 38.9k]
  |  |  |  |  ------------------
  |  |  |  |  608|  38.9k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  38.9k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 38.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 38.9k]
  |  |  ------------------
  ------------------
  116|  38.9k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->os, 1);
  ------------------
  |  |  119|  38.9k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  38.9k|    do { \
  |  |  |  |  657|  38.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  38.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  38.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 38.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  38.9k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 38.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  38.9k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  38.9k|    do { \
  |  |  |  |  604|  38.9k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  38.9k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  38.9k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  38.9k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 38.9k]
  |  |  |  |  ------------------
  |  |  |  |  608|  38.9k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  38.9k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 38.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 38.9k]
  |  |  ------------------
  ------------------
  117|  38.9k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->is, 1);
  ------------------
  |  |  119|  38.9k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  38.9k|    do { \
  |  |  |  |  657|  38.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  38.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  38.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 38.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  38.9k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 38.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  38.9k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  38.9k|    do { \
  |  |  |  |  604|  38.9k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  38.9k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  38.9k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  38.9k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 38.9k]
  |  |  |  |  ------------------
  |  |  |  |  608|  38.9k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  38.9k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 38.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 38.9k]
  |  |  ------------------
  ------------------
  118|       |
  119|       |    /* init cache */
  120|  38.9k|    graph->cache = IGRAPH_CALLOC(1, igraph_i_property_cache_t);
  ------------------
  |  |   33|  38.9k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  77.9k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 38.9k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  121|  38.9k|    IGRAPH_CHECK_OOM(graph->cache, "Cannot create graph.");
  ------------------
  |  |  709|  38.9k|    do { \
  |  |  710|  38.9k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  38.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 38.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  38.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 38.9k]
  |  |  ------------------
  ------------------
  122|  38.9k|    IGRAPH_FINALLY(igraph_free, graph->cache);
  ------------------
  |  |  603|  38.9k|    do { \
  |  |  604|  38.9k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  38.9k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  38.9k|         * incorrect destructor function with the pointer */ \
  |  |  607|  38.9k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 38.9k]
  |  |  ------------------
  |  |  608|  38.9k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  38.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 38.9k]
  |  |  ------------------
  ------------------
  123|  38.9k|    IGRAPH_CHECK(igraph_i_property_cache_init(graph->cache));
  ------------------
  |  |  656|  38.9k|    do { \
  |  |  657|  38.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  38.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  38.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 38.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  38.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 38.9k]
  |  |  ------------------
  ------------------
  124|  38.9k|    IGRAPH_FINALLY(igraph_i_property_cache_destroy, graph->cache);
  ------------------
  |  |  603|  38.9k|    do { \
  |  |  604|  38.9k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  38.9k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  38.9k|         * incorrect destructor function with the pointer */ \
  |  |  607|  38.9k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 38.9k]
  |  |  ------------------
  |  |  608|  38.9k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  38.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 38.9k]
  |  |  ------------------
  ------------------
  125|       |
  126|  38.9k|    VECTOR(graph->os)[0] = 0;
  ------------------
  |  |   60|  38.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  127|  38.9k|    VECTOR(graph->is)[0] = 0;
  ------------------
  |  |   60|  38.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  128|       |
  129|       |    /* init attributes */
  130|  38.9k|    IGRAPH_CHECK(igraph_i_attribute_init(graph, attr));
  ------------------
  |  |  656|  38.9k|    do { \
  |  |  657|  38.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  38.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  38.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 38.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  38.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 38.9k]
  |  |  ------------------
  ------------------
  131|       |
  132|       |    /* add the vertices */
  133|  38.9k|    IGRAPH_CHECK(igraph_add_vertices(graph, n, 0));
  ------------------
  |  |  656|  38.9k|    do { \
  |  |  657|  38.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  38.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  38.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 38.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  38.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 38.9k]
  |  |  ------------------
  ------------------
  134|       |
  135|  38.9k|    IGRAPH_FINALLY_CLEAN(8);
  136|  38.9k|    return IGRAPH_SUCCESS;
  137|  38.9k|}
igraph_destroy:
  155|  44.0k|void igraph_destroy(igraph_t *graph) {
  156|  44.0k|    igraph_i_attribute_destroy(graph);
  157|       |
  158|  44.0k|    igraph_i_property_cache_destroy(graph->cache);
  159|  44.0k|    IGRAPH_FREE(graph->cache);
  ------------------
  |  |   36|  44.0k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  160|       |
  161|  44.0k|    igraph_vector_int_destroy(&graph->from);
  162|  44.0k|    igraph_vector_int_destroy(&graph->to);
  163|  44.0k|    igraph_vector_int_destroy(&graph->oi);
  164|  44.0k|    igraph_vector_int_destroy(&graph->ii);
  165|  44.0k|    igraph_vector_int_destroy(&graph->os);
  166|  44.0k|    igraph_vector_int_destroy(&graph->is);
  167|  44.0k|}
igraph_copy:
  195|  2.53k|igraph_error_t igraph_copy(igraph_t *to, const igraph_t *from) {
  196|  2.53k|    memset(to, 0, sizeof(igraph_t));
  197|       |
  198|  2.53k|    to->n = from->n;
  199|  2.53k|    to->directed = from->directed;
  200|  2.53k|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->from, &from->from));
  ------------------
  |  |  656|  2.53k|    do { \
  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  201|  2.53k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->from);
  ------------------
  |  |  603|  2.53k|    do { \
  |  |  604|  2.53k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.53k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.53k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.53k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.53k]
  |  |  ------------------
  |  |  608|  2.53k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  202|  2.53k|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->to, &from->to));
  ------------------
  |  |  656|  2.53k|    do { \
  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  203|  2.53k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->to);
  ------------------
  |  |  603|  2.53k|    do { \
  |  |  604|  2.53k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.53k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.53k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.53k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.53k]
  |  |  ------------------
  |  |  608|  2.53k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  204|  2.53k|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->oi, &from->oi));
  ------------------
  |  |  656|  2.53k|    do { \
  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  205|  2.53k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->oi);
  ------------------
  |  |  603|  2.53k|    do { \
  |  |  604|  2.53k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.53k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.53k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.53k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.53k]
  |  |  ------------------
  |  |  608|  2.53k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  206|  2.53k|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->ii, &from->ii));
  ------------------
  |  |  656|  2.53k|    do { \
  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  207|  2.53k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->ii);
  ------------------
  |  |  603|  2.53k|    do { \
  |  |  604|  2.53k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.53k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.53k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.53k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.53k]
  |  |  ------------------
  |  |  608|  2.53k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  208|  2.53k|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->os, &from->os));
  ------------------
  |  |  656|  2.53k|    do { \
  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  209|  2.53k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->os);
  ------------------
  |  |  603|  2.53k|    do { \
  |  |  604|  2.53k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.53k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.53k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.53k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.53k]
  |  |  ------------------
  |  |  608|  2.53k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  210|  2.53k|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->is, &from->is));
  ------------------
  |  |  656|  2.53k|    do { \
  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  211|  2.53k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->is);
  ------------------
  |  |  603|  2.53k|    do { \
  |  |  604|  2.53k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.53k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.53k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.53k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.53k]
  |  |  ------------------
  |  |  608|  2.53k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  212|       |
  213|  2.53k|    to->cache = IGRAPH_CALLOC(1, igraph_i_property_cache_t);
  ------------------
  |  |   33|  2.53k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  5.07k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 2.53k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  214|  2.53k|    IGRAPH_CHECK_OOM(to->cache, "Cannot copy graph.");
  ------------------
  |  |  709|  2.53k|    do { \
  |  |  710|  2.53k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  215|  2.53k|    IGRAPH_FINALLY(igraph_free, to->cache);
  ------------------
  |  |  603|  2.53k|    do { \
  |  |  604|  2.53k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.53k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.53k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.53k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.53k]
  |  |  ------------------
  |  |  608|  2.53k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  216|  2.53k|    IGRAPH_CHECK(igraph_i_property_cache_copy(to->cache, from->cache));
  ------------------
  |  |  656|  2.53k|    do { \
  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  217|  2.53k|    IGRAPH_FINALLY(igraph_i_property_cache_destroy, to->cache);
  ------------------
  |  |  603|  2.53k|    do { \
  |  |  604|  2.53k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.53k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.53k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.53k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.53k]
  |  |  ------------------
  |  |  608|  2.53k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  218|       |
  219|  2.53k|    IGRAPH_CHECK(igraph_i_attribute_copy(to, from, true, true, true));
  ------------------
  |  |  656|  2.53k|    do { \
  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  220|       |
  221|  2.53k|    IGRAPH_FINALLY_CLEAN(8);
  222|  2.53k|    return IGRAPH_SUCCESS;
  223|  2.53k|}
igraph_add_edges:
  257|  41.0k|) {
  258|  41.0k|    igraph_int_t no_of_edges = igraph_vector_int_size(&graph->from);
  259|  41.0k|    igraph_int_t edges_to_add = igraph_vector_int_size(edges) / 2;
  260|  41.0k|    igraph_int_t new_no_of_edges;
  261|  41.0k|    igraph_int_t i = 0;
  262|  41.0k|    igraph_vector_int_t newoi, newii;
  263|  41.0k|    igraph_bool_t directed = igraph_is_directed(graph);
  264|       |
  265|  41.0k|    if (igraph_vector_int_size(edges) % 2 != 0) {
  ------------------
  |  Branch (265:9): [True: 0, False: 41.0k]
  ------------------
  266|      0|        IGRAPH_ERROR("Invalid (odd) length of edges vector.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  267|      0|    }
  268|  41.0k|    if (!igraph_vector_int_isininterval(edges, 0, igraph_vcount(graph) - 1)) {
  ------------------
  |  Branch (268:9): [True: 0, False: 41.0k]
  ------------------
  269|      0|        IGRAPH_ERROR("Out-of-range vertex IDs when adding edges.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  270|      0|    }
  271|       |
  272|       |    /* from & to */
  273|  41.0k|    IGRAPH_SAFE_ADD(no_of_edges, edges_to_add, &new_no_of_edges);
  ------------------
  |  |   47|  41.0k|    do { \
  |  |   48|  41.0k|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  41.0k|        igraph_int_t _safe_sum; \
  |  |   50|  41.0k|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 41.0k]
  |  |  ------------------
  |  |   51|      0|            IGRAPH_ERRORF("Overflow when adding %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  464|      0|    do { \
  |  |  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  467|      0|        return igraph_errno; \
  |  |  |  |  468|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|        } \
  |  |   53|  41.0k|        *(res) = _safe_sum; \
  |  |   54|  41.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded, False: 41.0k]
  |  |  ------------------
  ------------------
  274|  41.0k|    if (new_no_of_edges > IGRAPH_ECOUNT_MAX) {
  ------------------
  |  |  118|  41.0k|#define IGRAPH_ECOUNT_MAX (IGRAPH_INTEGER_MAX/2)
  |  |  ------------------
  |  |  |  |   72|  41.0k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  |  |  ------------------
  ------------------
  |  Branch (274:9): [True: 0, False: 41.0k]
  ------------------
  275|      0|        IGRAPH_ERRORF("Maximum edge count (%" IGRAPH_PRId ") exceeded.", IGRAPH_ERANGE,
  ------------------
  |  |  464|      0|    do { \
  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  467|      0|        return igraph_errno; \
  |  |  468|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  276|      0|                      IGRAPH_ECOUNT_MAX);
  277|      0|    }
  278|  41.0k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->from, no_of_edges + edges_to_add));
  ------------------
  |  |  656|  41.0k|    do { \
  |  |  657|  41.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  41.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  41.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 41.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  41.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 41.0k]
  |  |  ------------------
  ------------------
  279|  41.0k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->to, no_of_edges + edges_to_add));
  ------------------
  |  |  656|  41.0k|    do { \
  |  |  657|  41.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  41.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  41.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 41.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  41.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 41.0k]
  |  |  ------------------
  ------------------
  280|       |
  281|  1.39M|    while (i < edges_to_add * 2) {
  ------------------
  |  Branch (281:12): [True: 1.35M, False: 41.0k]
  ------------------
  282|  1.35M|        if (directed || VECTOR(*edges)[i] > VECTOR(*edges)[i + 1]) {
  ------------------
  |  |   60|  1.35M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (directed || VECTOR(*edges)[i] > VECTOR(*edges)[i + 1]) {
  ------------------
  |  |   60|  1.35M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (282:13): [True: 0, False: 1.35M]
  |  Branch (282:25): [True: 490k, False: 865k]
  ------------------
  283|   490k|            igraph_vector_int_push_back(&graph->from, VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|   490k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  284|   490k|            igraph_vector_int_push_back(&graph->to,   VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|   490k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  285|   865k|        } else {
  286|   865k|            igraph_vector_int_push_back(&graph->to,   VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|   865k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  287|   865k|            igraph_vector_int_push_back(&graph->from, VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|   865k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  288|   865k|        }
  289|  1.35M|    }
  290|       |
  291|       |    /* If an error occurs while the edges are being added, we make the necessary fixup
  292|       |     * to ensure that the graph is still in a consistent state when this function returns.
  293|       |     * The graph may already be on the finally stack when calling this function. We use
  294|       |     * a separate finally stack level to avoid its destructor from being called on error,
  295|       |     * so that the fixup can succeed.
  296|       |     */
  297|       |
  298|  41.0k|#define CHECK_ERR(expr) \
  299|  41.0k|    do { \
  300|  41.0k|        igraph_error_t err = (expr); \
  301|  41.0k|        if (err != IGRAPH_SUCCESS) { \
  302|  41.0k|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  303|  41.0k|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  304|  41.0k|            IGRAPH_FINALLY_EXIT(); \
  305|  41.0k|            IGRAPH_ERROR("Cannot add edges.", err); \
  306|  41.0k|        } \
  307|  41.0k|    } while (0)
  308|       |
  309|       |    /* oi & ii */
  310|  41.0k|    IGRAPH_FINALLY_ENTER();
  311|  41.0k|    {
  312|  41.0k|        CHECK_ERR(igraph_vector_int_init(&newoi, no_of_edges));
  ------------------
  |  |  299|  41.0k|    do { \
  |  |  300|  41.0k|        igraph_error_t err = (expr); \
  |  |  301|  41.0k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (301:13): [True: 0, False: 41.0k]
  |  |  ------------------
  |  |  302|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  303|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  304|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  305|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  306|      0|        } \
  |  |  307|  41.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (307:14): [Folded, False: 41.0k]
  |  |  ------------------
  ------------------
  313|  41.0k|        IGRAPH_FINALLY(igraph_vector_int_destroy, &newoi);
  ------------------
  |  |  603|  41.0k|    do { \
  |  |  604|  41.0k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  41.0k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  41.0k|         * incorrect destructor function with the pointer */ \
  |  |  607|  41.0k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 41.0k]
  |  |  ------------------
  |  |  608|  41.0k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  41.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 41.0k]
  |  |  ------------------
  ------------------
  314|  41.0k|        CHECK_ERR(igraph_vector_int_init(&newii, no_of_edges));
  ------------------
  |  |  299|  41.0k|    do { \
  |  |  300|  41.0k|        igraph_error_t err = (expr); \
  |  |  301|  41.0k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (301:13): [True: 0, False: 41.0k]
  |  |  ------------------
  |  |  302|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  303|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  304|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  305|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  306|      0|        } \
  |  |  307|  41.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (307:14): [Folded, False: 41.0k]
  |  |  ------------------
  ------------------
  315|  41.0k|        IGRAPH_FINALLY(igraph_vector_int_destroy, &newii);
  ------------------
  |  |  603|  41.0k|    do { \
  |  |  604|  41.0k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  41.0k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  41.0k|         * incorrect destructor function with the pointer */ \
  |  |  607|  41.0k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 41.0k]
  |  |  ------------------
  |  |  608|  41.0k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  41.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 41.0k]
  |  |  ------------------
  ------------------
  316|  41.0k|        CHECK_ERR(igraph_vector_int_pair_order(&graph->from, &graph->to, &newoi, graph->n));
  ------------------
  |  |  299|  41.0k|    do { \
  |  |  300|  41.0k|        igraph_error_t err = (expr); \
  |  |  301|  41.0k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (301:13): [True: 0, False: 41.0k]
  |  |  ------------------
  |  |  302|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  303|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  304|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  305|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  306|      0|        } \
  |  |  307|  41.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (307:14): [Folded, False: 41.0k]
  |  |  ------------------
  ------------------
  317|  41.0k|        CHECK_ERR(igraph_vector_int_pair_order(&graph->to, &graph->from, &newii, graph->n));
  ------------------
  |  |  299|  41.0k|    do { \
  |  |  300|  41.0k|        igraph_error_t err = (expr); \
  |  |  301|  41.0k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (301:13): [True: 0, False: 41.0k]
  |  |  ------------------
  |  |  302|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  303|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  304|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  305|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  306|      0|        } \
  |  |  307|  41.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (307:14): [Folded, False: 41.0k]
  |  |  ------------------
  ------------------
  318|       |
  319|       |        /* Attributes */
  320|  41.0k|        if (graph->attr) {
  ------------------
  |  Branch (320:13): [True: 0, False: 41.0k]
  ------------------
  321|       |            /* TODO: Does this keep the attribute table in a consistent state upon failure? */
  322|      0|            CHECK_ERR(igraph_i_attribute_add_edges(graph, edges, attr));
  ------------------
  |  |  299|      0|    do { \
  |  |  300|      0|        igraph_error_t err = (expr); \
  |  |  301|      0|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (301:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  302|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  303|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  304|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  305|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  306|      0|        } \
  |  |  307|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (307:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  323|      0|        }
  324|       |
  325|       |        /* os & is, its length does not change, error safe */
  326|  41.0k|        igraph_i_create_start_vectors(&graph->os, &graph->from, &newoi, graph->n);
  327|  41.0k|        igraph_i_create_start_vectors(&graph->is, &graph->to, &newii, graph->n);
  328|       |
  329|       |        /* everything went fine */
  330|  41.0k|        igraph_vector_int_destroy(&graph->oi);
  331|  41.0k|        igraph_vector_int_destroy(&graph->ii);
  332|  41.0k|        IGRAPH_FINALLY_CLEAN(2);
  333|       |
  334|  41.0k|        graph->oi = newoi;
  335|  41.0k|        graph->ii = newii;
  336|  41.0k|    }
  337|      0|    IGRAPH_FINALLY_EXIT();
  338|       |
  339|  41.0k|#undef CHECK_ERR
  340|       |
  341|       |    /* modification successful, clear the cached properties of the graph.
  342|       |     *
  343|       |     * Adding one or more edges cannot make a strongly or weakly connected
  344|       |     * graph disconnected, so we keep those flags if they are cached as true.
  345|       |     *
  346|       |     * Adding one or more edges may turn a DAG into a non-DAG or a forest into
  347|       |     * a non-forest, so we can keep those flags only if they are cached as
  348|       |     * false.
  349|       |     *
  350|       |     * Also, adding one or more edges does not change HAS_LOOP, HAS_MULTI and
  351|       |     * HAS_MUTUAL if they were already true.
  352|       |     */
  353|  41.0k|    igraph_i_property_cache_invalidate_conditionally(
  354|  41.0k|        graph,
  355|  41.0k|        /* keep_always = */ 0,
  356|       |        /* keep_when_false = */
  357|  41.0k|        (1 << IGRAPH_PROP_IS_DAG) | (1 << IGRAPH_PROP_IS_FOREST),
  358|       |        /* keep_when_true = */
  359|  41.0k|        (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED) |
  360|  41.0k|        (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  361|  41.0k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  362|  41.0k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  363|  41.0k|        (1 << IGRAPH_PROP_HAS_MUTUAL)
  364|  41.0k|    );
  365|       |
  366|  41.0k|    return IGRAPH_SUCCESS;
  367|  41.0k|}
igraph_add_vertices:
  391|  43.0k|) {
  392|  43.0k|    igraph_int_t ec = igraph_ecount(graph);
  393|  43.0k|    igraph_int_t vc = igraph_vcount(graph);
  394|  43.0k|    igraph_int_t new_vc;
  395|  43.0k|    igraph_int_t i;
  396|       |
  397|  43.0k|    if (nv < 0) {
  ------------------
  |  Branch (397:9): [True: 0, False: 43.0k]
  ------------------
  398|      0|        IGRAPH_ERROR("Cannot add negative number of vertices.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  399|      0|    }
  400|       |
  401|  43.0k|    IGRAPH_SAFE_ADD(graph->n, nv, &new_vc);
  ------------------
  |  |   47|  43.0k|    do { \
  |  |   48|  43.0k|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  43.0k|        igraph_int_t _safe_sum; \
  |  |   50|  43.0k|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 43.0k]
  |  |  ------------------
  |  |   51|      0|            IGRAPH_ERRORF("Overflow when adding %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  464|      0|    do { \
  |  |  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  467|      0|        return igraph_errno; \
  |  |  |  |  468|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|        } \
  |  |   53|  43.0k|        *(res) = _safe_sum; \
  |  |   54|  43.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded, False: 43.0k]
  |  |  ------------------
  ------------------
  402|  43.0k|    if (new_vc > IGRAPH_VCOUNT_MAX) {
  ------------------
  |  |  100|  43.0k|#define IGRAPH_VCOUNT_MAX (IGRAPH_INTEGER_MAX-1)
  |  |  ------------------
  |  |  |  |   72|  43.0k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  |  |  ------------------
  ------------------
  |  Branch (402:9): [True: 0, False: 43.0k]
  ------------------
  403|      0|        IGRAPH_ERRORF("Maximum vertex count (%" IGRAPH_PRId ") exceeded.", IGRAPH_ERANGE,
  ------------------
  |  |  464|      0|    do { \
  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  467|      0|        return igraph_errno; \
  |  |  468|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  404|      0|                      IGRAPH_VCOUNT_MAX);
  405|      0|    }
  406|  43.0k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->os, new_vc + 1));
  ------------------
  |  |  656|  43.0k|    do { \
  |  |  657|  43.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  43.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  43.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 43.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  43.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 43.0k]
  |  |  ------------------
  ------------------
  407|  43.0k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->is, new_vc + 1));
  ------------------
  |  |  656|  43.0k|    do { \
  |  |  657|  43.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  43.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  43.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 43.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  43.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 43.0k]
  |  |  ------------------
  ------------------
  408|       |
  409|  43.0k|    igraph_vector_int_resize(&graph->os, new_vc + 1); /* reserved */
  410|  43.0k|    igraph_vector_int_resize(&graph->is, new_vc + 1); /* reserved */
  411|  6.60M|    for (i = graph->n + 1; i < new_vc + 1; i++) {
  ------------------
  |  Branch (411:28): [True: 6.56M, False: 43.0k]
  ------------------
  412|  6.56M|        VECTOR(graph->os)[i] = ec;
  ------------------
  |  |   60|  6.56M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  413|  6.56M|        VECTOR(graph->is)[i] = ec;
  ------------------
  |  |   60|  6.56M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  414|  6.56M|    }
  415|       |
  416|  43.0k|    graph->n += nv;
  417|       |
  418|       |    /* Add attributes if necessary. This section is protected with
  419|       |     * FINALLY_ENTER/EXIT so that the graph would not be accidentally
  420|       |     * free upon error until it could be restored to a consistent state. */
  421|       |
  422|  43.0k|    if (graph->attr) {
  ------------------
  |  Branch (422:9): [True: 0, False: 43.0k]
  ------------------
  423|      0|        igraph_error_t err;
  424|      0|        IGRAPH_FINALLY_ENTER();
  425|      0|        err = igraph_i_attribute_add_vertices(graph, nv, attr);
  426|      0|        if (err != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (426:13): [True: 0, False: 0]
  ------------------
  427|       |            /* Restore original vertex count on failure */
  428|      0|            graph->n = vc;
  429|      0|            igraph_vector_int_resize(&graph->os, vc + 1); /* shrinks */
  430|      0|            igraph_vector_int_resize(&graph->is, vc + 1); /* shrinks */
  431|      0|        }
  432|      0|        IGRAPH_FINALLY_EXIT();
  433|      0|        if (err != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (433:13): [True: 0, False: 0]
  ------------------
  434|      0|            IGRAPH_ERROR("Cannot add vertices.", err);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  435|      0|        }
  436|      0|    }
  437|       |
  438|       |    /* modification successful, clear the cached properties of the graph.
  439|       |     *
  440|       |     * Adding one or more nodes does not change the following cached properties:
  441|       |     *
  442|       |     * - IGRAPH_PROP_HAS_LOOP
  443|       |     * - IGRAPH_PROP_HAS_MULTI
  444|       |     * - IGRAPH_PROP_HAS_MUTUAL
  445|       |     * - IGRAPH_PROP_IS_DAG (adding a node does not create/destroy cycles)
  446|       |     * - IGRAPH_PROP_IS_FOREST (same)
  447|       |     *
  448|       |     * Adding one or more nodes without any edges incident on them is sure to
  449|       |     * make the graph disconnected (weakly or strongly), so we can keep the
  450|       |     * connectivity-related properties if they are currently cached as false.
  451|       |     * (Actually, even if they weren't cached as false, we could still set them
  452|       |     * to false, but we don't have that functionality yet). The only exception
  453|       |     * is when the graph had zero vertices and gained only one vertex, because
  454|       |     * it then becomes connected. That's why we have the condition below in the
  455|       |     * keep_when_false section.
  456|       |     */
  457|  43.0k|    igraph_i_property_cache_invalidate_conditionally(
  458|  43.0k|        graph,
  459|       |        /* keep_always = */
  460|  43.0k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  461|  43.0k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  462|  43.0k|        (1 << IGRAPH_PROP_HAS_MUTUAL) |
  463|  43.0k|        (1 << IGRAPH_PROP_IS_DAG) |
  464|  43.0k|        (1 << IGRAPH_PROP_IS_FOREST),
  465|       |        /* keep_when_false = */
  466|  43.0k|        igraph_vcount(graph) >= 2 ? (
  ------------------
  |  Branch (466:9): [True: 42.3k, False: 696]
  ------------------
  467|  42.3k|            (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  468|  42.3k|            (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED)
  469|  42.3k|        ) : 0,
  470|       |        /* keep_when_true = */
  471|  43.0k|        0
  472|  43.0k|    );
  473|       |
  474|  43.0k|    return IGRAPH_SUCCESS;
  475|  43.0k|}
igraph_delete_edges:
  500|  7.47k|igraph_error_t igraph_delete_edges(igraph_t *graph, igraph_es_t edges) {
  501|  7.47k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  502|  7.47k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  503|  7.47k|    igraph_int_t edges_to_remove = 0;
  504|  7.47k|    igraph_int_t remaining_edges;
  505|  7.47k|    igraph_eit_t eit;
  506|       |
  507|  7.47k|    igraph_vector_int_t newfrom, newto;
  508|  7.47k|    igraph_vector_int_t newoi, newii;
  509|       |
  510|  7.47k|    igraph_bool_t *mark;
  511|  7.47k|    igraph_int_t i, j;
  512|       |
  513|  7.47k|    mark = IGRAPH_CALLOC(no_of_edges, igraph_bool_t);
  ------------------
  |  |   33|  7.47k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  14.9k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 7.47k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 7.47k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 7.37k, False: 98]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  514|  7.47k|    IGRAPH_CHECK_OOM(mark, "Cannot delete edges.");
  ------------------
  |  |  709|  7.47k|    do { \
  |  |  710|  7.47k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  7.47k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  7.47k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 7.47k]
  |  |  ------------------
  ------------------
  515|  7.47k|    IGRAPH_FINALLY(igraph_free, mark);
  ------------------
  |  |  603|  7.47k|    do { \
  |  |  604|  7.47k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  7.47k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  7.47k|         * incorrect destructor function with the pointer */ \
  |  |  607|  7.47k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 7.47k]
  |  |  ------------------
  |  |  608|  7.47k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  7.47k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 7.47k]
  |  |  ------------------
  ------------------
  516|       |
  517|  7.47k|    IGRAPH_CHECK(igraph_eit_create(graph, edges, &eit));
  ------------------
  |  |  656|  7.47k|    do { \
  |  |  657|  7.47k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  7.47k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  7.47k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  7.47k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 7.47k]
  |  |  ------------------
  ------------------
  518|  7.47k|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  603|  7.47k|    do { \
  |  |  604|  7.47k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  7.47k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  7.47k|         * incorrect destructor function with the pointer */ \
  |  |  607|  7.47k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 7.47k]
  |  |  ------------------
  |  |  608|  7.47k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  7.47k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 7.47k]
  |  |  ------------------
  ------------------
  519|       |
  520|  93.6k|    for (IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  393|  7.47k|#define IGRAPH_EIT_RESET(eit) ((eit).pos = (eit).start)
  ------------------
                  for (IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  371|  93.6k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                  for (IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  359|  86.1k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (520:33): [True: 86.1k, False: 7.47k]
  ------------------
  521|  86.1k|        igraph_int_t e = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|  86.1k|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 51.9k, False: 34.2k]
  |  |  ------------------
  |  |  406|  86.1k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|  34.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  522|  86.1k|        if (! mark[e]) {
  ------------------
  |  Branch (522:13): [True: 86.1k, False: 0]
  ------------------
  523|  86.1k|            edges_to_remove++;
  524|  86.1k|            mark[e] = true;
  525|  86.1k|        }
  526|  86.1k|    }
  527|  7.47k|    remaining_edges = no_of_edges - edges_to_remove;
  528|       |
  529|       |    /* We don't need the iterator any more */
  530|  7.47k|    igraph_eit_destroy(&eit);
  531|  7.47k|    IGRAPH_FINALLY_CLEAN(1);
  532|       |
  533|  7.47k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newfrom, remaining_edges);
  ------------------
  |  |  119|  7.47k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  7.47k|    do { \
  |  |  |  |  657|  7.47k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  7.47k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  7.47k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.47k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  7.47k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 7.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  7.47k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  7.47k|    do { \
  |  |  |  |  604|  7.47k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  7.47k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  7.47k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  7.47k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 7.47k]
  |  |  |  |  ------------------
  |  |  |  |  608|  7.47k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  7.47k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 7.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 7.47k]
  |  |  ------------------
  ------------------
  534|  7.47k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newto, remaining_edges);
  ------------------
  |  |  119|  7.47k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  7.47k|    do { \
  |  |  |  |  657|  7.47k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  7.47k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  7.47k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.47k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  7.47k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 7.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  7.47k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  7.47k|    do { \
  |  |  |  |  604|  7.47k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  7.47k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  7.47k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  7.47k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 7.47k]
  |  |  |  |  ------------------
  |  |  |  |  608|  7.47k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  7.47k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 7.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 7.47k]
  |  |  ------------------
  ------------------
  535|       |
  536|       |    /* Actually remove the edges, move from pos i to pos j in newfrom/newto */
  537|   151k|    for (i = 0, j = 0; j < remaining_edges; i++) {
  ------------------
  |  Branch (537:24): [True: 144k, False: 7.47k]
  ------------------
  538|   144k|        if (! mark[i]) {
  ------------------
  |  Branch (538:13): [True: 117k, False: 26.5k]
  ------------------
  539|   117k|            VECTOR(newfrom)[j] = VECTOR(graph->from)[i];
  ------------------
  |  |   60|   117k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newfrom)[j] = VECTOR(graph->from)[i];
  ------------------
  |  |   60|   117k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  540|   117k|            VECTOR(newto)[j] = VECTOR(graph->to)[i];
  ------------------
  |  |   60|   117k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newto)[j] = VECTOR(graph->to)[i];
  ------------------
  |  |   60|   117k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  541|   117k|            j++;
  542|   117k|        }
  543|   144k|    }
  544|       |
  545|       |    /* Create index, this might require additional memory */
  546|  7.47k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newoi, remaining_edges);
  ------------------
  |  |  119|  7.47k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  7.47k|    do { \
  |  |  |  |  657|  7.47k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  7.47k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  7.47k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.47k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  7.47k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 7.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  7.47k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  7.47k|    do { \
  |  |  |  |  604|  7.47k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  7.47k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  7.47k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  7.47k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 7.47k]
  |  |  |  |  ------------------
  |  |  |  |  608|  7.47k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  7.47k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 7.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 7.47k]
  |  |  ------------------
  ------------------
  547|  7.47k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newii, remaining_edges);
  ------------------
  |  |  119|  7.47k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  7.47k|    do { \
  |  |  |  |  657|  7.47k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  7.47k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  7.47k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.47k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  7.47k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 7.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  7.47k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  7.47k|    do { \
  |  |  |  |  604|  7.47k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  7.47k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  7.47k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  7.47k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 7.47k]
  |  |  |  |  ------------------
  |  |  |  |  608|  7.47k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  7.47k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 7.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 7.47k]
  |  |  ------------------
  ------------------
  548|  7.47k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newfrom, &newto, &newoi, no_of_nodes));
  ------------------
  |  |  656|  7.47k|    do { \
  |  |  657|  7.47k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  7.47k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  7.47k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  7.47k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 7.47k]
  |  |  ------------------
  ------------------
  549|  7.47k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newto, &newfrom, &newii, no_of_nodes));
  ------------------
  |  |  656|  7.47k|    do { \
  |  |  657|  7.47k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  7.47k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  7.47k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  7.47k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 7.47k]
  |  |  ------------------
  ------------------
  550|       |
  551|       |    /* Edge attributes, we need an index that gives the IDs of the
  552|       |       original edges for every new edge.
  553|       |    */
  554|  7.47k|    if (graph->attr) {
  ------------------
  |  Branch (554:9): [True: 0, False: 7.47k]
  ------------------
  555|      0|        igraph_vector_int_t idx;
  556|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&idx, remaining_edges);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  557|      0|        for (i = 0, j = 0; i < no_of_edges; i++) {
  ------------------
  |  Branch (557:28): [True: 0, False: 0]
  ------------------
  558|      0|            if (! mark[i]) {
  ------------------
  |  Branch (558:17): [True: 0, False: 0]
  ------------------
  559|      0|                VECTOR(idx)[j++] = i;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  560|      0|            }
  561|      0|        }
  562|      0|        IGRAPH_CHECK(igraph_i_attribute_permute_edges(graph, graph, &idx));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  563|      0|        igraph_vector_int_destroy(&idx);
  564|      0|        IGRAPH_FINALLY_CLEAN(1);
  565|      0|    }
  566|       |
  567|       |    /* Ok, we've all memory needed, free the old structure  */
  568|  7.47k|    igraph_vector_int_destroy(&graph->from);
  569|  7.47k|    igraph_vector_int_destroy(&graph->to);
  570|  7.47k|    igraph_vector_int_destroy(&graph->oi);
  571|  7.47k|    igraph_vector_int_destroy(&graph->ii);
  572|  7.47k|    graph->from = newfrom;
  573|  7.47k|    graph->to = newto;
  574|  7.47k|    graph->oi = newoi;
  575|  7.47k|    graph->ii = newii;
  576|  7.47k|    IGRAPH_FINALLY_CLEAN(4);
  577|       |
  578|  7.47k|    IGRAPH_FREE(mark);
  ------------------
  |  |   36|  7.47k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  579|  7.47k|    IGRAPH_FINALLY_CLEAN(1);
  580|       |
  581|       |    /* Create start vectors, no memory is needed for this */
  582|  7.47k|    igraph_i_create_start_vectors(&graph->os, &graph->from, &graph->oi, no_of_nodes);
  583|  7.47k|    igraph_i_create_start_vectors(&graph->is, &graph->to,   &graph->ii, no_of_nodes);
  584|       |
  585|       |    /* modification successful, clear the cached properties of the graph.
  586|       |     *
  587|       |     * Deleting one or more edges cannot make a directed acyclic graph cyclic,
  588|       |     * or an undirected forest into a cyclic graph, so we keep those flags if
  589|       |     * they are cached as true.
  590|       |     *
  591|       |     * Similarly, deleting one or more edges cannot make a disconnected graph
  592|       |     * connected, so we keep the connectivity flags if they are cached as false.
  593|       |     *
  594|       |     * Also, if the graph had no loop edges before the deletion, it will have
  595|       |     * no loop edges after the deletion either. The same applies to reciprocal
  596|       |     * edges or multiple edges as well.
  597|       |     */
  598|  7.47k|    igraph_i_property_cache_invalidate_conditionally(
  599|  7.47k|        graph,
  600|  7.47k|        /* keep_always = */ 0,
  601|       |        /* keep_when_false = */
  602|  7.47k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  603|  7.47k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  604|  7.47k|        (1 << IGRAPH_PROP_HAS_MUTUAL) |
  605|  7.47k|        (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  606|  7.47k|        (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED),
  607|       |        /* keep_when_true = */
  608|  7.47k|        (1 << IGRAPH_PROP_IS_DAG) |
  609|  7.47k|        (1 << IGRAPH_PROP_IS_FOREST)
  610|  7.47k|    );
  611|       |
  612|       |    /* Nothing to deallocate... */
  613|  7.47k|    return IGRAPH_SUCCESS;
  614|  7.47k|}
igraph_delete_vertices_map:
  648|  2.53k|) {
  649|  2.53k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  650|  2.53k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  651|  2.53k|    igraph_vector_int_t edge_recoding, vertex_recoding;
  652|  2.53k|    igraph_vector_int_t *my_vertex_recoding = &vertex_recoding;
  653|  2.53k|    igraph_vit_t vit;
  654|  2.53k|    igraph_t newgraph;
  655|  2.53k|    igraph_int_t i, j;
  656|  2.53k|    igraph_int_t remaining_vertices, remaining_edges;
  657|       |
  658|  2.53k|    if (map) {
  ------------------
  |  Branch (658:9): [True: 278, False: 2.25k]
  ------------------
  659|    278|        my_vertex_recoding = map;
  660|    278|        IGRAPH_CHECK(igraph_vector_int_resize(map, no_of_nodes));
  ------------------
  |  |  656|    278|    do { \
  |  |  657|    278|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    278|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    278|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 278]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    278|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 278]
  |  |  ------------------
  ------------------
  661|    278|        igraph_vector_int_null(map);
  662|  2.25k|    } else {
  663|  2.25k|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vertex_recoding, no_of_nodes);
  ------------------
  |  |  119|  2.25k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.25k|    do { \
  |  |  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.25k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.25k|    do { \
  |  |  |  |  604|  2.25k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.25k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.25k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.25k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.25k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  664|  2.25k|    }
  665|       |
  666|  2.53k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edge_recoding, no_of_edges);
  ------------------
  |  |  119|  2.53k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.53k|    do { \
  |  |  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.53k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.53k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.53k|    do { \
  |  |  |  |  604|  2.53k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.53k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.53k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.53k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.53k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.53k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.53k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  667|       |
  668|  2.53k|    IGRAPH_CHECK(igraph_vit_create(graph, vertices, &vit));
  ------------------
  |  |  656|  2.53k|    do { \
  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  669|  2.53k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  2.53k|    do { \
  |  |  604|  2.53k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.53k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.53k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.53k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.53k]
  |  |  ------------------
  |  |  608|  2.53k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  670|       |
  671|       |    /* mark the vertices to delete */
  672|  11.1k|    for (; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit) ) {
  ------------------
  |  |  179|  11.1k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit) ) {
  ------------------
  |  |  167|  8.58k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (672:12): [True: 8.58k, False: 2.53k]
  ------------------
  673|  8.58k|        igraph_int_t vertex = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  8.58k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 2.25k, False: 6.32k]
  |  |  ------------------
  |  |  215|  8.58k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|  6.32k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  674|  8.58k|        if (vertex < 0 || vertex >= no_of_nodes) {
  ------------------
  |  Branch (674:13): [True: 0, False: 8.58k]
  |  Branch (674:27): [True: 0, False: 8.58k]
  ------------------
  675|      0|            IGRAPH_ERROR("Cannot delete vertices.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  676|      0|        }
  677|  8.58k|        VECTOR(*my_vertex_recoding)[vertex] = 1;
  ------------------
  |  |   60|  8.58k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  678|  8.58k|    }
  679|       |    /* create vertex recoding vector */
  680|   418k|    for (remaining_vertices = 0, i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (680:41): [True: 416k, False: 2.53k]
  ------------------
  681|   416k|        if (VECTOR(*my_vertex_recoding)[i] == 0) {
  ------------------
  |  |   60|   416k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (681:13): [True: 407k, False: 8.58k]
  ------------------
  682|   407k|            VECTOR(*my_vertex_recoding)[i] = remaining_vertices;
  ------------------
  |  |   60|   407k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  683|   407k|            remaining_vertices++;
  684|   407k|        } else {
  685|  8.58k|            VECTOR(*my_vertex_recoding)[i] = -1;
  ------------------
  |  |   60|  8.58k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  686|  8.58k|        }
  687|   416k|    }
  688|       |    /* create edge recoding vector */
  689|  77.1k|    for (remaining_edges = 0, i = 0; i < no_of_edges; i++) {
  ------------------
  |  Branch (689:38): [True: 74.6k, False: 2.53k]
  ------------------
  690|  74.6k|        igraph_int_t from = VECTOR(graph->from)[i];
  ------------------
  |  |   60|  74.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  691|  74.6k|        igraph_int_t to = VECTOR(graph->to)[i];
  ------------------
  |  |   60|  74.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  692|  74.6k|        if (VECTOR(*my_vertex_recoding)[from] >= 0 &&
  ------------------
  |  |   60|  74.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (692:13): [True: 74.0k, False: 583]
  ------------------
  693|  74.0k|            VECTOR(*my_vertex_recoding)[to  ] >= 0) {
  ------------------
  |  |   60|  74.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (693:13): [True: 69.8k, False: 4.18k]
  ------------------
  694|  69.8k|            VECTOR(edge_recoding)[i] = remaining_edges + 1;
  ------------------
  |  |   60|  69.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  695|  69.8k|            remaining_edges++;
  696|  69.8k|        }
  697|  74.6k|    }
  698|       |
  699|       |    /* start creating the graph */
  700|  2.53k|    memset(&newgraph, 0, sizeof(igraph_t));
  701|  2.53k|    newgraph.n = remaining_vertices;
  702|  2.53k|    newgraph.directed = graph->directed;
  703|       |
  704|       |    /* allocate vectors */
  705|  2.53k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.from, remaining_edges);
  ------------------
  |  |  119|  2.53k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.53k|    do { \
  |  |  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.53k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.53k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.53k|    do { \
  |  |  |  |  604|  2.53k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.53k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.53k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.53k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.53k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.53k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.53k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  706|  2.53k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.to, remaining_edges);
  ------------------
  |  |  119|  2.53k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.53k|    do { \
  |  |  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.53k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.53k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.53k|    do { \
  |  |  |  |  604|  2.53k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.53k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.53k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.53k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.53k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.53k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.53k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  707|  2.53k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.oi, remaining_edges);
  ------------------
  |  |  119|  2.53k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.53k|    do { \
  |  |  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.53k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.53k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.53k|    do { \
  |  |  |  |  604|  2.53k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.53k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.53k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.53k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.53k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.53k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.53k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  708|  2.53k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.ii, remaining_edges);
  ------------------
  |  |  119|  2.53k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.53k|    do { \
  |  |  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.53k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.53k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.53k|    do { \
  |  |  |  |  604|  2.53k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.53k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.53k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.53k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.53k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.53k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.53k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  709|  2.53k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.os, remaining_vertices + 1);
  ------------------
  |  |  119|  2.53k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.53k|    do { \
  |  |  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.53k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.53k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.53k|    do { \
  |  |  |  |  604|  2.53k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.53k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.53k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.53k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.53k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.53k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.53k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  710|  2.53k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.is, remaining_vertices + 1);
  ------------------
  |  |  119|  2.53k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.53k|    do { \
  |  |  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.53k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.53k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.53k|    do { \
  |  |  |  |  604|  2.53k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.53k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.53k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.53k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.53k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.53k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.53k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  711|       |
  712|       |    /* Add the edges */
  713|  76.0k|    for (i = 0, j = 0; j < remaining_edges; i++) {
  ------------------
  |  Branch (713:24): [True: 73.5k, False: 2.53k]
  ------------------
  714|  73.5k|        if (VECTOR(edge_recoding)[i] > 0) {
  ------------------
  |  |   60|  73.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (714:13): [True: 69.8k, False: 3.66k]
  ------------------
  715|  69.8k|            igraph_int_t from = VECTOR(graph->from)[i];
  ------------------
  |  |   60|  69.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  716|  69.8k|            igraph_int_t to = VECTOR(graph->to  )[i];
  ------------------
  |  |   60|  69.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  717|  69.8k|            VECTOR(newgraph.from)[j] = VECTOR(*my_vertex_recoding)[from];
  ------------------
  |  |   60|  69.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newgraph.from)[j] = VECTOR(*my_vertex_recoding)[from];
  ------------------
  |  |   60|  69.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  718|  69.8k|            VECTOR(newgraph.to  )[j] = VECTOR(*my_vertex_recoding)[to];
  ------------------
  |  |   60|  69.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newgraph.to  )[j] = VECTOR(*my_vertex_recoding)[to];
  ------------------
  |  |   60|  69.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  719|  69.8k|            j++;
  720|  69.8k|        }
  721|  73.5k|    }
  722|       |
  723|       |    /* update oi & ii */
  724|  2.53k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newgraph.from, &newgraph.to, &newgraph.oi,
  ------------------
  |  |  656|  2.53k|    do { \
  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  725|  2.53k|                                         remaining_vertices));
  726|  2.53k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newgraph.to, &newgraph.from, &newgraph.ii,
  ------------------
  |  |  656|  2.53k|    do { \
  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  727|  2.53k|                                         remaining_vertices));
  728|       |
  729|  2.53k|    IGRAPH_CHECK(igraph_i_create_start_vectors(&newgraph.os, &newgraph.from,
  ------------------
  |  |  656|  2.53k|    do { \
  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  730|  2.53k|                                       &newgraph.oi, remaining_vertices));
  731|  2.53k|    IGRAPH_CHECK(igraph_i_create_start_vectors(&newgraph.is, &newgraph.to,
  ------------------
  |  |  656|  2.53k|    do { \
  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  732|  2.53k|                                       &newgraph.ii, remaining_vertices));
  733|       |
  734|  2.53k|    newgraph.cache = IGRAPH_CALLOC(1, igraph_i_property_cache_t);
  ------------------
  |  |   33|  2.53k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  5.07k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 2.53k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  735|  2.53k|    IGRAPH_CHECK_OOM(newgraph.cache, "Cannot delete vertices.");
  ------------------
  |  |  709|  2.53k|    do { \
  |  |  710|  2.53k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  736|  2.53k|    IGRAPH_FINALLY(igraph_free, newgraph.cache);
  ------------------
  |  |  603|  2.53k|    do { \
  |  |  604|  2.53k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.53k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.53k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.53k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.53k]
  |  |  ------------------
  |  |  608|  2.53k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  737|  2.53k|    IGRAPH_CHECK(igraph_i_property_cache_init(newgraph.cache));
  ------------------
  |  |  656|  2.53k|    do { \
  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  738|  2.53k|    IGRAPH_FINALLY(igraph_i_property_cache_destroy, newgraph.cache);
  ------------------
  |  |  603|  2.53k|    do { \
  |  |  604|  2.53k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.53k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.53k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.53k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.53k]
  |  |  ------------------
  |  |  608|  2.53k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  739|       |
  740|       |    /* attributes */
  741|  2.53k|    IGRAPH_CHECK(igraph_i_attribute_copy(
  ------------------
  |  |  656|  2.53k|    do { \
  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  742|  2.53k|        &newgraph, graph, /* graph= */ true, /* vertex= */ false, /* edge= */ false
  743|  2.53k|    ));
  744|       |
  745|       |    /* at this point igraph_destroy can take over the responsibility of
  746|       |     * deallocating the graph */
  747|  2.53k|    IGRAPH_FINALLY_CLEAN(8);    /* 2 for the property cache, 6 for the vectors */
  748|  2.53k|    IGRAPH_FINALLY(igraph_destroy, &newgraph);
  ------------------
  |  |  603|  2.53k|    do { \
  |  |  604|  2.53k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.53k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.53k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.53k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.53k]
  |  |  ------------------
  |  |  608|  2.53k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  749|       |
  750|  2.53k|    if (newgraph.attr) {
  ------------------
  |  Branch (750:9): [True: 0, False: 2.53k]
  ------------------
  751|      0|        igraph_vector_int_t iidx;
  752|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&iidx, remaining_vertices);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  753|      0|        for (i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (753:21): [True: 0, False: 0]
  ------------------
  754|      0|            igraph_int_t jj = VECTOR(*my_vertex_recoding)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  755|      0|            if (jj >= 0) {
  ------------------
  |  Branch (755:17): [True: 0, False: 0]
  ------------------
  756|      0|                VECTOR(iidx)[ jj ] = i;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  757|      0|            }
  758|      0|        }
  759|      0|        IGRAPH_CHECK(igraph_i_attribute_permute_vertices(graph, &newgraph, &iidx));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  760|      0|        IGRAPH_CHECK(igraph_vector_int_resize(&iidx, remaining_edges));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  761|      0|        for (i = 0; i < no_of_edges; i++) {
  ------------------
  |  Branch (761:21): [True: 0, False: 0]
  ------------------
  762|      0|            igraph_int_t jj = VECTOR(edge_recoding)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  763|      0|            if (jj != 0) {
  ------------------
  |  Branch (763:17): [True: 0, False: 0]
  ------------------
  764|      0|                VECTOR(iidx)[ jj - 1 ] = i;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  765|      0|            }
  766|      0|        }
  767|      0|        IGRAPH_CHECK(igraph_i_attribute_permute_edges(graph, &newgraph, &iidx));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  768|      0|        igraph_vector_int_destroy(&iidx);
  769|      0|        IGRAPH_FINALLY_CLEAN(1);
  770|      0|    }
  771|       |
  772|  2.53k|    igraph_vit_destroy(&vit);
  773|  2.53k|    igraph_vector_int_destroy(&edge_recoding);
  774|  2.53k|    igraph_destroy(graph);
  775|  2.53k|    *graph = newgraph;
  776|       |
  777|  2.53k|    IGRAPH_FINALLY_CLEAN(3);
  778|       |
  779|  2.53k|    if (invmap) {
  ------------------
  |  Branch (779:9): [True: 0, False: 2.53k]
  ------------------
  780|      0|        IGRAPH_CHECK(igraph_vector_int_resize(invmap, remaining_vertices));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  781|      0|        for (i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (781:21): [True: 0, False: 0]
  ------------------
  782|      0|            igraph_int_t newid = VECTOR(*my_vertex_recoding)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  783|      0|            if (newid >= 0) {
  ------------------
  |  Branch (783:17): [True: 0, False: 0]
  ------------------
  784|      0|                VECTOR(*invmap)[newid] = i;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  785|      0|            }
  786|      0|        }
  787|      0|    }
  788|       |
  789|  2.53k|    if (!map) {
  ------------------
  |  Branch (789:9): [True: 2.25k, False: 278]
  ------------------
  790|  2.25k|        igraph_vector_int_destroy(my_vertex_recoding);
  791|  2.25k|        IGRAPH_FINALLY_CLEAN(1);
  792|  2.25k|    }
  793|       |
  794|       |    /* modification successful, clear the cached properties of the graph.
  795|       |     *
  796|       |     * Deleting one or more vertices cannot make a directed acyclic graph cyclic,
  797|       |     * or an undirected forest into a cyclic graph, so we keep those flags if
  798|       |     * they are cached as true.
  799|       |     *
  800|       |     * Also, if the graph had no loop edges before the deletion, it will have
  801|       |     * no loop edges after the deletion either. The same applies to reciprocal
  802|       |     * edges or multiple edges as well.
  803|       |     */
  804|  2.53k|    igraph_i_property_cache_invalidate_conditionally(
  805|  2.53k|        graph,
  806|  2.53k|        /* keep_always = */ 0,
  807|       |        /* keep_when_false = */
  808|  2.53k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  809|  2.53k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  810|  2.53k|        (1 << IGRAPH_PROP_HAS_MUTUAL),
  811|       |        /* keep_when_true = */
  812|  2.53k|        (1 << IGRAPH_PROP_IS_DAG) |
  813|  2.53k|        (1 << IGRAPH_PROP_IS_FOREST)
  814|  2.53k|    );
  815|       |
  816|  2.53k|    return IGRAPH_SUCCESS;
  817|  2.53k|}
igraph_vcount:
  829|  8.01M|igraph_int_t igraph_vcount(const igraph_t *graph) {
  830|  8.01M|    return graph->n;
  831|  8.01M|}
igraph_ecount:
  843|   132k|igraph_int_t igraph_ecount(const igraph_t *graph) {
  844|   132k|    return igraph_vector_int_size(&graph->from);
  845|   132k|}
igraph_neighbors:
  894|  4.68M|) {
  895|       |
  896|  4.68M|#define DEDUPLICATE_IF_NEEDED(vertex, n)                                          \
  897|  4.68M|    if (should_filter_duplicates) {                                               \
  898|  4.68M|        if (vertex == pnode) {                                                    \
  899|       |            /* This is a loop edge */                                             \
  900|  4.68M|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  901|       |                /* Filtering loop edges unconditionally */                        \
  902|  4.68M|                length -= n;                                                      \
  903|  4.68M|                continue;                                                         \
  904|  4.68M|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  905|       |                /* Filtering every second endpoint of loop edges */               \
  906|  4.68M|                length -= n;                                                      \
  907|  4.68M|                last_added = -1;                                                  \
  908|  4.68M|                seen_loop = true;                                                 \
  909|  4.68M|                continue;                                                         \
  910|  4.68M|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  911|       |                /* Filtering multi-loop edges */                                  \
  912|  4.68M|                length -= n;                                                      \
  913|  4.68M|                continue;                                                         \
  914|  4.68M|            } else {                                                              \
  915|  4.68M|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  916|  4.68M|                last_added = vertex;                                              \
  917|  4.68M|            }                                                                     \
  918|  4.68M|        } else {                                                                  \
  919|       |            /* Not a loop edge */                                                 \
  920|  4.68M|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  921|       |                /* Filtering multi-edges */                                       \
  922|  4.68M|                length -= n;                                                      \
  923|  4.68M|                continue;                                                         \
  924|  4.68M|            } else {                                                              \
  925|  4.68M|                last_added = vertex;                                              \
  926|  4.68M|            }                                                                     \
  927|  4.68M|        }                                                                         \
  928|  4.68M|    }
  929|       |
  930|  4.68M|    igraph_int_t length = 0, idx = 0;
  931|  4.68M|    igraph_int_t i, j;
  932|       |
  933|  4.68M|    igraph_int_t node = pnode;
  934|  4.68M|    igraph_int_t last_added = -1;
  935|  4.68M|    igraph_bool_t should_filter_duplicates;
  936|       |
  937|       |    /* seen_loop stores whether we have already seen at least one full loop
  938|       |     * edge while iterating over the neighbor lists. This is needed to handle
  939|       |     * multi-loop edges properly. Since internally we always store loop edges
  940|       |     * twice, this flag should become true only if we processed both endpoints
  941|       |     * for a loop edge */
  942|  4.68M|    igraph_bool_t seen_loop = false;
  943|       |
  944|       |    /* normalize Boolean value to enable == comparisons below and in DEDUPLICATE_IF_NEEDED */
  945|  4.68M|    multiple = !!multiple;
  946|       |
  947|  4.68M|    if (node < 0 || node > igraph_vcount(graph) - 1) {
  ------------------
  |  Branch (947:9): [True: 0, False: 4.68M]
  |  Branch (947:21): [True: 0, False: 4.68M]
  ------------------
  948|      0|        IGRAPH_ERRORF("Vertex %" IGRAPH_PRId " is not in the graph.", IGRAPH_EINVVID, node);
  ------------------
  |  |  464|      0|    do { \
  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  467|      0|        return igraph_errno; \
  |  |  468|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  949|      0|    }
  950|  4.68M|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (950:9): [True: 4.68M, False: 2.25k]
  |  Branch (950:31): [True: 4.68M, False: 0]
  |  Branch (950:52): [True: 0, False: 4.68M]
  ------------------
  951|      0|        IGRAPH_ERROR("Mode should be either IGRAPH_OUT, IGRAPH_IN or IGRAPH_ALL.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  952|      0|    }
  953|       |
  954|  4.68M|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (954:9): [True: 4.68M, False: 0]
  ------------------
  955|  4.68M|        mode = IGRAPH_ALL;
  956|  4.68M|    }
  957|       |
  958|  4.68M|    if (mode != IGRAPH_ALL && loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (958:9): [True: 0, False: 4.68M]
  |  Branch (958:31): [True: 0, False: 0]
  ------------------
  959|       |        /*
  960|       |        IGRAPH_ERROR("For a directed graph (with directions not ignored), "
  961|       |                     "IGRAPH_LOOPS_TWICE does not make sense.", IGRAPH_EINVAL);
  962|       |        */
  963|      0|        loops = IGRAPH_LOOPS_ONCE;
  964|      0|    }
  965|       |
  966|       |    /* Calculate needed space first & allocate it */
  967|       |    /* Note that 'mode' is treated as a bit field here; it's okay because
  968|       |     * IGRAPH_ALL = IGRAPH_IN | IGRAPH_OUT, bit-wise */
  969|  4.68M|    if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (969:9): [True: 4.68M, False: 0]
  ------------------
  970|  4.68M|        length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|  4.68M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|  4.68M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  971|  4.68M|    }
  972|  4.68M|    if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (972:9): [True: 4.68M, False: 0]
  ------------------
  973|  4.68M|        length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|  4.68M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|  4.68M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  974|  4.68M|    }
  975|       |
  976|  4.68M|    IGRAPH_CHECK(igraph_vector_int_resize(neis, length));
  ------------------
  |  |  656|  4.68M|    do { \
  |  |  657|  4.68M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.68M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.68M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.68M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.68M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.68M]
  |  |  ------------------
  ------------------
  977|       |
  978|       |    /* We are dealing with two sorted lists; one for the successors and one
  979|       |     * for the predecessors. If we have requested only one of them, we have
  980|       |     * an easy job. If we have requested both, we need to merge the two lists
  981|       |     * to ensure that the output is sorted by the vertex IDs of the "other"
  982|       |     * endpoint of the affected edges. We don't need to merge if the graph
  983|       |     * is undirected, because in that case the data structure guarantees that
  984|       |     * the "out-edges" contain only (u, v) pairs where u <= v and the
  985|       |     * "in-edges" contains the rest, so the result is sorted even without
  986|       |     * merging. */
  987|  4.68M|    if (!igraph_is_directed(graph) || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (987:9): [True: 4.68M, False: 0]
  |  Branch (987:39): [True: 0, False: 0]
  ------------------
  988|       |        /* graph is undirected or we did not ask for both directions in a
  989|       |         * directed graph; this is the easy case */
  990|       |
  991|  4.68M|        should_filter_duplicates = !(multiple == IGRAPH_MULTIPLE &&
  ------------------
  |  Branch (991:38): [True: 4.57M, False: 109k]
  ------------------
  992|  4.57M|                ((!igraph_is_directed(graph) && loops == IGRAPH_LOOPS_TWICE) ||
  ------------------
  |  Branch (992:19): [True: 4.57M, False: 0]
  |  Branch (992:49): [True: 3.19M, False: 1.38M]
  ------------------
  993|  1.38M|                 (igraph_is_directed(graph) && loops != IGRAPH_NO_LOOPS)));
  ------------------
  |  Branch (993:19): [True: 0, False: 1.38M]
  |  Branch (993:48): [True: 0, False: 0]
  ------------------
  994|       |
  995|  4.68M|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (995:13): [True: 4.68M, False: 0]
  ------------------
  996|  4.68M|            j = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|  4.68M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  997|  5.91M|            for (i = VECTOR(graph->os)[node]; i < j; i++) {
  ------------------
  |  |   60|  4.68M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (997:47): [True: 1.22M, False: 4.68M]
  ------------------
  998|  1.22M|                igraph_int_t to = VECTOR(graph->to)[ VECTOR(graph->oi)[i] ];
  ------------------
  |  |   60|  1.22M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_int_t to = VECTOR(graph->to)[ VECTOR(graph->oi)[i] ];
  ------------------
  |  |   60|  1.22M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  999|  1.22M|                DEDUPLICATE_IF_NEEDED(to, 1);
  ------------------
  |  |  897|  1.22M|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 429k, False: 792k]
  |  |  ------------------
  |  |  898|   429k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 113k, False: 316k]
  |  |  ------------------
  |  |  899|   113k|            /* This is a loop edge */                                             \
  |  |  900|   113k|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (900:17): [True: 97.9k, False: 15.5k]
  |  |  ------------------
  |  |  901|  97.9k|                /* Filtering loop edges unconditionally */                        \
  |  |  902|  97.9k|                length -= n;                                                      \
  |  |  903|  97.9k|                continue;                                                         \
  |  |  904|  97.9k|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (904:24): [True: 15.5k, False: 0]
  |  |  |  Branch (904:54): [True: 7.25k, False: 8.32k]
  |  |  ------------------
  |  |  905|  7.25k|                /* Filtering every second endpoint of loop edges */               \
  |  |  906|  7.25k|                length -= n;                                                      \
  |  |  907|  7.25k|                last_added = -1;                                                  \
  |  |  908|  7.25k|                seen_loop = true;                                                 \
  |  |  909|  7.25k|                continue;                                                         \
  |  |  910|  8.32k|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (910:24): [True: 0, False: 8.32k]
  |  |  |  Branch (910:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  911|      0|                /* Filtering multi-loop edges */                                  \
  |  |  912|      0|                length -= n;                                                      \
  |  |  913|      0|                continue;                                                         \
  |  |  914|  8.32k|            } else {                                                              \
  |  |  915|  8.32k|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (915:30): [True: 8.32k, False: 0]
  |  |  |  Branch (915:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  916|  8.32k|                last_added = vertex;                                              \
  |  |  917|  8.32k|            }                                                                     \
  |  |  918|   316k|        } else {                                                                  \
  |  |  919|   316k|            /* Not a loop edge */                                                 \
  |  |  920|   316k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 35.2k, False: 280k]
  |  |  |  Branch (920:51): [True: 14.2k, False: 21.0k]
  |  |  ------------------
  |  |  921|  14.2k|                /* Filtering multi-edges */                                       \
  |  |  922|  14.2k|                length -= n;                                                      \
  |  |  923|  14.2k|                continue;                                                         \
  |  |  924|   301k|            } else {                                                              \
  |  |  925|   301k|                last_added = vertex;                                              \
  |  |  926|   301k|            }                                                                     \
  |  |  927|   316k|        }                                                                         \
  |  |  928|   429k|    }
  ------------------
 1000|  1.10M|                VECTOR(*neis)[idx++] = to;
  ------------------
  |  |   60|  1.10M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1001|  1.10M|            }
 1002|  4.68M|        }
 1003|       |
 1004|  4.68M|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1004:13): [True: 4.68M, False: 0]
  ------------------
 1005|  4.68M|            j = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|  4.68M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1006|  5.87M|            for (i = VECTOR(graph->is)[node]; i < j; i++) {
  ------------------
  |  |   60|  4.68M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1006:47): [True: 1.18M, False: 4.68M]
  ------------------
 1007|  1.18M|                igraph_int_t from = VECTOR(graph->from)[ VECTOR(graph->ii)[i] ];
  ------------------
  |  |   60|  1.18M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_int_t from = VECTOR(graph->from)[ VECTOR(graph->ii)[i] ];
  ------------------
  |  |   60|  1.18M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1008|  1.18M|                DEDUPLICATE_IF_NEEDED(from, 1);
  ------------------
  |  |  897|  1.18M|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 424k, False: 759k]
  |  |  ------------------
  |  |  898|   424k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 113k, False: 310k]
  |  |  ------------------
  |  |  899|   113k|            /* This is a loop edge */                                             \
  |  |  900|   113k|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (900:17): [True: 97.9k, False: 15.5k]
  |  |  ------------------
  |  |  901|  97.9k|                /* Filtering loop edges unconditionally */                        \
  |  |  902|  97.9k|                length -= n;                                                      \
  |  |  903|  97.9k|                continue;                                                         \
  |  |  904|  97.9k|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (904:24): [True: 15.5k, False: 0]
  |  |  |  Branch (904:54): [True: 8.32k, False: 7.25k]
  |  |  ------------------
  |  |  905|  8.32k|                /* Filtering every second endpoint of loop edges */               \
  |  |  906|  8.32k|                length -= n;                                                      \
  |  |  907|  8.32k|                last_added = -1;                                                  \
  |  |  908|  8.32k|                seen_loop = true;                                                 \
  |  |  909|  8.32k|                continue;                                                         \
  |  |  910|  8.32k|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (910:24): [True: 0, False: 7.25k]
  |  |  |  Branch (910:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  911|      0|                /* Filtering multi-loop edges */                                  \
  |  |  912|      0|                length -= n;                                                      \
  |  |  913|      0|                continue;                                                         \
  |  |  914|  7.25k|            } else {                                                              \
  |  |  915|  7.25k|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (915:30): [True: 7.25k, False: 0]
  |  |  |  Branch (915:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  916|  7.25k|                last_added = vertex;                                              \
  |  |  917|  7.25k|            }                                                                     \
  |  |  918|   310k|        } else {                                                                  \
  |  |  919|   310k|            /* Not a loop edge */                                                 \
  |  |  920|   310k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 38.3k, False: 272k]
  |  |  |  Branch (920:51): [True: 15.3k, False: 22.9k]
  |  |  ------------------
  |  |  921|  15.3k|                /* Filtering multi-edges */                                       \
  |  |  922|  15.3k|                length -= n;                                                      \
  |  |  923|  15.3k|                continue;                                                         \
  |  |  924|   295k|            } else {                                                              \
  |  |  925|   295k|                last_added = vertex;                                              \
  |  |  926|   295k|            }                                                                     \
  |  |  927|   310k|        }                                                                         \
  |  |  928|   424k|    }
  ------------------
 1009|  1.06M|                VECTOR(*neis)[idx++] = from;
  ------------------
  |  |   60|  1.06M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1010|  1.06M|            }
 1011|  4.68M|        }
 1012|  4.68M|    } else {
 1013|       |        /* Both in- and out- neighbors in a directed graph,
 1014|       |           we need to merge the two 'vectors' so the result is
 1015|       |           correctly ordered. */
 1016|      0|        igraph_int_t j1 = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1017|      0|        igraph_int_t j2 = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1018|      0|        igraph_int_t i1 = VECTOR(graph->os)[node];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1019|      0|        igraph_int_t i2 = VECTOR(graph->is)[node];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1020|      0|        igraph_int_t eid1, eid2;
 1021|      0|        igraph_int_t n1, n2;
 1022|       |
 1023|      0|        should_filter_duplicates = !(multiple == IGRAPH_MULTIPLE &&
  ------------------
  |  Branch (1023:38): [True: 0, False: 0]
  ------------------
 1024|      0|                loops == IGRAPH_LOOPS_TWICE);
  ------------------
  |  Branch (1024:17): [True: 0, False: 0]
  ------------------
 1025|       |
 1026|      0|        while (i1 < j1 && i2 < j2) {
  ------------------
  |  Branch (1026:16): [True: 0, False: 0]
  |  Branch (1026:27): [True: 0, False: 0]
  ------------------
 1027|      0|            eid1 = VECTOR(graph->oi)[i1];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1028|      0|            eid2 = VECTOR(graph->ii)[i2];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1029|      0|            n1 = VECTOR(graph->to)[eid1];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1030|      0|            n2 = VECTOR(graph->from)[eid2];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1031|      0|            if (n1 < n2) {
  ------------------
  |  Branch (1031:17): [True: 0, False: 0]
  ------------------
 1032|      0|                i1++;
 1033|      0|                DEDUPLICATE_IF_NEEDED(n1, 1);
  ------------------
  |  |  897|      0|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  898|      0|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  899|      0|            /* This is a loop edge */                                             \
  |  |  900|      0|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (900:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  901|      0|                /* Filtering loop edges unconditionally */                        \
  |  |  902|      0|                length -= n;                                                      \
  |  |  903|      0|                continue;                                                         \
  |  |  904|      0|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (904:24): [True: 0, False: 0]
  |  |  |  Branch (904:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  905|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  906|      0|                length -= n;                                                      \
  |  |  907|      0|                last_added = -1;                                                  \
  |  |  908|      0|                seen_loop = true;                                                 \
  |  |  909|      0|                continue;                                                         \
  |  |  910|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (910:24): [True: 0, False: 0]
  |  |  |  Branch (910:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  911|      0|                /* Filtering multi-loop edges */                                  \
  |  |  912|      0|                length -= n;                                                      \
  |  |  913|      0|                continue;                                                         \
  |  |  914|      0|            } else {                                                              \
  |  |  915|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (915:30): [True: 0, False: 0]
  |  |  |  Branch (915:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  916|      0|                last_added = vertex;                                              \
  |  |  917|      0|            }                                                                     \
  |  |  918|      0|        } else {                                                                  \
  |  |  919|      0|            /* Not a loop edge */                                                 \
  |  |  920|      0|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 0, False: 0]
  |  |  |  Branch (920:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  921|      0|                /* Filtering multi-edges */                                       \
  |  |  922|      0|                length -= n;                                                      \
  |  |  923|      0|                continue;                                                         \
  |  |  924|      0|            } else {                                                              \
  |  |  925|      0|                last_added = vertex;                                              \
  |  |  926|      0|            }                                                                     \
  |  |  927|      0|        }                                                                         \
  |  |  928|      0|    }
  ------------------
 1034|      0|                VECTOR(*neis)[idx++] = n1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1035|      0|            } else if (n1 > n2) {
  ------------------
  |  Branch (1035:24): [True: 0, False: 0]
  ------------------
 1036|      0|                i2++;
 1037|      0|                DEDUPLICATE_IF_NEEDED(n2, 1);
  ------------------
  |  |  897|      0|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  898|      0|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  899|      0|            /* This is a loop edge */                                             \
  |  |  900|      0|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (900:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  901|      0|                /* Filtering loop edges unconditionally */                        \
  |  |  902|      0|                length -= n;                                                      \
  |  |  903|      0|                continue;                                                         \
  |  |  904|      0|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (904:24): [True: 0, False: 0]
  |  |  |  Branch (904:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  905|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  906|      0|                length -= n;                                                      \
  |  |  907|      0|                last_added = -1;                                                  \
  |  |  908|      0|                seen_loop = true;                                                 \
  |  |  909|      0|                continue;                                                         \
  |  |  910|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (910:24): [True: 0, False: 0]
  |  |  |  Branch (910:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  911|      0|                /* Filtering multi-loop edges */                                  \
  |  |  912|      0|                length -= n;                                                      \
  |  |  913|      0|                continue;                                                         \
  |  |  914|      0|            } else {                                                              \
  |  |  915|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (915:30): [True: 0, False: 0]
  |  |  |  Branch (915:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  916|      0|                last_added = vertex;                                              \
  |  |  917|      0|            }                                                                     \
  |  |  918|      0|        } else {                                                                  \
  |  |  919|      0|            /* Not a loop edge */                                                 \
  |  |  920|      0|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 0, False: 0]
  |  |  |  Branch (920:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  921|      0|                /* Filtering multi-edges */                                       \
  |  |  922|      0|                length -= n;                                                      \
  |  |  923|      0|                continue;                                                         \
  |  |  924|      0|            } else {                                                              \
  |  |  925|      0|                last_added = vertex;                                              \
  |  |  926|      0|            }                                                                     \
  |  |  927|      0|        }                                                                         \
  |  |  928|      0|    }
  ------------------
 1038|      0|                VECTOR(*neis)[idx++] = n2;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1039|      0|            } else {
 1040|      0|                i1++;
 1041|      0|                i2++;
 1042|      0|                DEDUPLICATE_IF_NEEDED(n1, 2);
  ------------------
  |  |  897|      0|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  898|      0|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  899|      0|            /* This is a loop edge */                                             \
  |  |  900|      0|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (900:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  901|      0|                /* Filtering loop edges unconditionally */                        \
  |  |  902|      0|                length -= n;                                                      \
  |  |  903|      0|                continue;                                                         \
  |  |  904|      0|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (904:24): [True: 0, False: 0]
  |  |  |  Branch (904:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  905|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  906|      0|                length -= n;                                                      \
  |  |  907|      0|                last_added = -1;                                                  \
  |  |  908|      0|                seen_loop = true;                                                 \
  |  |  909|      0|                continue;                                                         \
  |  |  910|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (910:24): [True: 0, False: 0]
  |  |  |  Branch (910:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  911|      0|                /* Filtering multi-loop edges */                                  \
  |  |  912|      0|                length -= n;                                                      \
  |  |  913|      0|                continue;                                                         \
  |  |  914|      0|            } else {                                                              \
  |  |  915|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (915:30): [True: 0, False: 0]
  |  |  |  Branch (915:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  916|      0|                last_added = vertex;                                              \
  |  |  917|      0|            }                                                                     \
  |  |  918|      0|        } else {                                                                  \
  |  |  919|      0|            /* Not a loop edge */                                                 \
  |  |  920|      0|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 0, False: 0]
  |  |  |  Branch (920:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  921|      0|                /* Filtering multi-edges */                                       \
  |  |  922|      0|                length -= n;                                                      \
  |  |  923|      0|                continue;                                                         \
  |  |  924|      0|            } else {                                                              \
  |  |  925|      0|                last_added = vertex;                                              \
  |  |  926|      0|            }                                                                     \
  |  |  927|      0|        }                                                                         \
  |  |  928|      0|    }
  ------------------
 1043|      0|                VECTOR(*neis)[idx++] = n1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1044|      0|                DEDUPLICATE_IF_NEEDED(n2, 1);
  ------------------
  |  |  897|      0|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  898|      0|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  899|      0|            /* This is a loop edge */                                             \
  |  |  900|      0|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (900:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  901|      0|                /* Filtering loop edges unconditionally */                        \
  |  |  902|      0|                length -= n;                                                      \
  |  |  903|      0|                continue;                                                         \
  |  |  904|      0|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (904:24): [True: 0, False: 0]
  |  |  |  Branch (904:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  905|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  906|      0|                length -= n;                                                      \
  |  |  907|      0|                last_added = -1;                                                  \
  |  |  908|      0|                seen_loop = true;                                                 \
  |  |  909|      0|                continue;                                                         \
  |  |  910|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (910:24): [True: 0, False: 0]
  |  |  |  Branch (910:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  911|      0|                /* Filtering multi-loop edges */                                  \
  |  |  912|      0|                length -= n;                                                      \
  |  |  913|      0|                continue;                                                         \
  |  |  914|      0|            } else {                                                              \
  |  |  915|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (915:30): [True: 0, False: 0]
  |  |  |  Branch (915:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  916|      0|                last_added = vertex;                                              \
  |  |  917|      0|            }                                                                     \
  |  |  918|      0|        } else {                                                                  \
  |  |  919|      0|            /* Not a loop edge */                                                 \
  |  |  920|      0|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 0, False: 0]
  |  |  |  Branch (920:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  921|      0|                /* Filtering multi-edges */                                       \
  |  |  922|      0|                length -= n;                                                      \
  |  |  923|      0|                continue;                                                         \
  |  |  924|      0|            } else {                                                              \
  |  |  925|      0|                last_added = vertex;                                              \
  |  |  926|      0|            }                                                                     \
  |  |  927|      0|        }                                                                         \
  |  |  928|      0|    }
  ------------------
 1045|      0|                VECTOR(*neis)[idx++] = n2;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1046|      0|            }
 1047|      0|        }
 1048|       |
 1049|      0|        while (i1 < j1) {
  ------------------
  |  Branch (1049:16): [True: 0, False: 0]
  ------------------
 1050|      0|            eid1 = VECTOR(graph->oi)[i1++];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1051|      0|            igraph_int_t to = VECTOR(graph->to)[eid1];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1052|      0|            DEDUPLICATE_IF_NEEDED(to, 1);
  ------------------
  |  |  897|      0|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  898|      0|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  899|      0|            /* This is a loop edge */                                             \
  |  |  900|      0|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (900:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  901|      0|                /* Filtering loop edges unconditionally */                        \
  |  |  902|      0|                length -= n;                                                      \
  |  |  903|      0|                continue;                                                         \
  |  |  904|      0|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (904:24): [True: 0, False: 0]
  |  |  |  Branch (904:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  905|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  906|      0|                length -= n;                                                      \
  |  |  907|      0|                last_added = -1;                                                  \
  |  |  908|      0|                seen_loop = true;                                                 \
  |  |  909|      0|                continue;                                                         \
  |  |  910|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (910:24): [True: 0, False: 0]
  |  |  |  Branch (910:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  911|      0|                /* Filtering multi-loop edges */                                  \
  |  |  912|      0|                length -= n;                                                      \
  |  |  913|      0|                continue;                                                         \
  |  |  914|      0|            } else {                                                              \
  |  |  915|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (915:30): [True: 0, False: 0]
  |  |  |  Branch (915:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  916|      0|                last_added = vertex;                                              \
  |  |  917|      0|            }                                                                     \
  |  |  918|      0|        } else {                                                                  \
  |  |  919|      0|            /* Not a loop edge */                                                 \
  |  |  920|      0|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 0, False: 0]
  |  |  |  Branch (920:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  921|      0|                /* Filtering multi-edges */                                       \
  |  |  922|      0|                length -= n;                                                      \
  |  |  923|      0|                continue;                                                         \
  |  |  924|      0|            } else {                                                              \
  |  |  925|      0|                last_added = vertex;                                              \
  |  |  926|      0|            }                                                                     \
  |  |  927|      0|        }                                                                         \
  |  |  928|      0|    }
  ------------------
 1053|      0|            VECTOR(*neis)[idx++] = to;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1054|      0|        }
 1055|       |
 1056|      0|        while (i2 < j2) {
  ------------------
  |  Branch (1056:16): [True: 0, False: 0]
  ------------------
 1057|      0|            eid2 = VECTOR(graph->ii)[i2++];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1058|      0|            igraph_int_t from = VECTOR(graph->from)[eid2];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1059|      0|            DEDUPLICATE_IF_NEEDED(from, 1);
  ------------------
  |  |  897|      0|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  898|      0|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  899|      0|            /* This is a loop edge */                                             \
  |  |  900|      0|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (900:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  901|      0|                /* Filtering loop edges unconditionally */                        \
  |  |  902|      0|                length -= n;                                                      \
  |  |  903|      0|                continue;                                                         \
  |  |  904|      0|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (904:24): [True: 0, False: 0]
  |  |  |  Branch (904:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  905|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  906|      0|                length -= n;                                                      \
  |  |  907|      0|                last_added = -1;                                                  \
  |  |  908|      0|                seen_loop = true;                                                 \
  |  |  909|      0|                continue;                                                         \
  |  |  910|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (910:24): [True: 0, False: 0]
  |  |  |  Branch (910:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  911|      0|                /* Filtering multi-loop edges */                                  \
  |  |  912|      0|                length -= n;                                                      \
  |  |  913|      0|                continue;                                                         \
  |  |  914|      0|            } else {                                                              \
  |  |  915|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (915:30): [True: 0, False: 0]
  |  |  |  Branch (915:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  916|      0|                last_added = vertex;                                              \
  |  |  917|      0|            }                                                                     \
  |  |  918|      0|        } else {                                                                  \
  |  |  919|      0|            /* Not a loop edge */                                                 \
  |  |  920|      0|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 0, False: 0]
  |  |  |  Branch (920:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  921|      0|                /* Filtering multi-edges */                                       \
  |  |  922|      0|                length -= n;                                                      \
  |  |  923|      0|                continue;                                                         \
  |  |  924|      0|            } else {                                                              \
  |  |  925|      0|                last_added = vertex;                                              \
  |  |  926|      0|            }                                                                     \
  |  |  927|      0|        }                                                                         \
  |  |  928|      0|    }
  ------------------
 1060|      0|            VECTOR(*neis)[idx++] = from;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1061|      0|        }
 1062|       |
 1063|      0|    }
 1064|  4.68M|    IGRAPH_CHECK(igraph_vector_int_resize(neis, length));
  ------------------
  |  |  656|  4.68M|    do { \
  |  |  657|  4.68M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.68M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.68M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.68M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.68M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.68M]
  |  |  ------------------
  ------------------
 1065|       |
 1066|  4.68M|    return IGRAPH_SUCCESS;
 1067|  4.68M|#undef DEDUPLICATE_IF_NEEDED
 1068|  4.68M|}
igraph_is_directed:
 1133|  18.4M|igraph_bool_t igraph_is_directed(const igraph_t *graph) {
 1134|  18.4M|    return graph->directed;
 1135|  18.4M|}
igraph_degree_1:
 1165|  6.77k|) {
 1166|  6.77k|    igraph_int_t loop_counter;
 1167|       |
 1168|  6.77k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1168:9): [True: 6.77k, False: 0]
  ------------------
 1169|  6.77k|        mode = IGRAPH_ALL;
 1170|  6.77k|    }
 1171|       |
 1172|  6.77k|    if (loops != IGRAPH_NO_LOOPS && loops != IGRAPH_LOOPS_ONCE &&
  ------------------
  |  Branch (1172:9): [True: 2.25k, False: 4.51k]
  |  Branch (1172:37): [True: 2.25k, False: 0]
  ------------------
 1173|  2.25k|        loops != IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1173:9): [True: 0, False: 2.25k]
  ------------------
 1174|      0|        IGRAPH_ERROR("Invalid loops argument.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1175|      0|    }
 1176|       |
 1177|  6.77k|    if (loops == IGRAPH_LOOPS_ONCE && (mode & IGRAPH_ALL) != IGRAPH_ALL) {
  ------------------
  |  Branch (1177:9): [True: 0, False: 6.77k]
  |  Branch (1177:39): [True: 0, False: 0]
  ------------------
 1178|      0|        loops = IGRAPH_LOOPS_TWICE;
 1179|      0|    }
 1180|       |
 1181|  6.77k|    *deg = 0;
 1182|  6.77k|    if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1182:9): [True: 6.77k, False: 0]
  ------------------
 1183|  6.77k|        *deg += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|  6.77k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      *deg += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|  6.77k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1184|  6.77k|    }
 1185|  6.77k|    if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1185:9): [True: 6.77k, False: 0]
  ------------------
 1186|  6.77k|        *deg += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|  6.77k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      *deg += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|  6.77k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1187|  6.77k|    }
 1188|       |
 1189|  6.77k|    if (loops != IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1189:9): [True: 4.51k, False: 2.25k]
  ------------------
 1190|       |        /* When loops should not be counted, we remove their contribution from the
 1191|       |         * previously computed degree. */
 1192|  4.51k|        loop_counter = 0;
 1193|  4.51k|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1193:13): [True: 4.51k, False: 0]
  ------------------
 1194|  13.5k|            for (igraph_int_t i = VECTOR(graph->os)[vid]; i < VECTOR(graph->os)[vid + 1]; i++) {
  ------------------
  |  |   60|  4.51k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          for (igraph_int_t i = VECTOR(graph->os)[vid]; i < VECTOR(graph->os)[vid + 1]; i++) {
  ------------------
  |  |   60|  13.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1194:59): [True: 9.02k, False: 4.51k]
  ------------------
 1195|  9.02k|                if (VECTOR(graph->to)[ VECTOR(graph->oi)[i] ] == vid) {
  ------------------
  |  |   60|  9.02k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (VECTOR(graph->to)[ VECTOR(graph->oi)[i] ] == vid) {
  ------------------
  |  |   60|  9.02k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1195:21): [True: 9.02k, False: 0]
  ------------------
 1196|  9.02k|                    loop_counter++;
 1197|  9.02k|                }
 1198|  9.02k|            }
 1199|  4.51k|        }
 1200|  4.51k|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1200:13): [True: 4.51k, False: 0]
  ------------------
 1201|  25.3k|            for (igraph_int_t i = VECTOR(graph->is)[vid]; i < VECTOR(graph->is)[vid + 1]; i++) {
  ------------------
  |  |   60|  4.51k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          for (igraph_int_t i = VECTOR(graph->is)[vid]; i < VECTOR(graph->is)[vid + 1]; i++) {
  ------------------
  |  |   60|  25.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1201:59): [True: 20.7k, False: 4.51k]
  ------------------
 1202|  20.7k|                if (VECTOR(graph->from)[ VECTOR(graph->ii)[i] ] == vid) {
  ------------------
  |  |   60|  20.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (VECTOR(graph->from)[ VECTOR(graph->ii)[i] ] == vid) {
  ------------------
  |  |   60|  20.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1202:21): [True: 9.02k, False: 11.7k]
  ------------------
 1203|  9.02k|                    loop_counter++;
 1204|  9.02k|                }
 1205|  20.7k|            }
 1206|  4.51k|        }
 1207|       |
 1208|  4.51k|        if (loops == IGRAPH_NO_LOOPS || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1208:13): [True: 4.51k, False: 0]
  |  Branch (1208:41): [True: 0, False: 0]
  ------------------
 1209|  4.51k|            *deg -= loop_counter;
 1210|  4.51k|        } else {
 1211|       |            /* loops == IGRAPH_LOOPS_ONCE && mode == IGRAPH_ALL */
 1212|      0|            *deg -= loop_counter / 2;
 1213|      0|        }
 1214|  4.51k|    }
 1215|       |
 1216|  6.77k|    return IGRAPH_SUCCESS;
 1217|  6.77k|}
igraph_degree:
 1268|  33.6k|) {
 1269|       |
 1270|  33.6k|    igraph_int_t nodes_to_calc;
 1271|  33.6k|    igraph_int_t i, j;
 1272|  33.6k|    igraph_vit_t vit;
 1273|       |
 1274|  33.6k|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|  33.6k|    do { \
  |  |  657|  33.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  33.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  33.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 33.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  33.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 33.6k]
  |  |  ------------------
  ------------------
 1275|  33.6k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  33.6k|    do { \
  |  |  604|  33.6k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  33.6k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  33.6k|         * incorrect destructor function with the pointer */ \
  |  |  607|  33.6k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 33.6k]
  |  |  ------------------
  |  |  608|  33.6k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  33.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 33.6k]
  |  |  ------------------
  ------------------
 1276|       |
 1277|  33.6k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1277:9): [True: 33.6k, False: 0]
  |  Branch (1277:31): [True: 33.6k, False: 0]
  |  Branch (1277:52): [True: 0, False: 33.6k]
  ------------------
 1278|      0|        IGRAPH_ERROR("Invalid mode for degree calculation.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1279|      0|    }
 1280|       |
 1281|  33.6k|    if (loops == IGRAPH_NO_LOOPS || loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (1281:9): [True: 5.14k, False: 28.5k]
  |  Branch (1281:37): [True: 0, False: 28.5k]
  ------------------
 1282|       |        /* If the graph is known not to have loops, we can use the faster
 1283|       |         * loops == IGRAPH_LOOPS_TWICE code path, which has O(1) complexity
 1284|       |         * instead of of O(d). */
 1285|  5.14k|        if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (1285:13): [True: 5.06k, False: 76]
  ------------------
 1286|  5.06k|            !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (1286:13): [True: 3.04k, False: 2.02k]
  ------------------
 1287|  3.04k|            loops = IGRAPH_LOOPS_TWICE;
 1288|  3.04k|        }
 1289|  5.14k|    }
 1290|       |
 1291|  33.6k|    if (loops == IGRAPH_LOOPS_ONCE && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1291:9): [True: 0, False: 33.6k]
  |  Branch (1291:39): [True: 0, False: 0]
  ------------------
 1292|       |        /* We can use the faster loops == IGRAPH_LOOPS_TWICE path again */
 1293|      0|        loops = IGRAPH_LOOPS_TWICE;
 1294|      0|    }
 1295|       |
 1296|  33.6k|    nodes_to_calc = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|  33.6k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
 1297|  33.6k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1297:9): [True: 33.6k, False: 0]
  ------------------
 1298|  33.6k|        mode = IGRAPH_ALL;
 1299|  33.6k|    }
 1300|       |
 1301|  33.6k|    IGRAPH_CHECK(igraph_vector_int_resize(res, nodes_to_calc));
  ------------------
  |  |  656|  33.6k|    do { \
  |  |  657|  33.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  33.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  33.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 33.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  33.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 33.6k]
  |  |  ------------------
  ------------------
 1302|  33.6k|    igraph_vector_int_null(res);
 1303|       |
 1304|  33.6k|    if (loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1304:9): [True: 31.5k, False: 2.10k]
  ------------------
 1305|  31.5k|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1305:13): [True: 31.5k, False: 0]
  ------------------
 1306|  31.5k|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|  31.5k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1307|  5.28M|                 !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|  5.28M|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1307:18): [True: 5.24M, False: 31.5k]
  ------------------
 1308|  5.24M|                 IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|  5.24M|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1309|  5.24M|                igraph_int_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  5.24M|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 5.24M, False: 0]
  |  |  ------------------
  |  |  215|  5.24M|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1310|  5.24M|                VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|  5.24M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|  5.24M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|  5.24M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1311|  5.24M|            }
 1312|  31.5k|        }
 1313|  31.5k|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1313:13): [True: 31.5k, False: 0]
  ------------------
 1314|  31.5k|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|  31.5k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1315|  5.28M|                 !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|  5.28M|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1315:18): [True: 5.24M, False: 31.5k]
  ------------------
 1316|  5.24M|                 IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|  5.24M|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1317|  5.24M|                igraph_int_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  5.24M|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 5.24M, False: 0]
  |  |  ------------------
  |  |  215|  5.24M|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1318|  5.24M|                VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|  5.24M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|  5.24M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|  5.24M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1319|  5.24M|            }
 1320|  31.5k|        }
 1321|  31.5k|    } else if (loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (1321:16): [True: 0, False: 2.10k]
  ------------------
 1322|      0|        IGRAPH_ASSERT((mode & IGRAPH_ALL) == IGRAPH_ALL);
  ------------------
  |  |  924|      0|    do { \
  |  |  925|      0|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1323|       |
 1324|       |        /* We arbitrarily count loop edges in the (mode & IGRAPH_OUT) branch but
 1325|       |         * not in the (mode & IGRAPH_IN) branch */
 1326|       |
 1327|      0|        if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (1327:13): [True: 0, False: 0]
  ------------------
 1328|       |            // When calculating degree for all vertices, iterating over edges is faster
 1329|      0|            igraph_int_t no_of_edges = igraph_ecount(graph);
 1330|       |
 1331|       |            /* mode & IGRAPH_OUT branch */
 1332|      0|            for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (1332:41): [True: 0, False: 0]
  ------------------
 1333|      0|                igraph_int_t from = IGRAPH_FROM(graph, edge);
  ------------------
  |  |  115|      0|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1334|      0|                VECTOR(*res)[from]++;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1335|      0|            }
 1336|       |
 1337|       |            /* mode & IGRAPH_IN branch */
 1338|      0|            for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (1338:41): [True: 0, False: 0]
  ------------------
 1339|      0|                igraph_int_t to = IGRAPH_TO(graph, edge);
  ------------------
  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1340|      0|                if (IGRAPH_FROM(graph, edge) != to) {
  ------------------
  |  |  115|      0|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1340:21): [True: 0, False: 0]
  ------------------
 1341|      0|                    VECTOR(*res)[to]++;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1342|      0|                }
 1343|      0|            }
 1344|      0|        } else {
 1345|       |            /* mode & IGRAPH_OUT branch */
 1346|      0|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1347|      0|                !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1347:17): [True: 0, False: 0]
  ------------------
 1348|      0|                IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1349|      0|                igraph_int_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|      0|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  215|      0|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1350|      0|                VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1351|      0|            }
 1352|       |
 1353|       |            /* mode & IGRAPH_IN branch */
 1354|      0|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1355|      0|                !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1355:17): [True: 0, False: 0]
  ------------------
 1356|      0|                IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1357|      0|                igraph_int_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|      0|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  215|      0|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1358|      0|                VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1359|      0|                for (j = VECTOR(graph->is)[vid];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1360|      0|                    j < VECTOR(graph->is)[vid + 1]; j++) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1360:21): [True: 0, False: 0]
  ------------------
 1361|      0|                    if (VECTOR(graph->from)[ VECTOR(graph->ii)[j] ] == vid) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  if (VECTOR(graph->from)[ VECTOR(graph->ii)[j] ] == vid) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1361:25): [True: 0, False: 0]
  ------------------
 1362|      0|                        VECTOR(*res)[i] -= 1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1363|      0|                    }
 1364|      0|                }
 1365|      0|            }
 1366|      0|        }
 1367|  2.10k|    } else {
 1368|       |        /* no loops should be counted */
 1369|  2.10k|        if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (1369:13): [True: 2.10k, False: 0]
  ------------------
 1370|       |            // When calculating degree for all vertices, iterating over edges is faster
 1371|  2.10k|            igraph_int_t no_of_edges = igraph_ecount(graph);
 1372|       |
 1373|  2.10k|            if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1373:17): [True: 2.10k, False: 0]
  ------------------
 1374|  80.6k|                for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (1374:45): [True: 78.5k, False: 2.10k]
  ------------------
 1375|  78.5k|                    igraph_int_t from = IGRAPH_FROM(graph, edge);
  ------------------
  |  |  115|  78.5k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  78.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1376|  78.5k|                    if (from != IGRAPH_TO(graph, edge)) {
  ------------------
  |  |  128|  78.5k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  78.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1376:25): [True: 37.6k, False: 40.9k]
  ------------------
 1377|  37.6k|                        VECTOR(*res)[from]++;
  ------------------
  |  |   60|  37.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1378|  37.6k|                    }
 1379|  78.5k|                }
 1380|  2.10k|            }
 1381|  2.10k|            if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1381:17): [True: 2.10k, False: 0]
  ------------------
 1382|  80.6k|                for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (1382:45): [True: 78.5k, False: 2.10k]
  ------------------
 1383|  78.5k|                    igraph_int_t to = IGRAPH_TO(graph, edge);
  ------------------
  |  |  128|  78.5k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  78.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1384|  78.5k|                    if (IGRAPH_FROM(graph, edge) != to) {
  ------------------
  |  |  115|  78.5k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  78.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1384:25): [True: 37.6k, False: 40.9k]
  ------------------
 1385|  37.6k|                        VECTOR(*res)[to]++;
  ------------------
  |  |   60|  37.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1386|  37.6k|                    }
 1387|  78.5k|                }
 1388|  2.10k|            }
 1389|  2.10k|        } else {
 1390|      0|            if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1390:17): [True: 0, False: 0]
  ------------------
 1391|      0|                for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1392|      0|                    !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1392:21): [True: 0, False: 0]
  ------------------
 1393|      0|                    IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1394|      0|                    igraph_int_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|      0|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  215|      0|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1395|      0|                    VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1396|      0|                    for (j = VECTOR(graph->os)[vid];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1397|      0|                        j < VECTOR(graph->os)[vid + 1]; j++) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1397:25): [True: 0, False: 0]
  ------------------
 1398|      0|                        if (VECTOR(graph->to)[ VECTOR(graph->oi)[j] ] == vid) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      if (VECTOR(graph->to)[ VECTOR(graph->oi)[j] ] == vid) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1398:29): [True: 0, False: 0]
  ------------------
 1399|      0|                            VECTOR(*res)[i] -= 1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1400|      0|                        }
 1401|      0|                    }
 1402|      0|                }
 1403|      0|            }
 1404|      0|            if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1404:17): [True: 0, False: 0]
  ------------------
 1405|      0|                for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1406|      0|                    !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1406:21): [True: 0, False: 0]
  ------------------
 1407|      0|                    IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1408|      0|                    igraph_int_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|      0|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  215|      0|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1409|      0|                    VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1410|      0|                    for (j = VECTOR(graph->is)[vid];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1411|      0|                        j < VECTOR(graph->is)[vid + 1]; j++) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1411:25): [True: 0, False: 0]
  ------------------
 1412|      0|                        if (VECTOR(graph->from)[ VECTOR(graph->ii)[j] ] == vid) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      if (VECTOR(graph->from)[ VECTOR(graph->ii)[j] ] == vid) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1412:29): [True: 0, False: 0]
  ------------------
 1413|      0|                            VECTOR(*res)[i] -= 1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1414|      0|                        }
 1415|      0|                    }
 1416|      0|                }
 1417|      0|            }
 1418|      0|        }
 1419|  2.10k|    }
 1420|       |
 1421|  33.6k|    igraph_vit_destroy(&vit);
 1422|  33.6k|    IGRAPH_FINALLY_CLEAN(1);
 1423|       |
 1424|  33.6k|    return IGRAPH_SUCCESS;
 1425|  33.6k|}
igraph_get_eid:
 1524|  3.89k|                   igraph_bool_t directed, igraph_bool_t error) {
 1525|       |
 1526|  3.89k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
 1527|       |
 1528|  3.89k|    if (from < 0 || to < 0 || from >= no_of_nodes || to >= no_of_nodes) {
  ------------------
  |  Branch (1528:9): [True: 0, False: 3.89k]
  |  Branch (1528:21): [True: 0, False: 3.89k]
  |  Branch (1528:31): [True: 0, False: 3.89k]
  |  Branch (1528:54): [True: 0, False: 3.89k]
  ------------------
 1529|      0|        IGRAPH_ERROR("Cannot get edge ID.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1530|      0|    }
 1531|       |
 1532|  3.89k|    *eid = -1;
 1533|  3.89k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (1533:9): [True: 0, False: 3.89k]
  ------------------
 1534|       |
 1535|       |        /* Directed graph */
 1536|      0|        FIND_DIRECTED_EDGE(graph, from, to, eid);
  ------------------
  |  | 1469|      0|    do { \
  |  | 1470|      0|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1471|      0|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1472|      0|        igraph_int_t N = end; \
  |  | 1473|      0|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1474|      0|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1475|      0|        igraph_int_t N2 = end2; \
  |  | 1476|      0|        igraph_int_t *nullpointer = NULL; \
  |  | 1477|      0|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1477:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1478|      0|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1449|      0|    do { \
  |  |  |  | 1450|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1451|      0|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|      0|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1454|      0|                (start) = mid+1; \
  |  |  |  | 1455|      0|            } else { \
  |  |  |  | 1456|      0|                (end) = mid; \
  |  |  |  | 1457|      0|            } \
  |  |  |  | 1458|      0|        } \
  |  |  |  | 1459|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1460|      0|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1462|      0|                *(result) = e; \
  |  |  |  | 1463|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1464|      0|            } \
  |  |  |  | 1465|      0|        } \
  |  |  |  | 1466|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1479|      0|        } else { \
  |  | 1480|      0|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1449|      0|    do { \
  |  |  |  | 1450|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1451|      0|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|      0|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1454|      0|                (start) = mid+1; \
  |  |  |  | 1455|      0|            } else { \
  |  |  |  | 1456|      0|                (end) = mid; \
  |  |  |  | 1457|      0|            } \
  |  |  |  | 1458|      0|        } \
  |  |  |  | 1459|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1460|      0|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1462|      0|                *(result) = e; \
  |  |  |  | 1463|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1464|      0|            } \
  |  |  |  | 1465|      0|        } \
  |  |  |  | 1466|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1481|      0|        } \
  |  | 1482|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1482:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1537|      0|        if (!directed && *eid < 0) {
  ------------------
  |  Branch (1537:13): [True: 0, False: 0]
  |  Branch (1537:26): [True: 0, False: 0]
  ------------------
 1538|      0|            FIND_DIRECTED_EDGE(graph, to, from, eid);
  ------------------
  |  | 1469|      0|    do { \
  |  | 1470|      0|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1471|      0|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1472|      0|        igraph_int_t N = end; \
  |  | 1473|      0|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1474|      0|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1475|      0|        igraph_int_t N2 = end2; \
  |  | 1476|      0|        igraph_int_t *nullpointer = NULL; \
  |  | 1477|      0|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1477:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1478|      0|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1449|      0|    do { \
  |  |  |  | 1450|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1451|      0|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|      0|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1454|      0|                (start) = mid+1; \
  |  |  |  | 1455|      0|            } else { \
  |  |  |  | 1456|      0|                (end) = mid; \
  |  |  |  | 1457|      0|            } \
  |  |  |  | 1458|      0|        } \
  |  |  |  | 1459|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1460|      0|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1462|      0|                *(result) = e; \
  |  |  |  | 1463|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1464|      0|            } \
  |  |  |  | 1465|      0|        } \
  |  |  |  | 1466|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1479|      0|        } else { \
  |  | 1480|      0|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1449|      0|    do { \
  |  |  |  | 1450|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1451|      0|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|      0|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1454|      0|                (start) = mid+1; \
  |  |  |  | 1455|      0|            } else { \
  |  |  |  | 1456|      0|                (end) = mid; \
  |  |  |  | 1457|      0|            } \
  |  |  |  | 1458|      0|        } \
  |  |  |  | 1459|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1460|      0|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1462|      0|                *(result) = e; \
  |  |  |  | 1463|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1464|      0|            } \
  |  |  |  | 1465|      0|        } \
  |  |  |  | 1466|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1481|      0|        } \
  |  | 1482|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1482:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1539|      0|        }
 1540|       |
 1541|  3.89k|    } else {
 1542|       |
 1543|       |        /* Undirected graph, they only have one mode */
 1544|  3.89k|        FIND_UNDIRECTED_EDGE(graph, from, to, eid);
  ------------------
  |  | 1485|  3.89k|    do { \
  |  | 1486|  3.89k|        igraph_int_t xfrom1 = from > to ? from : to; \
  |  |  ------------------
  |  |  |  Branch (1486:31): [True: 1.42k, False: 2.47k]
  |  |  ------------------
  |  | 1487|  3.89k|        igraph_int_t xto1 = from > to ? to : from; \
  |  |  ------------------
  |  |  |  Branch (1487:29): [True: 1.42k, False: 2.47k]
  |  |  ------------------
  |  | 1488|  3.89k|        FIND_DIRECTED_EDGE(graph, xfrom1, xto1, eid); \
  |  |  ------------------
  |  |  |  | 1469|  3.89k|    do { \
  |  |  |  | 1470|  3.89k|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.89k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1471|  3.89k|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.89k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1472|  3.89k|        igraph_int_t N = end; \
  |  |  |  | 1473|  3.89k|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.89k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1474|  3.89k|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.89k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1475|  3.89k|        igraph_int_t N2 = end2; \
  |  |  |  | 1476|  3.89k|        igraph_int_t *nullpointer = NULL; \
  |  |  |  | 1477|  3.89k|        if (end-start < end2-start2) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1477:13): [True: 1.25k, False: 2.63k]
  |  |  |  |  ------------------
  |  |  |  | 1478|  1.25k|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, eid, nullpointer); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1449|  1.25k|    do { \
  |  |  |  |  |  | 1450|  1.76k|        while ((start) < (end)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1450:16): [True: 511, False: 1.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1451|    511|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  |  |  | 1452|    511|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    511|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1453|    511|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    511|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1453:17): [True: 90, False: 421]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1454|     90|                (start) = mid+1; \
  |  |  |  |  |  | 1455|    421|            } else { \
  |  |  |  |  |  | 1456|    421|                (end) = mid; \
  |  |  |  |  |  | 1457|    421|            } \
  |  |  |  |  |  | 1458|    511|        } \
  |  |  |  |  |  | 1459|  1.25k|        if ((start) < (N)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1459:13): [True: 331, False: 926]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1460|    331|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    331|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1461|    331|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    331|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1461:17): [True: 121, False: 210]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1462|    121|                *(result) = e; \
  |  |  |  |  |  | 1463|    121|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1463:21): [True: 0, False: 121]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1464|    121|            } \
  |  |  |  |  |  | 1465|    331|        } \
  |  |  |  |  |  | 1466|  1.25k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1466:14): [Folded, False: 1.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1479|  2.63k|        } else { \
  |  |  |  | 1480|  2.63k|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, eid, nullpointer); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1449|  2.63k|    do { \
  |  |  |  |  |  | 1450|  4.24k|        while ((start) < (end)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1450:16): [True: 1.60k, False: 2.63k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1451|  1.60k|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  |  |  | 1452|  1.60k|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  1.60k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1453|  1.60k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  1.60k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1453:17): [True: 969, False: 633]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1454|    969|                (start) = mid+1; \
  |  |  |  |  |  | 1455|    969|            } else { \
  |  |  |  |  |  | 1456|    633|                (end) = mid; \
  |  |  |  |  |  | 1457|    633|            } \
  |  |  |  |  |  | 1458|  1.60k|        } \
  |  |  |  |  |  | 1459|  2.63k|        if ((start) < (N)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1459:13): [True: 611, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1460|    611|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    611|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1461|    611|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    611|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1461:17): [True: 108, False: 503]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1462|    108|                *(result) = e; \
  |  |  |  |  |  | 1463|    108|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1463:21): [True: 0, False: 108]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1464|    108|            } \
  |  |  |  |  |  | 1465|    611|        } \
  |  |  |  |  |  | 1466|  2.63k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1466:14): [Folded, False: 2.63k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1481|  2.63k|        } \
  |  |  |  | 1482|  3.89k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1482:14): [Folded, False: 3.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1489|  3.89k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1489:14): [Folded, False: 3.89k]
  |  |  ------------------
  ------------------
 1545|       |
 1546|  3.89k|    }
 1547|       |
 1548|  3.89k|    if (*eid < 0) {
  ------------------
  |  Branch (1548:9): [True: 3.66k, False: 229]
  ------------------
 1549|  3.66k|        if (error) {
  ------------------
  |  Branch (1549:13): [True: 0, False: 3.66k]
  ------------------
 1550|      0|            IGRAPH_ERROR("Cannot get edge ID, no such edge.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1551|      0|        }
 1552|  3.66k|    }
 1553|       |
 1554|  3.89k|    return IGRAPH_SUCCESS;
 1555|  3.89k|}
igraph_get_eids:
 1602|  2.23k|                    igraph_bool_t directed, igraph_bool_t error) {
 1603|       |
 1604|  2.23k|    igraph_int_t n = pairs ? igraph_vector_int_size(pairs) : 0;
  ------------------
  |  Branch (1604:22): [True: 2.23k, False: 0]
  ------------------
 1605|  2.23k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
 1606|  2.23k|    igraph_int_t i;
 1607|  2.23k|    igraph_int_t eid = -1;
 1608|       |
 1609|  2.23k|    if (n == 0) {
  ------------------
  |  Branch (1609:9): [True: 0, False: 2.23k]
  ------------------
 1610|      0|        igraph_vector_int_clear(eids);
 1611|      0|        return IGRAPH_SUCCESS;
 1612|      0|    }
 1613|       |
 1614|  2.23k|    if (n % 2 != 0) {
  ------------------
  |  Branch (1614:9): [True: 0, False: 2.23k]
  ------------------
 1615|      0|        IGRAPH_ERROR("Cannot get edge IDs, invalid length of vertex pair vector.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1616|      0|                     IGRAPH_EINVAL);
 1617|      0|    }
 1618|       |
 1619|  2.23k|    if (!igraph_vector_int_isininterval(pairs, 0, no_of_nodes - 1)) {
  ------------------
  |  Branch (1619:9): [True: 0, False: 2.23k]
  ------------------
 1620|      0|        IGRAPH_ERROR("Cannot get edge IDs, invalid vertex ID.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1621|      0|    }
 1622|       |
 1623|  2.23k|    IGRAPH_CHECK(igraph_vector_int_resize(eids, n / 2));
  ------------------
  |  |  656|  2.23k|    do { \
  |  |  657|  2.23k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.23k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.23k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.23k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.23k]
  |  |  ------------------
  ------------------
 1624|       |
 1625|  2.23k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (1625:9): [True: 0, False: 2.23k]
  ------------------
 1626|      0|        for (i = 0; i < n / 2; i++) {
  ------------------
  |  Branch (1626:21): [True: 0, False: 0]
  ------------------
 1627|      0|            igraph_int_t from = VECTOR(*pairs)[2 * i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1628|      0|            igraph_int_t to = VECTOR(*pairs)[2 * i + 1];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1629|       |
 1630|      0|            eid = -1;
 1631|      0|            FIND_DIRECTED_EDGE(graph, from, to, &eid);
  ------------------
  |  | 1469|      0|    do { \
  |  | 1470|      0|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1471|      0|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1472|      0|        igraph_int_t N = end; \
  |  | 1473|      0|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1474|      0|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1475|      0|        igraph_int_t N2 = end2; \
  |  | 1476|      0|        igraph_int_t *nullpointer = NULL; \
  |  | 1477|      0|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1477:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1478|      0|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1449|      0|    do { \
  |  |  |  | 1450|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1451|      0|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|      0|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1454|      0|                (start) = mid+1; \
  |  |  |  | 1455|      0|            } else { \
  |  |  |  | 1456|      0|                (end) = mid; \
  |  |  |  | 1457|      0|            } \
  |  |  |  | 1458|      0|        } \
  |  |  |  | 1459|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1460|      0|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1462|      0|                *(result) = e; \
  |  |  |  | 1463|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1464|      0|            } \
  |  |  |  | 1465|      0|        } \
  |  |  |  | 1466|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1479|      0|        } else { \
  |  | 1480|      0|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1449|      0|    do { \
  |  |  |  | 1450|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1451|      0|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|      0|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1454|      0|                (start) = mid+1; \
  |  |  |  | 1455|      0|            } else { \
  |  |  |  | 1456|      0|                (end) = mid; \
  |  |  |  | 1457|      0|            } \
  |  |  |  | 1458|      0|        } \
  |  |  |  | 1459|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1460|      0|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1462|      0|                *(result) = e; \
  |  |  |  | 1463|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1464|      0|            } \
  |  |  |  | 1465|      0|        } \
  |  |  |  | 1466|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1481|      0|        } \
  |  | 1482|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1482:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1632|      0|            if (!directed && eid < 0) {
  ------------------
  |  Branch (1632:17): [True: 0, False: 0]
  |  Branch (1632:30): [True: 0, False: 0]
  ------------------
 1633|      0|                FIND_DIRECTED_EDGE(graph, to, from, &eid);
  ------------------
  |  | 1469|      0|    do { \
  |  | 1470|      0|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1471|      0|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1472|      0|        igraph_int_t N = end; \
  |  | 1473|      0|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1474|      0|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1475|      0|        igraph_int_t N2 = end2; \
  |  | 1476|      0|        igraph_int_t *nullpointer = NULL; \
  |  | 1477|      0|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1477:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1478|      0|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1449|      0|    do { \
  |  |  |  | 1450|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1451|      0|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|      0|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1454|      0|                (start) = mid+1; \
  |  |  |  | 1455|      0|            } else { \
  |  |  |  | 1456|      0|                (end) = mid; \
  |  |  |  | 1457|      0|            } \
  |  |  |  | 1458|      0|        } \
  |  |  |  | 1459|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1460|      0|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1462|      0|                *(result) = e; \
  |  |  |  | 1463|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1464|      0|            } \
  |  |  |  | 1465|      0|        } \
  |  |  |  | 1466|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1479|      0|        } else { \
  |  | 1480|      0|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1449|      0|    do { \
  |  |  |  | 1450|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1451|      0|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|      0|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1454|      0|                (start) = mid+1; \
  |  |  |  | 1455|      0|            } else { \
  |  |  |  | 1456|      0|                (end) = mid; \
  |  |  |  | 1457|      0|            } \
  |  |  |  | 1458|      0|        } \
  |  |  |  | 1459|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1460|      0|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1462|      0|                *(result) = e; \
  |  |  |  | 1463|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1464|      0|            } \
  |  |  |  | 1465|      0|        } \
  |  |  |  | 1466|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1481|      0|        } \
  |  | 1482|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1482:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1634|      0|            }
 1635|       |
 1636|      0|            VECTOR(*eids)[i] = eid;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1637|      0|            if (eid < 0 && error) {
  ------------------
  |  Branch (1637:17): [True: 0, False: 0]
  |  Branch (1637:28): [True: 0, False: 0]
  ------------------
 1638|      0|                IGRAPH_ERROR("Cannot get edge ID, no such edge.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1639|      0|            }
 1640|      0|        }
 1641|  2.23k|    } else {
 1642|  88.5k|        for (i = 0; i < n / 2; i++) {
  ------------------
  |  Branch (1642:21): [True: 86.3k, False: 2.23k]
  ------------------
 1643|  86.3k|            igraph_int_t from = VECTOR(*pairs)[2 * i];
  ------------------
  |  |   60|  86.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1644|  86.3k|            igraph_int_t to = VECTOR(*pairs)[2 * i + 1];
  ------------------
  |  |   60|  86.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1645|       |
 1646|  86.3k|            eid = -1;
 1647|  86.3k|            FIND_UNDIRECTED_EDGE(graph, from, to, &eid);
  ------------------
  |  | 1485|  86.3k|    do { \
  |  | 1486|  86.3k|        igraph_int_t xfrom1 = from > to ? from : to; \
  |  |  ------------------
  |  |  |  Branch (1486:31): [True: 0, False: 86.3k]
  |  |  ------------------
  |  | 1487|  86.3k|        igraph_int_t xto1 = from > to ? to : from; \
  |  |  ------------------
  |  |  |  Branch (1487:29): [True: 0, False: 86.3k]
  |  |  ------------------
  |  | 1488|  86.3k|        FIND_DIRECTED_EDGE(graph, xfrom1, xto1, eid); \
  |  |  ------------------
  |  |  |  | 1469|  86.3k|    do { \
  |  |  |  | 1470|  86.3k|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  86.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1471|  86.3k|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  86.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1472|  86.3k|        igraph_int_t N = end; \
  |  |  |  | 1473|  86.3k|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  86.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1474|  86.3k|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  86.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1475|  86.3k|        igraph_int_t N2 = end2; \
  |  |  |  | 1476|  86.3k|        igraph_int_t *nullpointer = NULL; \
  |  |  |  | 1477|  86.3k|        if (end-start < end2-start2) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1477:13): [True: 37.2k, False: 49.0k]
  |  |  |  |  ------------------
  |  |  |  | 1478|  37.2k|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, eid, nullpointer); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1449|  37.2k|    do { \
  |  |  |  |  |  | 1450|   132k|        while ((start) < (end)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1450:16): [True: 95.2k, False: 37.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1451|  95.2k|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  |  |  | 1452|  95.2k|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  95.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1453|  95.2k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  95.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1453:17): [True: 3.70k, False: 91.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1454|  3.70k|                (start) = mid+1; \
  |  |  |  |  |  | 1455|  91.5k|            } else { \
  |  |  |  |  |  | 1456|  91.5k|                (end) = mid; \
  |  |  |  |  |  | 1457|  91.5k|            } \
  |  |  |  |  |  | 1458|  95.2k|        } \
  |  |  |  |  |  | 1459|  37.2k|        if ((start) < (N)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1459:13): [True: 35.8k, False: 1.45k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1460|  35.8k|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  35.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1461|  35.8k|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  35.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1461:17): [True: 35.7k, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1462|  35.7k|                *(result) = e; \
  |  |  |  |  |  | 1463|  35.7k|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1463:21): [True: 0, False: 35.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1464|  35.7k|            } \
  |  |  |  |  |  | 1465|  35.8k|        } \
  |  |  |  |  |  | 1466|  37.2k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1466:14): [Folded, False: 37.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1479|  49.0k|        } else { \
  |  |  |  | 1480|  49.0k|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, eid, nullpointer); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1449|  49.0k|    do { \
  |  |  |  |  |  | 1450|   177k|        while ((start) < (end)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1450:16): [True: 128k, False: 49.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1451|   128k|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  |  |  | 1452|   128k|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   128k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1453|   128k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   128k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1453:17): [True: 10.0k, False: 118k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1454|  10.0k|                (start) = mid+1; \
  |  |  |  |  |  | 1455|   118k|            } else { \
  |  |  |  |  |  | 1456|   118k|                (end) = mid; \
  |  |  |  |  |  | 1457|   118k|            } \
  |  |  |  |  |  | 1458|   128k|        } \
  |  |  |  |  |  | 1459|  49.0k|        if ((start) < (N)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1459:13): [True: 46.7k, False: 2.33k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1460|  46.7k|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  46.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1461|  46.7k|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  46.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1461:17): [True: 46.5k, False: 139]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1462|  46.5k|                *(result) = e; \
  |  |  |  |  |  | 1463|  46.5k|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1463:21): [True: 0, False: 46.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1464|  46.5k|            } \
  |  |  |  |  |  | 1465|  46.7k|        } \
  |  |  |  |  |  | 1466|  49.0k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1466:14): [Folded, False: 49.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1481|  49.0k|        } \
  |  |  |  | 1482|  86.3k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1482:14): [Folded, False: 86.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1489|  86.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1489:14): [Folded, False: 86.3k]
  |  |  ------------------
  ------------------
 1648|  86.3k|            VECTOR(*eids)[i] = eid;
  ------------------
  |  |   60|  86.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1649|  86.3k|            if (eid < 0 && error) {
  ------------------
  |  Branch (1649:17): [True: 3.94k, False: 82.3k]
  |  Branch (1649:28): [True: 0, False: 3.94k]
  ------------------
 1650|      0|                IGRAPH_ERROR("Cannot get edge ID, no such edge.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1651|      0|            }
 1652|  86.3k|        }
 1653|  2.23k|    }
 1654|       |
 1655|  2.23k|    return IGRAPH_SUCCESS;
 1656|  2.23k|}
igraph_get_all_eids_between:
 1718|  4.47k|) {
 1719|  4.47k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
 1720|       |
 1721|  4.47k|    if (source < 0 || source >= no_of_nodes) {
  ------------------
  |  Branch (1721:9): [True: 0, False: 4.47k]
  |  Branch (1721:23): [True: 0, False: 4.47k]
  ------------------
 1722|      0|        IGRAPH_ERROR("Cannot get edge IDs, invalid source vertex ID.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1723|      0|    }
 1724|       |
 1725|  4.47k|    if (target < 0 || target >= no_of_nodes) {
  ------------------
  |  Branch (1725:9): [True: 0, False: 4.47k]
  |  Branch (1725:23): [True: 0, False: 4.47k]
  ------------------
 1726|      0|        IGRAPH_ERROR("Cannot get edge IDs, invalid target vertex ID.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1727|      0|    }
 1728|       |
 1729|  4.47k|    igraph_vector_int_clear(eids);
 1730|       |
 1731|  4.47k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (1731:9): [True: 0, False: 4.47k]
  ------------------
 1732|       |        /* look in the specified direction first */
 1733|      0|        FIND_ALL_DIRECTED_EDGES(graph, source, target, eids);
  ------------------
  |  | 1662|      0|    do { \
  |  | 1663|      0|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1664|      0|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1665|      0|        igraph_int_t N = end; \
  |  | 1666|      0|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1667|      0|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1668|      0|        igraph_int_t N2 = end2; \
  |  | 1669|      0|        igraph_int_t eid = -1; \
  |  | 1670|      0|        igraph_int_t pos = -1; \
  |  | 1671|      0|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1671:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1672|      0|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, &eid, &pos); \
  |  |  ------------------
  |  |  |  | 1449|      0|    do { \
  |  |  |  | 1450|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1451|      0|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|      0|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1454|      0|                (start) = mid+1; \
  |  |  |  | 1455|      0|            } else { \
  |  |  |  | 1456|      0|                (end) = mid; \
  |  |  |  | 1457|      0|            } \
  |  |  |  | 1458|      0|        } \
  |  |  |  | 1459|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1460|      0|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1462|      0|                *(result) = e; \
  |  |  |  | 1463|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  | 1464|      0|            } \
  |  |  |  | 1465|      0|        } \
  |  |  |  | 1466|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1673|      0|            while (pos >= 0 && pos < N) { \
  |  |  ------------------
  |  |  |  Branch (1673:20): [True: 0, False: 0]
  |  |  |  Branch (1673:32): [True: 0, False: 0]
  |  |  ------------------
  |  | 1674|      0|                eid = VECTOR(graph->oi)[pos++]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1675|      0|                if (VECTOR(graph->to)[eid] != xto) { break; } \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  |  Branch (1675:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1676|      0|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1677|      0|            } \
  |  | 1678|      0|        } else { \
  |  | 1679|      0|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, &eid, &pos); \
  |  |  ------------------
  |  |  |  | 1449|      0|    do { \
  |  |  |  | 1450|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1451|      0|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|      0|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1454|      0|                (start) = mid+1; \
  |  |  |  | 1455|      0|            } else { \
  |  |  |  | 1456|      0|                (end) = mid; \
  |  |  |  | 1457|      0|            } \
  |  |  |  | 1458|      0|        } \
  |  |  |  | 1459|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1460|      0|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1462|      0|                *(result) = e; \
  |  |  |  | 1463|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  | 1464|      0|            } \
  |  |  |  | 1465|      0|        } \
  |  |  |  | 1466|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1680|      0|            while (pos >= 0 && pos < N2) { \
  |  |  ------------------
  |  |  |  Branch (1680:20): [True: 0, False: 0]
  |  |  |  Branch (1680:32): [True: 0, False: 0]
  |  |  ------------------
  |  | 1681|      0|                eid = VECTOR(graph->ii)[pos++]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1682|      0|                if (VECTOR(graph->from)[eid] != xfrom) { break; } \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  |  Branch (1682:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1683|      0|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1684|      0|            } \
  |  | 1685|      0|        } \
  |  | 1686|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1686:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1734|      0|        if (!directed) {
  ------------------
  |  Branch (1734:13): [True: 0, False: 0]
  ------------------
 1735|       |            /* look in the reverse direction as well */
 1736|      0|            FIND_ALL_DIRECTED_EDGES(graph, target, source, eids);
  ------------------
  |  | 1662|      0|    do { \
  |  | 1663|      0|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1664|      0|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1665|      0|        igraph_int_t N = end; \
  |  | 1666|      0|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1667|      0|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1668|      0|        igraph_int_t N2 = end2; \
  |  | 1669|      0|        igraph_int_t eid = -1; \
  |  | 1670|      0|        igraph_int_t pos = -1; \
  |  | 1671|      0|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1671:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1672|      0|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, &eid, &pos); \
  |  |  ------------------
  |  |  |  | 1449|      0|    do { \
  |  |  |  | 1450|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1451|      0|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|      0|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1454|      0|                (start) = mid+1; \
  |  |  |  | 1455|      0|            } else { \
  |  |  |  | 1456|      0|                (end) = mid; \
  |  |  |  | 1457|      0|            } \
  |  |  |  | 1458|      0|        } \
  |  |  |  | 1459|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1460|      0|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1462|      0|                *(result) = e; \
  |  |  |  | 1463|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  | 1464|      0|            } \
  |  |  |  | 1465|      0|        } \
  |  |  |  | 1466|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1673|      0|            while (pos >= 0 && pos < N) { \
  |  |  ------------------
  |  |  |  Branch (1673:20): [True: 0, False: 0]
  |  |  |  Branch (1673:32): [True: 0, False: 0]
  |  |  ------------------
  |  | 1674|      0|                eid = VECTOR(graph->oi)[pos++]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1675|      0|                if (VECTOR(graph->to)[eid] != xto) { break; } \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  |  Branch (1675:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1676|      0|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1677|      0|            } \
  |  | 1678|      0|        } else { \
  |  | 1679|      0|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, &eid, &pos); \
  |  |  ------------------
  |  |  |  | 1449|      0|    do { \
  |  |  |  | 1450|      0|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1451|      0|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|      0|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|      0|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1454|      0|                (start) = mid+1; \
  |  |  |  | 1455|      0|            } else { \
  |  |  |  | 1456|      0|                (end) = mid; \
  |  |  |  | 1457|      0|            } \
  |  |  |  | 1458|      0|        } \
  |  |  |  | 1459|      0|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1460|      0|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|      0|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1462|      0|                *(result) = e; \
  |  |  |  | 1463|      0|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  | 1464|      0|            } \
  |  |  |  | 1465|      0|        } \
  |  |  |  | 1466|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1680|      0|            while (pos >= 0 && pos < N2) { \
  |  |  ------------------
  |  |  |  Branch (1680:20): [True: 0, False: 0]
  |  |  |  Branch (1680:32): [True: 0, False: 0]
  |  |  ------------------
  |  | 1681|      0|                eid = VECTOR(graph->ii)[pos++]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1682|      0|                if (VECTOR(graph->from)[eid] != xfrom) { break; } \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  |  Branch (1682:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1683|      0|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1684|      0|            } \
  |  | 1685|      0|        } \
  |  | 1686|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1686:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1737|      0|        }
 1738|  4.47k|    } else {
 1739|  4.47k|        FIND_ALL_UNDIRECTED_EDGES(graph, source, target, eids);
  ------------------
  |  | 1689|  4.47k|    do { \
  |  | 1690|  4.47k|        igraph_int_t xfrom1 = from > to ? from : to; \
  |  |  ------------------
  |  |  |  Branch (1690:31): [True: 2.23k, False: 2.23k]
  |  |  ------------------
  |  | 1691|  4.47k|        igraph_int_t xto1 = from > to ? to : from; \
  |  |  ------------------
  |  |  |  Branch (1691:29): [True: 2.23k, False: 2.23k]
  |  |  ------------------
  |  | 1692|  4.47k|        FIND_ALL_DIRECTED_EDGES(graph, xfrom1, xto1, eidvec); \
  |  |  ------------------
  |  |  |  | 1662|  4.47k|    do { \
  |  |  |  | 1663|  4.47k|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  4.47k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1664|  4.47k|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  4.47k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1665|  4.47k|        igraph_int_t N = end; \
  |  |  |  | 1666|  4.47k|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  4.47k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1667|  4.47k|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  4.47k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1668|  4.47k|        igraph_int_t N2 = end2; \
  |  |  |  | 1669|  4.47k|        igraph_int_t eid = -1; \
  |  |  |  | 1670|  4.47k|        igraph_int_t pos = -1; \
  |  |  |  | 1671|  4.47k|        if (end-start < end2-start2) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1671:13): [True: 2.45k, False: 2.02k]
  |  |  |  |  ------------------
  |  |  |  | 1672|  2.45k|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, &eid, &pos); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1449|  2.45k|    do { \
  |  |  |  |  |  | 1450|  3.71k|        while ((start) < (end)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1450:16): [True: 1.26k, False: 2.45k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1451|  1.26k|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  |  |  | 1452|  1.26k|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  1.26k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1453|  1.26k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  1.26k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1453:17): [True: 0, False: 1.26k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1454|      0|                (start) = mid+1; \
  |  |  |  |  |  | 1455|  1.26k|            } else { \
  |  |  |  |  |  | 1456|  1.26k|                (end) = mid; \
  |  |  |  |  |  | 1457|  1.26k|            } \
  |  |  |  |  |  | 1458|  1.26k|        } \
  |  |  |  |  |  | 1459|  2.45k|        if ((start) < (N)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1459:13): [True: 590, False: 1.86k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1460|    590|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    590|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1461|    590|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    590|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1461:17): [True: 578, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1462|    578|                *(result) = e; \
  |  |  |  |  |  | 1463|    578|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1463:21): [True: 578, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1464|    578|            } \
  |  |  |  |  |  | 1465|    590|        } \
  |  |  |  |  |  | 1466|  2.45k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1466:14): [Folded, False: 2.45k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1673|  9.37k|            while (pos >= 0 && pos < N) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1673:20): [True: 7.49k, False: 1.87k]
  |  |  |  |  |  Branch (1673:32): [True: 6.94k, False: 550]
  |  |  |  |  ------------------
  |  |  |  | 1674|  6.94k|                eid = VECTOR(graph->oi)[pos++]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  6.94k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1675|  6.94k|                if (VECTOR(graph->to)[eid] != xto) { break; } \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  6.94k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1675:21): [True: 28, False: 6.92k]
  |  |  |  |  ------------------
  |  |  |  | 1676|  6.94k|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  656|  6.92k|    do { \
  |  |  |  |  |  |  657|  6.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  |  |  658|  6.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  612|  6.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.92k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  660|      0|        } \
  |  |  |  |  |  |  661|  6.92k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (661:14): [Folded, False: 6.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1677|  6.92k|            } \
  |  |  |  | 1678|  2.45k|        } else { \
  |  |  |  | 1679|  2.02k|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, &eid, &pos); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1449|  2.02k|    do { \
  |  |  |  |  |  | 1450|  2.53k|        while ((start) < (end)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1450:16): [True: 504, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1451|    504|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  |  |  | 1452|    504|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    504|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1453|    504|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    504|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1453:17): [True: 41, False: 463]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1454|     41|                (start) = mid+1; \
  |  |  |  |  |  | 1455|    463|            } else { \
  |  |  |  |  |  | 1456|    463|                (end) = mid; \
  |  |  |  |  |  | 1457|    463|            } \
  |  |  |  |  |  | 1458|    504|        } \
  |  |  |  |  |  | 1459|  2.02k|        if ((start) < (N)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1459:13): [True: 195, False: 1.83k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1460|    195|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    195|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1461|    195|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    195|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1461:17): [True: 179, False: 16]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1462|    179|                *(result) = e; \
  |  |  |  |  |  | 1463|    179|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1463:21): [True: 179, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1464|    179|            } \
  |  |  |  |  |  | 1465|    195|        } \
  |  |  |  |  |  | 1466|  2.02k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1466:14): [Folded, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1680|  5.12k|            while (pos >= 0 && pos < N2) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1680:20): [True: 3.27k, False: 1.84k]
  |  |  |  |  |  Branch (1680:32): [True: 3.11k, False: 158]
  |  |  |  |  ------------------
  |  |  |  | 1681|  3.11k|                eid = VECTOR(graph->ii)[pos++]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.11k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1682|  3.11k|                if (VECTOR(graph->from)[eid] != xfrom) { break; } \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.11k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1682:21): [True: 21, False: 3.09k]
  |  |  |  |  ------------------
  |  |  |  | 1683|  3.11k|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  656|  3.09k|    do { \
  |  |  |  |  |  |  657|  3.09k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  |  |  658|  3.09k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  612|  3.09k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.09k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  660|      0|        } \
  |  |  |  |  |  |  661|  3.09k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (661:14): [Folded, False: 3.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1684|  3.09k|            } \
  |  |  |  | 1685|  2.02k|        } \
  |  |  |  | 1686|  4.47k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1686:14): [Folded, False: 4.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1693|  4.47k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1693:14): [Folded, False: 4.47k]
  |  |  ------------------
  ------------------
 1740|  4.47k|    }
 1741|       |
 1742|  4.47k|    return IGRAPH_SUCCESS;
 1743|  4.47k|}
igraph_incident:
 1778|  2.95M|) {
 1779|  2.95M|    igraph_int_t length = 0, idx = 0;
 1780|  2.95M|    igraph_int_t i, j;
 1781|  2.95M|    igraph_int_t node = pnode;
 1782|  2.95M|    igraph_bool_t directed = igraph_is_directed(graph);
 1783|       |
 1784|  2.95M|    if (node < 0 || node > igraph_vcount(graph) - 1) {
  ------------------
  |  Branch (1784:9): [True: 0, False: 2.95M]
  |  Branch (1784:21): [True: 0, False: 2.95M]
  ------------------
 1785|      0|        IGRAPH_ERRORF("Vertex %" IGRAPH_PRId " is not in the graph.", IGRAPH_EINVVID, node);
  ------------------
  |  |  464|      0|    do { \
  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  467|      0|        return igraph_errno; \
  |  |  468|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1786|      0|    }
 1787|  2.95M|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (1787:9): [True: 2.91M, False: 30.9k]
  |  Branch (1787:31): [True: 2.91M, False: 0]
  ------------------
 1788|  2.91M|        mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1788:9): [True: 0, False: 2.91M]
  ------------------
 1789|      0|        IGRAPH_ERROR("Mode should be either IGRAPH_OUT, IGRAPH_IN or IGRAPH_ALL.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1790|      0|    }
 1791|       |
 1792|  2.95M|    if (!directed) {
  ------------------
  |  Branch (1792:9): [True: 2.95M, False: 0]
  ------------------
 1793|  2.95M|        mode = IGRAPH_ALL;
 1794|  2.95M|    }
 1795|       |
 1796|  2.95M|    if (mode != IGRAPH_ALL && loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1796:9): [True: 0, False: 2.95M]
  |  Branch (1796:31): [True: 0, False: 0]
  ------------------
 1797|       |        /*
 1798|       |        IGRAPH_ERROR("For a directed graph (with directions not ignored), "
 1799|       |                     "IGRAPH_LOOPS_TWICE does not make sense.", IGRAPH_EINVAL);
 1800|       |        */
 1801|      0|        loops = IGRAPH_LOOPS_ONCE;
 1802|      0|    }
 1803|       |
 1804|       |    /* Calculate needed space first & allocate it */
 1805|       |    /* Note that 'mode' is treated as a bit field here; it's okay because
 1806|       |     * IGRAPH_ALL = IGRAPH_IN | IGRAPH_OUT, bit-wise */
 1807|  2.95M|    if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1807:9): [True: 2.95M, False: 0]
  ------------------
 1808|  2.95M|        length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|  2.95M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|  2.95M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1809|  2.95M|    }
 1810|  2.95M|    if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1810:9): [True: 2.95M, False: 0]
  ------------------
 1811|  2.95M|        length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|  2.95M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|  2.95M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1812|  2.95M|    }
 1813|       |
 1814|  2.95M|    IGRAPH_CHECK(igraph_vector_int_resize(eids, length));
  ------------------
  |  |  656|  2.95M|    do { \
  |  |  657|  2.95M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.95M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.95M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.95M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.95M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.95M]
  |  |  ------------------
  ------------------
 1815|       |
 1816|       |    /* The loops below produce an ordering what is consistent with the
 1817|       |     * ordering returned by igraph_neighbors(), and this should be preserved.
 1818|       |     * We are dealing with two sorted lists; one for the successors and one
 1819|       |     * for the predecessors. If we have requested only one of them, we have
 1820|       |     * an easy job. If we have requested both, we need to merge the two lists
 1821|       |     * to ensure that the output is sorted by the vertex IDs of the "other"
 1822|       |     * endpoint of the affected edges */
 1823|  2.95M|    if (!directed || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1823:9): [True: 2.95M, False: 0]
  |  Branch (1823:22): [True: 0, False: 0]
  ------------------
 1824|       |        /* We did not ask for both directions; this is the easy case */
 1825|       |
 1826|  2.95M|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1826:13): [True: 2.95M, False: 0]
  ------------------
 1827|  2.95M|            j = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|  2.95M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1828|  3.83M|            for (i = VECTOR(graph->os)[node]; i < j; i++) {
  ------------------
  |  |   60|  2.95M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1828:47): [True: 885k, False: 2.95M]
  ------------------
 1829|   885k|                igraph_int_t edge = VECTOR(graph->oi)[i];
  ------------------
  |  |   60|   885k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1830|   885k|                igraph_int_t other = VECTOR(graph->to)[edge];
  ------------------
  |  |   60|   885k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1831|   885k|                if (loops == IGRAPH_NO_LOOPS && other == pnode) {
  ------------------
  |  Branch (1831:21): [True: 0, False: 885k]
  |  Branch (1831:49): [True: 0, False: 0]
  ------------------
 1832|      0|                    length--;
 1833|   885k|                } else {
 1834|   885k|                    VECTOR(*eids)[idx++] = edge;
  ------------------
  |  |   60|   885k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1835|   885k|                }
 1836|   885k|            }
 1837|  2.95M|        }
 1838|       |
 1839|  2.95M|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1839:13): [True: 2.95M, False: 0]
  ------------------
 1840|  2.95M|            j = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|  2.95M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1841|  3.79M|            for (i = VECTOR(graph->is)[node]; i < j; i++) {
  ------------------
  |  |   60|  2.95M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1841:47): [True: 847k, False: 2.95M]
  ------------------
 1842|   847k|                igraph_int_t edge = VECTOR(graph->ii)[i];
  ------------------
  |  |   60|   847k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1843|   847k|                igraph_int_t other = VECTOR(graph->from)[edge];
  ------------------
  |  |   60|   847k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1844|   847k|                if ((loops == IGRAPH_NO_LOOPS || (loops == IGRAPH_LOOPS_ONCE && !directed)) && other == pnode) {
  ------------------
  |  Branch (1844:22): [True: 0, False: 847k]
  |  Branch (1844:51): [True: 73.2k, False: 774k]
  |  Branch (1844:81): [True: 73.2k, False: 0]
  |  Branch (1844:96): [True: 31.7k, False: 41.5k]
  ------------------
 1845|  31.7k|                    length--;
 1846|   815k|                } else {
 1847|   815k|                    VECTOR(*eids)[idx++] = edge;
  ------------------
  |  |   60|   815k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1848|   815k|                }
 1849|   847k|            }
 1850|  2.95M|        }
 1851|  2.95M|    } else {
 1852|       |        /* both in- and out- neighbors in a directed graph,
 1853|       |           we need to merge the two 'vectors' */
 1854|      0|        igraph_int_t j1 = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1855|      0|        igraph_int_t j2 = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1856|      0|        igraph_int_t i1 = VECTOR(graph->os)[node];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1857|      0|        igraph_int_t i2 = VECTOR(graph->is)[node];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1858|      0|        igraph_int_t eid1, eid2;
 1859|      0|        igraph_int_t n1, n2;
 1860|      0|        igraph_bool_t seen_loop_edge = false;
 1861|       |
 1862|      0|        while (i1 < j1 && i2 < j2) {
  ------------------
  |  Branch (1862:16): [True: 0, False: 0]
  |  Branch (1862:27): [True: 0, False: 0]
  ------------------
 1863|      0|            eid1 = VECTOR(graph->oi)[i1];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1864|      0|            eid2 = VECTOR(graph->ii)[i2];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1865|      0|            n1 = VECTOR(graph->to)[eid1];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1866|      0|            n2 = VECTOR(graph->from)[eid2];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1867|      0|            if (n1 < n2) {
  ------------------
  |  Branch (1867:17): [True: 0, False: 0]
  ------------------
 1868|      0|                i1++;
 1869|      0|                VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1870|      0|            } else if (n1 > n2) {
  ------------------
  |  Branch (1870:24): [True: 0, False: 0]
  ------------------
 1871|      0|                i2++;
 1872|      0|                VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1873|      0|            } else if (n1 != pnode) {
  ------------------
  |  Branch (1873:24): [True: 0, False: 0]
  ------------------
 1874|       |                /* multiple edge */
 1875|      0|                i1++;
 1876|      0|                i2++;
 1877|      0|                VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1878|      0|                VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1879|      0|            } else {
 1880|       |                /* loop edge */
 1881|      0|                i1++;
 1882|      0|                i2++;
 1883|      0|                if (loops == IGRAPH_NO_LOOPS) {
  ------------------
  |  Branch (1883:21): [True: 0, False: 0]
  ------------------
 1884|      0|                    length -= 2;
 1885|      0|                } else if (loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (1885:28): [True: 0, False: 0]
  ------------------
 1886|      0|                    length--;
 1887|      0|                    if (!seen_loop_edge) {
  ------------------
  |  Branch (1887:25): [True: 0, False: 0]
  ------------------
 1888|      0|                        VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1889|      0|                    } else {
 1890|      0|                        VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1891|      0|                    }
 1892|      0|                    seen_loop_edge = !seen_loop_edge;
 1893|      0|                } else {
 1894|      0|                    VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1895|      0|                    VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1896|      0|                }
 1897|      0|            }
 1898|      0|        }
 1899|       |
 1900|      0|        while (i1 < j1) {
  ------------------
  |  Branch (1900:16): [True: 0, False: 0]
  ------------------
 1901|      0|            eid1 = VECTOR(graph->oi)[i1++];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1902|      0|            VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1903|      0|        }
 1904|       |
 1905|      0|        while (i2 < j2) {
  ------------------
  |  Branch (1905:16): [True: 0, False: 0]
  ------------------
 1906|      0|            eid2 = VECTOR(graph->ii)[i2++];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1907|      0|            VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1908|      0|        }
 1909|      0|    }
 1910|  2.95M|    IGRAPH_CHECK(igraph_vector_int_resize(eids, length));
  ------------------
  |  |  656|  2.95M|    do { \
  |  |  657|  2.95M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.95M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.95M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.95M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.95M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.95M]
  |  |  ------------------
  ------------------
 1911|  2.95M|    return IGRAPH_SUCCESS;
 1912|  2.95M|}
type_indexededgelist.c:igraph_i_create_start_vectors:
 1076|   102k|        igraph_vector_int_t *iindex, igraph_int_t nodes) {
 1077|       |
 1078|   102k|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
 1079|       |
 1080|   102k|    igraph_int_t no_of_nodes;
 1081|   102k|    igraph_int_t no_of_edges;
 1082|   102k|    igraph_int_t i, j, idx;
 1083|       |
 1084|   102k|    no_of_nodes = nodes;
 1085|   102k|    no_of_edges = igraph_vector_int_size(el);
 1086|       |
 1087|       |    /* result */
 1088|       |
 1089|   102k|    IGRAPH_CHECK(igraph_vector_int_resize(res, nodes + 1));
  ------------------
  |  |  656|   102k|    do { \
  |  |  657|   102k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   102k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   102k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 102k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   102k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 102k]
  |  |  ------------------
  ------------------
 1090|       |
 1091|       |    /* create the index */
 1092|       |
 1093|   102k|    if (no_of_edges == 0) {
  ------------------
  |  Branch (1093:9): [True: 5.05k, False: 96.9k]
  ------------------
 1094|       |        /* empty graph */
 1095|  5.05k|        igraph_vector_int_null(res);
 1096|  96.9k|    } else {
 1097|  96.9k|        idx = -1;
 1098|  2.78M|        for (i = 0; i <= EDGE(0); i++) {
  ------------------
  |  | 1078|  2.78M|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  2.78M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  2.78M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1098:21): [True: 2.68M, False: 96.9k]
  ------------------
 1099|  2.68M|            idx++; VECTOR(*res)[idx] = 0;
  ------------------
  |  |   60|  2.68M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1100|  2.68M|        }
 1101|  3.20M|        for (i = 1; i < no_of_edges; i++) {
  ------------------
  |  Branch (1101:21): [True: 3.10M, False: 96.9k]
  ------------------
 1102|  3.10M|            igraph_int_t n = EDGE(i) - EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1078|  3.10M|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  3.10M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  3.10M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                          igraph_int_t n = EDGE(i) - EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1078|  3.10M|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  3.10M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  3.10M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1103|  13.6M|            for (j = 0; j < n; j++) {
  ------------------
  |  Branch (1103:25): [True: 10.5M, False: 3.10M]
  ------------------
 1104|  10.5M|                idx++; VECTOR(*res)[idx] = i;
  ------------------
  |  |   60|  10.5M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1105|  10.5M|            }
 1106|  3.10M|        }
 1107|  96.9k|        j = EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1078|  96.9k|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  96.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  96.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1108|  3.89M|        for (i = 0; i < no_of_nodes - j; i++) {
  ------------------
  |  Branch (1108:21): [True: 3.79M, False: 96.9k]
  ------------------
 1109|  3.79M|            idx++; VECTOR(*res)[idx] = no_of_edges;
  ------------------
  |  |   60|  3.79M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1110|  3.79M|        }
 1111|  96.9k|    }
 1112|       |
 1113|       |    /* clean */
 1114|       |
 1115|   102k|# undef EDGE
 1116|   102k|    return IGRAPH_SUCCESS;
 1117|   102k|}

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

igraph_qsort:
  264|   775k|{
  265|       |	local_qsort(a, n, es, cmp, NULL);
  266|   775k|}
qsort.c:local_qsort:
  121|   778k|{
  122|   778k|	char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
  123|   778k|	size_t d1, d2;
  124|   778k|	int cmp_result;
  125|   778k|	int swap_cnt;
  126|       |
  127|       |    /* if there are less than 2 elements, then sorting is not needed */
  128|   778k|    if (IGRAPH_UNLIKELY(n < 2))
  ------------------
  |  |  612|   778k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  ------------------
  |  |  |  Branch (612:32): [True: 745k, False: 33.1k]
  |  |  ------------------
  ------------------
  129|   745k|        return;
  130|  38.4k|loop:
  131|  38.4k|	swap_cnt = 0;
  132|  38.4k|	if (n < 7) {
  ------------------
  |  Branch (132:6): [True: 31.1k, False: 7.37k]
  ------------------
  133|  80.1k|		for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
  ------------------
  |  Branch (133:29): [True: 48.9k, False: 31.1k]
  ------------------
  134|  48.9k|			for (pl = pm;
  135|  78.2k|			     pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
  ------------------
  |  |   95|  63.5k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (135:9): [True: 63.5k, False: 14.7k]
  |  Branch (135:27): [True: 29.2k, False: 34.2k]
  ------------------
  136|  48.9k|			     pl -= es)
  137|  29.2k|				swapfunc(pl, pl - es, es);
  138|  31.1k|		return;
  139|  31.1k|	}
  140|  7.37k|	pm = (char *)a + (n / 2) * es;
  141|  7.37k|	if (n > 7) {
  ------------------
  |  Branch (141:6): [True: 6.19k, False: 1.17k]
  ------------------
  142|  6.19k|		pl = a;
  143|  6.19k|		pn = (char *)a + (n - 1) * es;
  144|  6.19k|		if (n > 40) {
  ------------------
  |  Branch (144:7): [True: 905, False: 5.28k]
  ------------------
  145|    905|			size_t d = (n / 8) * es;
  146|       |
  147|    905|			pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk);
  148|    905|			pm = med3(pm - d, pm, pm + d, cmp, thunk);
  149|    905|			pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk);
  150|    905|		}
  151|  6.19k|		pm = med3(pl, pm, pn, cmp, thunk);
  152|  6.19k|	}
  153|  7.37k|	swapfunc(a, pm, es);
  154|  7.37k|	pa = pb = (char *)a + es;
  155|       |
  156|  7.37k|	pc = pd = (char *)a + (n - 1) * es;
  157|  20.4k|	for (;;) {
  158|   111k|		while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) {
  ------------------
  |  |   95|   108k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (158:10): [True: 108k, False: 3.37k]
  |  Branch (158:22): [True: 91.0k, False: 17.0k]
  ------------------
  159|  91.0k|			if (cmp_result == 0) {
  ------------------
  |  Branch (159:8): [True: 61.2k, False: 29.8k]
  ------------------
  160|  61.2k|				swap_cnt = 1;
  161|  61.2k|				swapfunc(pa, pb, es);
  162|  61.2k|				pa += es;
  163|  61.2k|			}
  164|  91.0k|			pb += es;
  165|  91.0k|		}
  166|  69.3k|		while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) {
  ------------------
  |  |   95|  61.9k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (166:10): [True: 61.9k, False: 7.37k]
  |  Branch (166:22): [True: 48.8k, False: 13.0k]
  ------------------
  167|  48.8k|			if (cmp_result == 0) {
  ------------------
  |  Branch (167:8): [True: 6.87k, False: 42.0k]
  ------------------
  168|  6.87k|				swap_cnt = 1;
  169|  6.87k|				swapfunc(pc, pd, es);
  170|  6.87k|				pd -= es;
  171|  6.87k|			}
  172|  48.8k|			pc -= es;
  173|  48.8k|		}
  174|  20.4k|		if (pb > pc)
  ------------------
  |  Branch (174:7): [True: 7.37k, False: 13.0k]
  ------------------
  175|  7.37k|			break;
  176|  13.0k|		swapfunc(pb, pc, es);
  177|  13.0k|		swap_cnt = 1;
  178|  13.0k|		pb += es;
  179|  13.0k|		pc -= es;
  180|  13.0k|	}
  181|  7.37k|	if (swap_cnt == 0) {  /* Switch to insertion sort */
  ------------------
  |  Branch (181:6): [True: 565, False: 6.80k]
  ------------------
  182|  7.82k|		for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
  ------------------
  |  Branch (182:29): [True: 7.26k, False: 565]
  ------------------
  183|  7.26k|			for (pl = pm;
  184|  18.7k|			     pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
  ------------------
  |  |   95|  17.6k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (184:9): [True: 17.6k, False: 1.08k]
  |  Branch (184:27): [True: 11.5k, False: 6.17k]
  ------------------
  185|  11.5k|			     pl -= es)
  186|  11.5k|				swapfunc(pl, pl - es, es);
  187|    565|		return;
  188|    565|	}
  189|       |
  190|  6.80k|	pn = (char *)a + n * es;
  191|  6.80k|	d1 = MIN(pa - (char *)a, pb - pa);
  ------------------
  |  |   69|  6.80k|#define	MIN(a, b)	((a) < (b) ? a : b)
  |  |  ------------------
  |  |  |  Branch (69:20): [True: 3.67k, False: 3.13k]
  |  |  ------------------
  ------------------
  192|  6.80k|	vecswap(a, pb - d1, d1);
  ------------------
  |  |   88|  6.80k|	if ((n) > 0) swapfunc(a, b, n)
  |  |  ------------------
  |  |  |  Branch (88:6): [True: 4.81k, False: 1.99k]
  |  |  ------------------
  ------------------
  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.80k|	d1 = MIN(pd - pc, pn - pd - (ptrdiff_t)es);
  ------------------
  |  |   69|  6.80k|#define	MIN(a, b)	((a) < (b) ? a : b)
  |  |  ------------------
  |  |  |  Branch (69:20): [True: 390, False: 6.41k]
  |  |  ------------------
  ------------------
  199|  6.80k|	vecswap(pb, pn - d1, d1);
  ------------------
  |  |   88|  6.80k|	if ((n) > 0) swapfunc(a, b, n)
  |  |  ------------------
  |  |  |  Branch (88:6): [True: 700, False: 6.10k]
  |  |  ------------------
  ------------------
  200|       |
  201|  6.80k|	d1 = pb - pa;
  202|  6.80k|	d2 = pd - pc;
  203|  6.80k|	if (d1 <= d2) {
  ------------------
  |  Branch (203:6): [True: 4.79k, False: 2.01k]
  ------------------
  204|       |		/* Recurse on left partition, then iterate on right partition */
  205|  4.79k|		if (d1 > es) {
  ------------------
  |  Branch (205:7): [True: 1.91k, False: 2.87k]
  ------------------
  206|  1.91k|			local_qsort(a, d1 / es, es, cmp, thunk);
  207|  1.91k|		}
  208|  4.79k|		if (d2 > es) {
  ------------------
  |  Branch (208:7): [True: 3.37k, False: 1.42k]
  ------------------
  209|       |			/* Iterate rather than recurse to save stack space */
  210|       |			/* qsort(pn - d2, d2 / es, es, cmp); */
  211|  3.37k|			a = pn - d2;
  212|  3.37k|			n = d2 / es;
  213|  3.37k|			goto loop;
  214|  3.37k|		}
  215|  4.79k|	} else {
  216|       |		/* Recurse on right partition, then iterate on left partition */
  217|  2.01k|		if (d2 > es) {
  ------------------
  |  Branch (217:7): [True: 1.46k, False: 549]
  ------------------
  218|  1.46k|			local_qsort(pn - d2, d2 / es, es, cmp, thunk);
  219|  1.46k|		}
  220|  2.01k|		if (d1 > es) {
  ------------------
  |  Branch (220:7): [True: 1.95k, False: 65]
  ------------------
  221|       |			/* Iterate rather than recurse to save stack space */
  222|       |			/* qsort(a, d1 / es, es, cmp); */
  223|  1.95k|			n = d1 / es;
  224|  1.95k|			goto loop;
  225|  1.95k|		}
  226|  2.01k|	}
  227|  6.80k|}
qsort.c:swapfunc:
   77|   134k|{
   78|   134k|	char t;
   79|       |
   80|  1.09M|	do {
   81|  1.09M|		t = *a;
   82|  1.09M|		*a++ = *b;
   83|  1.09M|		*b++ = t;
   84|  1.09M|	} while (--es > 0);
  ------------------
  |  Branch (84:11): [True: 963k, False: 134k]
  ------------------
   85|   134k|}
qsort.c:med3:
  104|  8.90k|{
  105|  8.90k|	return CMP(thunk, a, b) < 0 ?
  ------------------
  |  |   95|  8.90k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (105:9): [True: 3.97k, False: 4.93k]
  ------------------
  106|  3.97k|	       (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
  ------------------
  |  |   95|  3.97k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
              	       (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
  ------------------
  |  |   95|  2.56k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (106:10): [True: 1.40k, False: 2.56k]
  |  Branch (106:38): [True: 1.03k, False: 1.53k]
  ------------------
  107|  8.90k|	      :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
  ------------------
  |  |   95|  4.93k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
              	      :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
  ------------------
  |  |   95|  4.21k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (107:10): [True: 718, False: 4.21k]
  |  Branch (107:38): [True: 691, False: 3.52k]
  ------------------
  108|  8.90k|}

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

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

igraph_vertex_coloring_greedy:
  302|  4.51k|igraph_error_t igraph_vertex_coloring_greedy(const igraph_t *graph, igraph_vector_int_t *colors, igraph_coloring_greedy_t heuristic) {
  303|  4.51k|    switch (heuristic) {
  304|  2.25k|    case IGRAPH_COLORING_GREEDY_COLORED_NEIGHBORS:
  ------------------
  |  Branch (304:5): [True: 2.25k, False: 2.25k]
  ------------------
  305|  2.25k|        return igraph_i_vertex_coloring_greedy_cn(graph, colors);
  306|  2.25k|    case IGRAPH_COLORING_GREEDY_DSATUR:
  ------------------
  |  Branch (306:5): [True: 2.25k, False: 2.25k]
  ------------------
  307|  2.25k|        return igraph_i_vertex_coloring_dsatur(graph, colors);
  308|      0|    default:
  ------------------
  |  Branch (308:5): [True: 0, False: 4.51k]
  ------------------
  309|      0|        IGRAPH_ERROR("Invalid heuristic for greedy vertex coloring.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  310|  4.51k|    }
  311|  4.51k|}
igraph_is_vertex_coloring:
  333|  4.51k|        igraph_bool_t *res) {
  334|       |
  335|  4.51k|    const igraph_int_t vcount = igraph_vcount(graph);
  336|  4.51k|    const igraph_int_t ecount = igraph_ecount(graph);
  337|  4.51k|    int iter = 0;
  338|       |
  339|  4.51k|    if (igraph_vector_int_size(types) != vcount) {
  ------------------
  |  Branch (339:9): [True: 0, False: 4.51k]
  ------------------
  340|      0|        IGRAPH_ERROR("Invalid vertex type vector length.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  341|      0|    }
  342|       |
  343|  4.51k|    *res = true;
  344|       |
  345|   169k|    for (igraph_int_t e = 0; e < ecount; e++) {
  ------------------
  |  Branch (345:30): [True: 165k, False: 4.51k]
  ------------------
  346|   165k|        igraph_int_t from = IGRAPH_FROM(graph, e);
  ------------------
  |  |  115|   165k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|   165k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  347|   165k|        igraph_int_t to = IGRAPH_TO(graph, e);
  ------------------
  |  |  128|   165k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|   165k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  348|       |
  349|       |        /* Skip self-loops */
  350|   165k|        if (from == to) {
  ------------------
  |  Branch (350:13): [True: 31.1k, False: 134k]
  ------------------
  351|  31.1k|            continue;
  352|  31.1k|        }
  353|       |
  354|   134k|        if (VECTOR(*types)[from] == VECTOR(*types)[to]) {
  ------------------
  |  |   60|   134k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (VECTOR(*types)[from] == VECTOR(*types)[to]) {
  ------------------
  |  |   60|   134k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (354:13): [True: 0, False: 134k]
  ------------------
  355|      0|            *res = false;
  356|      0|            break;
  357|      0|        }
  358|       |
  359|   134k|        IGRAPH_ALLOW_INTERRUPTION_LIMITED(iter, 1 << 10);
  ------------------
  |  |   71|   134k|    do { \
  |  |   72|   134k|        if (++iter >= skips) { \
  |  |  ------------------
  |  |  |  Branch (72:13): [True: 0, False: 134k]
  |  |  ------------------
  |  |   73|      0|            IGRAPH_ALLOW_INTERRUPTION(); \
  |  |  ------------------
  |  |  |  |   46|      0|    do { \
  |  |  |  |   47|      0|        if (igraph_i_interruption_handler) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (47:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |  |  |   50|      0|            } \
  |  |  |  |   51|      0|        } \
  |  |  |  |   52|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   74|      0|            iter = 0; \
  |  |   75|      0|        } \
  |  |   76|   134k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (76:14): [Folded, False: 134k]
  |  |  ------------------
  ------------------
  360|   134k|    }
  361|       |
  362|  4.51k|    return IGRAPH_SUCCESS;
  363|  4.51k|}
coloring.c:igraph_i_vertex_coloring_greedy_cn:
   32|  2.25k|static igraph_error_t igraph_i_vertex_coloring_greedy_cn(const igraph_t *graph, igraph_vector_int_t *colors) {
   33|  2.25k|    igraph_int_t i, vertex, maxdeg;
   34|  2.25k|    igraph_int_t vc = igraph_vcount(graph);
   35|  2.25k|    igraph_2wheap_t cn; /* indexed heap storing number of already coloured neighbours */
   36|  2.25k|    igraph_vector_int_t neighbors, nei_colors;
   37|       |
   38|  2.25k|    IGRAPH_CHECK(igraph_vector_int_resize(colors, vc));
  ------------------
  |  |  656|  2.25k|    do { \
  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
   39|  2.25k|    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.25k|    if (vc <= 1) {
  ------------------
  |  Branch (45:9): [True: 19, False: 2.23k]
  ------------------
   46|     19|        return IGRAPH_SUCCESS;
   47|     19|    }
   48|       |
   49|       |    /* find maximum degree and a corresponding vertex */
   50|  2.23k|    {
   51|  2.23k|        igraph_vector_int_t degree;
   52|       |
   53|  2.23k|        IGRAPH_VECTOR_INT_INIT_FINALLY(&degree, 0);
  ------------------
  |  |  119|  2.23k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.23k|    do { \
  |  |  |  |  657|  2.23k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.23k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.23k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.23k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.23k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.23k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.23k|    do { \
  |  |  |  |  604|  2.23k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.23k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.23k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.23k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.23k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.23k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.23k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.23k]
  |  |  ------------------
  ------------------
   54|  2.23k|        IGRAPH_CHECK(igraph_degree(graph, &degree, igraph_vss_all(), IGRAPH_ALL, IGRAPH_NO_LOOPS));
  ------------------
  |  |  656|  2.23k|    do { \
  |  |  657|  2.23k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.23k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.23k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.23k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.23k]
  |  |  ------------------
  ------------------
   55|       |
   56|  2.23k|        vertex = igraph_vector_int_which_max(&degree);
   57|  2.23k|        maxdeg = VECTOR(degree)[vertex];
  ------------------
  |  |   60|  2.23k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   58|       |
   59|  2.23k|        igraph_vector_int_destroy(&degree);
   60|  2.23k|        IGRAPH_FINALLY_CLEAN(1);
   61|  2.23k|    }
   62|       |
   63|  2.23k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&nei_colors, 0);
  ------------------
  |  |  119|  2.23k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.23k|    do { \
  |  |  |  |  657|  2.23k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.23k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.23k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.23k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.23k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.23k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.23k|    do { \
  |  |  |  |  604|  2.23k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.23k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.23k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.23k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.23k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.23k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.23k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.23k]
  |  |  ------------------
  ------------------
   64|  2.23k|    IGRAPH_CHECK(igraph_vector_int_reserve(&nei_colors, maxdeg));
  ------------------
  |  |  656|  2.23k|    do { \
  |  |  657|  2.23k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.23k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.23k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.23k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.23k]
  |  |  ------------------
  ------------------
   65|       |
   66|  2.23k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neighbors, 0);
  ------------------
  |  |  119|  2.23k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.23k|    do { \
  |  |  |  |  657|  2.23k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.23k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.23k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.23k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.23k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.23k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.23k|    do { \
  |  |  |  |  604|  2.23k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.23k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.23k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.23k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.23k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.23k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.23k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.23k]
  |  |  ------------------
  ------------------
   67|  2.23k|    IGRAPH_CHECK(igraph_vector_int_reserve(&neighbors, maxdeg));
  ------------------
  |  |  656|  2.23k|    do { \
  |  |  657|  2.23k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.23k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.23k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.23k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.23k]
  |  |  ------------------
  ------------------
   68|       |
   69|       |    /* two-way indexed heap holding number of already colored neighbors of yet-uncolored vertices */
   70|  2.23k|    IGRAPH_CHECK(igraph_2wheap_init(&cn, vc));
  ------------------
  |  |  656|  2.23k|    do { \
  |  |  657|  2.23k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.23k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.23k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.23k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.23k]
  |  |  ------------------
  ------------------
   71|  2.23k|    IGRAPH_FINALLY(igraph_2wheap_destroy, &cn);
  ------------------
  |  |  603|  2.23k|    do { \
  |  |  604|  2.23k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.23k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.23k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.23k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.23k]
  |  |  ------------------
  |  |  608|  2.23k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.23k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.23k]
  |  |  ------------------
  ------------------
   72|   389k|    for (i = 0; i < vc; ++i) {
  ------------------
  |  Branch (72:17): [True: 386k, False: 2.23k]
  ------------------
   73|   386k|        if (i != vertex) {
  ------------------
  |  Branch (73:13): [True: 384k, False: 2.23k]
  ------------------
   74|   384k|            igraph_2wheap_push_with_index(&cn, i, 0); /* should not fail since memory was already reserved */
   75|   384k|        }
   76|   386k|    }
   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|   386k|    while (true) {
  ------------------
  |  Branch (81:12): [True: 386k, Folded]
  ------------------
   82|   386k|        IGRAPH_CHECK(igraph_neighbors(graph, &neighbors, vertex, IGRAPH_ALL, IGRAPH_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|   386k|    do { \
  |  |  657|   386k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   386k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   386k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 386k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   386k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 386k]
  |  |  ------------------
  ------------------
   83|   386k|        igraph_int_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|   386k|        {
   90|   386k|            igraph_int_t col;
   91|       |
   92|   386k|            IGRAPH_CHECK(igraph_vector_int_resize(&nei_colors, nei_count));
  ------------------
  |  |  656|   386k|    do { \
  |  |  657|   386k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   386k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   386k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 386k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   386k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 386k]
  |  |  ------------------
  ------------------
   93|   550k|            for (i = 0; i < nei_count; ++i) {
  ------------------
  |  Branch (93:25): [True: 163k, False: 386k]
  ------------------
   94|   163k|                VECTOR(nei_colors)[i] = VECTOR(*colors)[ VECTOR(neighbors)[i] ];
  ------------------
  |  |   60|   163k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(nei_colors)[i] = VECTOR(*colors)[ VECTOR(neighbors)[i] ];
  ------------------
  |  |   60|   163k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(nei_colors)[i] = VECTOR(*colors)[ VECTOR(neighbors)[i] ];
  ------------------
  |  |   60|   163k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   95|   163k|            }
   96|   386k|            igraph_vector_int_sort(&nei_colors);
   97|       |
   98|   386k|            i = 0;
   99|   386k|            col = 0;
  100|   428k|            do {
  101|   576k|                while (i < nei_count && VECTOR(nei_colors)[i] == col) {
  ------------------
  |  |   60|   203k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (101:24): [True: 203k, False: 373k]
  |  Branch (101:41): [True: 148k, False: 54.7k]
  ------------------
  102|   148k|                    i++;
  103|   148k|                }
  104|   428k|                col++;
  105|   428k|            } while (i < nei_count && VECTOR(nei_colors)[i] == col);
  ------------------
  |  |   60|  54.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (105:22): [True: 54.7k, False: 373k]
  |  Branch (105:39): [True: 41.3k, False: 13.4k]
  ------------------
  106|       |
  107|   386k|            VECTOR(*colors)[vertex] = col;
  ------------------
  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  108|   386k|        }
  109|       |
  110|       |        /* increment number of coloured neighbours for each neighbour of vertex */
  111|   550k|        for (i = 0; i < nei_count; ++i) {
  ------------------
  |  Branch (111:21): [True: 163k, False: 386k]
  ------------------
  112|   163k|            igraph_int_t idx = VECTOR(neighbors)[i];
  ------------------
  |  |   60|   163k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  113|   163k|            if (igraph_2wheap_has_elem(&cn, idx)) {
  ------------------
  |  Branch (113:17): [True: 67.1k, False: 96.5k]
  ------------------
  114|  67.1k|                igraph_2wheap_modify(&cn, idx, igraph_2wheap_get(&cn, idx) + 1);
  115|  67.1k|            }
  116|   163k|        }
  117|       |
  118|       |        /* stop if no more vertices left to colour */
  119|   386k|        if (igraph_2wheap_empty(&cn)) {
  ------------------
  |  Branch (119:13): [True: 2.23k, False: 384k]
  ------------------
  120|  2.23k|            break;
  121|  2.23k|        }
  122|       |
  123|   384k|        igraph_2wheap_delete_max_index(&cn, &vertex);
  124|       |
  125|   384k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   384k|    do { \
  |  |   47|   384k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 384k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   384k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 384k]
  |  |  ------------------
  ------------------
  126|   384k|    }
  127|       |
  128|       |    /* subtract 1 from each colour value, so that colours start at 0 */
  129|  2.23k|    igraph_vector_int_add_constant(colors, -1);
  130|       |
  131|       |    /* free data structures */
  132|  2.23k|    igraph_vector_int_destroy(&neighbors);
  133|  2.23k|    igraph_vector_int_destroy(&nei_colors);
  134|  2.23k|    igraph_2wheap_destroy(&cn);
  135|  2.23k|    IGRAPH_FINALLY_CLEAN(3);
  136|       |
  137|  2.23k|    return IGRAPH_SUCCESS;
  138|  2.23k|}
coloring.c:igraph_i_vertex_coloring_dsatur:
  214|  2.25k|) {
  215|  2.25k|    igraph_int_t vcount = igraph_vcount(graph);
  216|  2.25k|    IGRAPH_CHECK(igraph_vector_int_resize(colors, vcount));
  ------------------
  |  |  656|  2.25k|    do { \
  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  217|       |
  218|  2.25k|    if (vcount == 0) {
  ------------------
  |  Branch (218:9): [True: 1, False: 2.25k]
  ------------------
  219|      1|        return IGRAPH_SUCCESS;
  220|      1|    }
  221|       |
  222|  2.25k|    if (vcount == 1) {
  ------------------
  |  Branch (222:9): [True: 18, False: 2.23k]
  ------------------
  223|     18|        VECTOR(*colors)[0] = 0;
  ------------------
  |  |   60|     18|#define VECTOR(v) ((v).stor_begin)
  ------------------
  224|     18|        return IGRAPH_SUCCESS;
  225|     18|    }
  226|       |
  227|  2.23k|    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.23k|    igraph_adjlist_t adjlist;
  232|  2.23k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, IGRAPH_ALL, IGRAPH_NO_LOOPS, IGRAPH_NO_MULTIPLE));
  ------------------
  |  |  656|  2.23k|    do { \
  |  |  657|  2.23k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.23k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.23k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.23k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.23k]
  |  |  ------------------
  ------------------
  233|  2.23k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  2.23k|    do { \
  |  |  604|  2.23k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.23k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.23k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.23k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.23k]
  |  |  ------------------
  |  |  608|  2.23k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.23k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.23k]
  |  |  ------------------
  ------------------
  234|       |
  235|  2.23k|    igraph_gen2wheap_t node_degrees_heap;
  236|  2.23k|    IGRAPH_CHECK(igraph_gen2wheap_init(&node_degrees_heap, dsatur_t_compare, sizeof(dsatur_t), vcount));
  ------------------
  |  |  656|  2.23k|    do { \
  |  |  657|  2.23k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.23k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.23k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.23k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.23k]
  |  |  ------------------
  ------------------
  237|  2.23k|    IGRAPH_FINALLY(igraph_gen2wheap_destroy, &node_degrees_heap);
  ------------------
  |  |  603|  2.23k|    do { \
  |  |  604|  2.23k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.23k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.23k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.23k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.23k]
  |  |  ------------------
  |  |  608|  2.23k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.23k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.23k]
  |  |  ------------------
  ------------------
  238|       |
  239|   389k|    for (igraph_int_t vertex = 0; vertex < vcount; vertex++) {
  ------------------
  |  Branch (239:35): [True: 386k, False: 2.23k]
  ------------------
  240|   386k|        dsatur_t dsatur;
  241|   386k|        dsatur.saturation_degree = 0;
  242|   386k|        dsatur.edge_degree = igraph_vector_int_size(igraph_adjlist_get(&adjlist, vertex));
  ------------------
  |  |   73|   386k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  243|   386k|        IGRAPH_CHECK(igraph_gen2wheap_push_with_index(&node_degrees_heap, vertex, &dsatur));
  ------------------
  |  |  656|   386k|    do { \
  |  |  657|   386k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   386k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   386k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 386k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   386k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 386k]
  |  |  ------------------
  ------------------
  244|   386k|    }
  245|       |
  246|  2.23k|    igraph_vector_int_t used_colors_sorted;
  247|  2.23k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&used_colors_sorted, 0);
  ------------------
  |  |  119|  2.23k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.23k|    do { \
  |  |  |  |  657|  2.23k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.23k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.23k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.23k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.23k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.23k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.23k|    do { \
  |  |  |  |  604|  2.23k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.23k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.23k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.23k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.23k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.23k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.23k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.23k]
  |  |  ------------------
  ------------------
  248|       |
  249|   389k|    while (! igraph_gen2wheap_empty(&node_degrees_heap)) {
  ------------------
  |  Branch (249:12): [True: 386k, False: 2.23k]
  ------------------
  250|   386k|        igraph_int_t node_to_color = igraph_gen2wheap_max_index(&node_degrees_heap);
  251|   386k|        igraph_vector_int_t *neighbors = igraph_adjlist_get(&adjlist, node_to_color);
  ------------------
  |  |   73|   386k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  252|   386k|        igraph_int_t nei_count = igraph_vector_int_size(neighbors);
  253|   386k|        igraph_vector_int_clear(&used_colors_sorted);
  254|   500k|        for (igraph_int_t i=0; i < nei_count; i++) {
  ------------------
  |  Branch (254:32): [True: 113k, False: 386k]
  ------------------
  255|   113k|            igraph_int_t nei = VECTOR(*neighbors)[i];
  ------------------
  |  |   60|   113k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  256|   113k|            if (VECTOR(*colors)[nei] != -1) {
  ------------------
  |  |   60|   113k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (256:17): [True: 56.6k, False: 56.6k]
  ------------------
  257|  56.6k|                IGRAPH_CHECK(igraph_vector_int_push_back(&used_colors_sorted, VECTOR(*colors)[nei]));
  ------------------
  |  |  656|  56.6k|    do { \
  |  |  657|  56.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  56.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  56.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 56.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  56.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 56.6k]
  |  |  ------------------
  ------------------
  258|  56.6k|            }
  259|   113k|        }
  260|   386k|        igraph_vector_int_sort(&used_colors_sorted);
  261|   386k|        igraph_int_t color = dsatur_get_first_viable_color(&used_colors_sorted);
  262|   386k|        dsatur_update_heap(&adjlist, &node_degrees_heap, neighbors, colors, color);
  263|   386k|        VECTOR(*colors)[node_to_color] = color;
  ------------------
  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  264|       |
  265|   386k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   386k|    do { \
  |  |   47|   386k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 386k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   386k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 386k]
  |  |  ------------------
  ------------------
  266|   386k|    }
  267|       |
  268|  2.23k|    igraph_vector_int_destroy(&used_colors_sorted);
  269|  2.23k|    igraph_gen2wheap_destroy(&node_degrees_heap);
  270|  2.23k|    igraph_adjlist_destroy(&adjlist);
  271|  2.23k|    IGRAPH_FINALLY_CLEAN(3);
  272|       |
  273|  2.23k|    return IGRAPH_SUCCESS;
  274|  2.23k|}
coloring.c:dsatur_t_compare:
  147|  3.20M|static int dsatur_t_compare(const void *left, const void *right) {
  148|  3.20M|    const dsatur_t *left_d  = left;
  149|  3.20M|    const dsatur_t *right_d = right;
  150|  3.20M|    if (left_d->saturation_degree == right_d->saturation_degree) {
  ------------------
  |  Branch (150:9): [True: 2.88M, False: 317k]
  ------------------
  151|  2.88M|        if (left_d->edge_degree == right_d->edge_degree) {
  ------------------
  |  Branch (151:13): [True: 2.25M, False: 627k]
  ------------------
  152|  2.25M|            return 0;
  153|  2.25M|        } else if (left_d->edge_degree > right_d->edge_degree) {
  ------------------
  |  Branch (153:20): [True: 123k, False: 503k]
  ------------------
  154|   123k|            return 1;
  155|   503k|        } else {
  156|   503k|            return -1;
  157|   503k|        }
  158|  2.88M|    }
  159|   317k|    return left_d->saturation_degree > right_d->saturation_degree ? 1 : -1;
  ------------------
  |  Branch (159:12): [True: 145k, False: 172k]
  ------------------
  160|  3.20M|}
coloring.c:dsatur_get_first_viable_color:
  199|   386k|static igraph_int_t dsatur_get_first_viable_color(const igraph_vector_int_t *used_colors_sorted) {
  200|   386k|    igraph_int_t color_count = igraph_vector_int_size(used_colors_sorted);
  201|   386k|    igraph_int_t i = 0;
  202|   386k|    igraph_int_t col = 0;
  203|   429k|    while (i < color_count && VECTOR(*used_colors_sorted)[i] == col) {
  ------------------
  |  |   60|  54.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (203:12): [True: 54.7k, False: 374k]
  |  Branch (203:31): [True: 42.3k, False: 12.3k]
  ------------------
  204|  86.0k|        while (i < color_count && VECTOR(*used_colors_sorted)[i] == col) {
  ------------------
  |  |   60|  45.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (204:16): [True: 45.9k, False: 40.0k]
  |  Branch (204:35): [True: 43.6k, False: 2.28k]
  ------------------
  205|  43.6k|            i++;
  206|  43.6k|        }
  207|  42.3k|        col++;
  208|  42.3k|    }
  209|   386k|    return  col;
  210|   386k|}
coloring.c:dsatur_update_heap:
  182|   386k|) {
  183|   386k|    igraph_gen2wheap_delete_max(node_degrees_heap);
  184|   386k|    igraph_int_t nei_count = igraph_vector_int_size(neighbors);
  185|   500k|    for (igraph_int_t i=0; i < nei_count; i++) {
  ------------------
  |  Branch (185:28): [True: 113k, False: 386k]
  ------------------
  186|   113k|        igraph_int_t nei = VECTOR(*neighbors)[i];
  ------------------
  |  |   60|   113k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  187|   113k|        if (!igraph_gen2wheap_has_elem(node_degrees_heap, nei)) {
  ------------------
  |  Branch (187:13): [True: 56.6k, False: 56.6k]
  ------------------
  188|  56.6k|            continue;
  189|  56.6k|        }
  190|  56.6k|        dsatur_t deg_data = *((dsatur_t*) igraph_gen2wheap_get(node_degrees_heap, nei));
  191|  56.6k|        if (!dsatur_is_color_used_by_neighbour(colors, color, igraph_adjlist_get(adjlist, nei))) {
  ------------------
  |  |   73|  56.6k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  |  Branch (191:13): [True: 55.0k, False: 1.60k]
  ------------------
  192|  55.0k|            deg_data.saturation_degree++;
  193|  55.0k|        }
  194|  56.6k|        deg_data.edge_degree--;
  195|  56.6k|        igraph_gen2wheap_modify(node_degrees_heap, nei, &deg_data);
  196|  56.6k|    }
  197|   386k|}
coloring.c:dsatur_is_color_used_by_neighbour:
  165|  56.6k|) {
  166|  56.6k|    igraph_int_t nei_count = igraph_vector_int_size(neighbors);
  167|       |
  168|   152k|    for (igraph_int_t i=0; i < nei_count; i++) {
  ------------------
  |  Branch (168:28): [True: 97.5k, False: 55.0k]
  ------------------
  169|  97.5k|        igraph_int_t nei = VECTOR(*neighbors)[i];
  ------------------
  |  |   60|  97.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  170|  97.5k|        if (VECTOR(*colors)[nei] == color) {
  ------------------
  |  |   60|  97.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (170:13): [True: 1.60k, False: 95.9k]
  ------------------
  171|  1.60k|            return true;
  172|  1.60k|        }
  173|  97.5k|    }
  174|       |
  175|  55.0k|    return false;
  176|  56.6k|}

igraph_get_edgelist:
  327|    880|igraph_error_t igraph_get_edgelist(const igraph_t *graph, igraph_vector_int_t *res, igraph_bool_t bycol) {
  328|    880|    return igraph_edges(graph, igraph_ess_all(IGRAPH_EDGEORDER_ID), res, bycol);
  329|    880|}
igraph_to_prufer:
  907|    206|igraph_error_t igraph_to_prufer(const igraph_t *graph, igraph_vector_int_t* prufer) {
  908|       |    /* For generating the Prüfer sequence, we enumerate the vertices u of the tree.
  909|       |       We keep track of the degrees of all vertices, treating vertices
  910|       |       of degree 0 as removed. We maintain the invariant that all leafs
  911|       |       that are still contained in the tree are >= u.
  912|       |       If u is a leaf, we remove it and add its unique neighbor to the Prüfer
  913|       |       sequence. If the removal of u turns the neighbor into a leaf which is < u,
  914|       |       we repeat the procedure for the new leaf and so on. */
  915|    206|    igraph_int_t u;
  916|    206|    igraph_vector_int_t degrees;
  917|    206|    igraph_vector_int_t neighbors;
  918|    206|    igraph_int_t prufer_index = 0;
  919|    206|    igraph_int_t n = igraph_vcount(graph);
  920|    206|    igraph_bool_t is_tree = false;
  921|       |
  922|    206|    IGRAPH_CHECK(igraph_is_tree(graph, &is_tree, NULL, IGRAPH_ALL));
  ------------------
  |  |  656|    206|    do { \
  |  |  657|    206|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    206|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    206|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 206]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    206|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 206]
  |  |  ------------------
  ------------------
  923|       |
  924|    206|    if (!is_tree) {
  ------------------
  |  Branch (924:9): [True: 0, False: 206]
  ------------------
  925|      0|        IGRAPH_ERROR("The graph must be a tree.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  926|      0|    }
  927|       |
  928|    206|    if (n < 2) {
  ------------------
  |  Branch (928:9): [True: 0, False: 206]
  ------------------
  929|      0|        IGRAPH_ERROR("The tree must have at least 2 vertices.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  930|      0|    }
  931|       |
  932|    206|    IGRAPH_CHECK(igraph_vector_int_resize(prufer, n - 2));
  ------------------
  |  |  656|    206|    do { \
  |  |  657|    206|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    206|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    206|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 206]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    206|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 206]
  |  |  ------------------
  ------------------
  933|    206|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, n);
  ------------------
  |  |  119|    206|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    206|    do { \
  |  |  |  |  657|    206|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    206|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    206|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 206]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    206|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 206]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    206|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    206|    do { \
  |  |  |  |  604|    206|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    206|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    206|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    206|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 206]
  |  |  |  |  ------------------
  |  |  |  |  608|    206|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    206|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 206]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 206]
  |  |  ------------------
  ------------------
  934|    206|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neighbors, 1);
  ------------------
  |  |  119|    206|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    206|    do { \
  |  |  |  |  657|    206|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    206|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    206|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 206]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    206|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 206]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    206|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    206|    do { \
  |  |  |  |  604|    206|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    206|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    206|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    206|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 206]
  |  |  |  |  ------------------
  |  |  |  |  608|    206|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    206|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 206]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 206]
  |  |  ------------------
  ------------------
  935|       |
  936|    206|    IGRAPH_CHECK(igraph_degree(graph, &degrees, igraph_vss_all(), IGRAPH_ALL, IGRAPH_NO_LOOPS));
  ------------------
  |  |  656|    206|    do { \
  |  |  657|    206|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    206|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    206|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 206]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    206|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 206]
  |  |  ------------------
  ------------------
  937|       |
  938|  5.92k|    for (u = 0; u < n; ++u) {
  ------------------
  |  Branch (938:17): [True: 5.71k, False: 206]
  ------------------
  939|  5.71k|        igraph_int_t degree = VECTOR(degrees)[u];
  ------------------
  |  |   60|  5.71k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  940|  5.71k|        igraph_int_t leaf = u;
  941|       |
  942|  11.2k|        while (degree == 1 && leaf <= u) {
  ------------------
  |  Branch (942:16): [True: 5.98k, False: 5.24k]
  |  Branch (942:31): [True: 5.51k, False: 475]
  ------------------
  943|  5.51k|            igraph_int_t neighbor = 0;
  944|  5.51k|            igraph_int_t neighbor_count = 0;
  945|       |
  946|  5.51k|            VECTOR(degrees)[leaf] = 0; /* mark leaf v as deleted */
  ------------------
  |  |   60|  5.51k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  947|       |
  948|  5.51k|            IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|  5.51k|    do { \
  |  |  657|  5.51k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.51k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  5.51k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.51k]
  |  |  ------------------
  ------------------
  949|  5.51k|                graph, &neighbors, leaf, IGRAPH_ALL, IGRAPH_LOOPS, IGRAPH_MULTIPLE
  950|  5.51k|            ));
  951|       |
  952|       |            /* Find the unique remaining neighbor of the leaf */
  953|  5.51k|            neighbor_count = igraph_vector_int_size(&neighbors);
  954|  8.37k|            for (igraph_int_t i = 0; i < neighbor_count; i++) {
  ------------------
  |  Branch (954:38): [True: 8.37k, False: 0]
  ------------------
  955|  8.37k|                neighbor = VECTOR(neighbors)[i];
  ------------------
  |  |   60|  8.37k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  956|  8.37k|                if (VECTOR(degrees)[neighbor] > 0) {
  ------------------
  |  |   60|  8.37k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (956:21): [True: 5.51k, False: 2.86k]
  ------------------
  957|  5.51k|                    break;
  958|  5.51k|                }
  959|  8.37k|            }
  960|       |
  961|       |            /* remember that we have removed the leaf */
  962|  5.51k|            VECTOR(degrees)[neighbor]--;
  ------------------
  |  |   60|  5.51k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  963|  5.51k|            degree = VECTOR(degrees)[neighbor];
  ------------------
  |  |   60|  5.51k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  964|       |
  965|       |            /* Add the neighbor to the prufer sequence unless it is the last vertex
  966|       |            (i.e. degree == 0) */
  967|  5.51k|            if (degree > 0) {
  ------------------
  |  Branch (967:17): [True: 5.30k, False: 206]
  ------------------
  968|  5.30k|                VECTOR(*prufer)[prufer_index] = neighbor;
  ------------------
  |  |   60|  5.30k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  969|  5.30k|                prufer_index++;
  970|  5.30k|            }
  971|  5.51k|            leaf = neighbor;
  972|  5.51k|        }
  973|  5.71k|    }
  974|       |
  975|    206|    igraph_vector_int_destroy(&degrees);
  976|    206|    igraph_vector_int_destroy(&neighbors);
  977|    206|    IGRAPH_FINALLY_CLEAN(2);
  978|       |
  979|    206|    return IGRAPH_SUCCESS;
  980|    206|}

igraph_realize_degree_sequence:
 1011|  34.8k|{
 1012|  34.8k|    bool directed = indeg != NULL;
 1013|       |
 1014|  34.8k|    if (directed) {
  ------------------
  |  Branch (1014:9): [True: 0, False: 34.8k]
  ------------------
 1015|      0|        return igraph_i_realize_directed_degree_sequence(graph, outdeg, indeg, allowed_edge_types, method);
 1016|  34.8k|    } else {
 1017|  34.8k|        return igraph_i_realize_undirected_degree_sequence(graph, outdeg, allowed_edge_types, method);
 1018|  34.8k|    }
 1019|  34.8k|}
degree_sequence.cpp:_ZL43igraph_i_realize_undirected_degree_sequenceP8igraph_tPK19igraph_vector_int_tj23igraph_realize_degseq_t:
  725|  34.8k|    igraph_realize_degseq_t method) {
  726|  34.8k|    igraph_int_t node_count = igraph_vector_int_size(deg);
  727|  34.8k|    igraph_int_t deg_sum;
  728|       |
  729|  34.8k|    IGRAPH_CHECK(igraph_i_safe_vector_int_sum(deg, &deg_sum));
  ------------------
  |  |  656|  34.8k|    do { \
  |  |  657|  34.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  34.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  34.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 34.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  34.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 34.8k]
  |  |  ------------------
  ------------------
  730|       |
  731|  34.8k|    if (deg_sum % 2 != 0) {
  ------------------
  |  Branch (731:9): [True: 0, False: 34.8k]
  ------------------
  732|      0|        IGRAPH_ERROR("The sum of degrees must be even for an undirected graph.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  733|      0|    }
  734|       |
  735|  34.8k|    if (node_count > 0 && igraph_vector_int_min(deg) < 0) {
  ------------------
  |  Branch (735:9): [True: 34.8k, False: 18]
  |  Branch (735:27): [True: 0, False: 34.8k]
  ------------------
  736|      0|        IGRAPH_ERROR("Vertex degrees must be non-negative.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  737|      0|    }
  738|       |
  739|  34.8k|    igraph_vector_int_t edges;
  740|  34.8k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, deg_sum);
  ------------------
  |  |  119|  34.8k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  34.8k|    do { \
  |  |  |  |  657|  34.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  34.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  34.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 34.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  34.8k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 34.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  34.8k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  34.8k|    do { \
  |  |  |  |  604|  34.8k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  34.8k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  34.8k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  34.8k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 34.8k]
  |  |  |  |  ------------------
  |  |  |  |  608|  34.8k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  34.8k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 34.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 34.8k]
  |  |  ------------------
  ------------------
  741|       |
  742|  34.8k|    IGRAPH_HANDLE_EXCEPTIONS_BEGIN;
  ------------------
  |  |   21|  34.8k|    try {
  ------------------
  743|  34.8k|    if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) && (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW ) )
  ------------------
  |  |   25|  13.5k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
                  if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) && (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW ) )
  ------------------
  |  |   26|  13.5k|#define IGRAPH_I_MULTI_LOOPS_SW 0x04 /* 100, more than one self-loop allowed on the same vertex   */
  ------------------
  |  Branch (743:10): [True: 13.5k, False: 21.3k]
  |  Branch (743:52): [True: 13.5k, False: 0]
  |  Branch (743:102): [True: 13.5k, False: 0]
  ------------------
  744|  13.5k|    {
  745|  13.5k|        switch (method) {
  746|  4.51k|        case IGRAPH_REALIZE_DEGSEQ_SMALLEST:
  ------------------
  |  Branch (746:9): [True: 4.51k, False: 9.03k]
  ------------------
  747|  4.51k|            IGRAPH_CHECK(igraph_i_realize_undirected_multi(deg, &edges, true, false));
  ------------------
  |  |  656|  4.51k|    do { \
  |  |  657|  4.51k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.51k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.51k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.51k]
  |  |  ------------------
  ------------------
  748|  4.51k|            break;
  749|  4.51k|        case IGRAPH_REALIZE_DEGSEQ_LARGEST:
  ------------------
  |  Branch (749:9): [True: 4.51k, False: 9.03k]
  ------------------
  750|  4.51k|            IGRAPH_CHECK(igraph_i_realize_undirected_multi(deg, &edges, true, true));
  ------------------
  |  |  656|  4.51k|    do { \
  |  |  657|  4.51k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.51k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.51k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.51k]
  |  |  ------------------
  ------------------
  751|  4.51k|            break;
  752|  4.51k|        case IGRAPH_REALIZE_DEGSEQ_INDEX:
  ------------------
  |  Branch (752:9): [True: 4.51k, False: 9.03k]
  ------------------
  753|  4.51k|            IGRAPH_CHECK(igraph_i_realize_undirected_multi_index(deg, &edges, true));
  ------------------
  |  |  656|  4.51k|    do { \
  |  |  657|  4.51k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.51k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.51k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.51k]
  |  |  ------------------
  ------------------
  754|  4.51k|            break;
  755|  4.51k|        default:
  ------------------
  |  Branch (755:9): [True: 0, False: 13.5k]
  ------------------
  756|      0|            IGRAPH_ERROR("Invalid degree sequence realization method.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  757|  13.5k|        }
  758|  13.5k|    }
  759|  21.3k|    else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) )
  ------------------
  |  |   25|  21.3k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (759:15): [True: 21.3k, False: 0]
  |  Branch (759:59): [True: 11.0k, False: 10.2k]
  ------------------
  760|  11.0k|    {
  761|  11.0k|        switch (method) {
  762|  3.69k|        case IGRAPH_REALIZE_DEGSEQ_SMALLEST:
  ------------------
  |  Branch (762:9): [True: 3.69k, False: 7.38k]
  ------------------
  763|  3.69k|            IGRAPH_CHECK(igraph_i_realize_undirected_multi(deg, &edges, false, false));
  ------------------
  |  |  656|  3.69k|    do { \
  |  |  657|  3.69k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  3.69k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  3.69k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 402, False: 3.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|    402|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|    402|    do { \
  |  |  |  |  427|    402|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|    402|        return igraph_errno ; \
  |  |  |  |  429|    402|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|    402|        } \
  |  |  661|  3.69k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 3.28k]
  |  |  ------------------
  ------------------
  764|  3.28k|            break;
  765|  3.69k|        case IGRAPH_REALIZE_DEGSEQ_LARGEST:
  ------------------
  |  Branch (765:9): [True: 3.69k, False: 7.38k]
  ------------------
  766|  3.69k|            IGRAPH_CHECK(igraph_i_realize_undirected_multi(deg, &edges, false, true));
  ------------------
  |  |  656|  3.69k|    do { \
  |  |  657|  3.69k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  3.69k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  3.69k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 402, False: 3.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|    402|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|    402|    do { \
  |  |  |  |  427|    402|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|    402|        return igraph_errno ; \
  |  |  |  |  429|    402|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|    402|        } \
  |  |  661|  3.69k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 3.28k]
  |  |  ------------------
  ------------------
  767|  3.28k|            break;
  768|  3.69k|        case IGRAPH_REALIZE_DEGSEQ_INDEX:
  ------------------
  |  Branch (768:9): [True: 3.69k, False: 7.38k]
  ------------------
  769|  3.69k|            IGRAPH_CHECK(igraph_i_realize_undirected_multi_index(deg, &edges, false));
  ------------------
  |  |  656|  3.69k|    do { \
  |  |  657|  3.69k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  3.69k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  3.69k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 402, False: 3.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|    402|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|    402|    do { \
  |  |  |  |  427|    402|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|    402|        return igraph_errno ; \
  |  |  |  |  429|    402|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|    402|        } \
  |  |  661|  3.69k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 3.28k]
  |  |  ------------------
  ------------------
  770|  3.28k|            break;
  771|  3.28k|        default:
  ------------------
  |  Branch (771:9): [True: 0, False: 11.0k]
  ------------------
  772|      0|            IGRAPH_ERROR("Invalid degree sequence realization method.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  773|  11.0k|        }
  774|  11.0k|    }
  775|  10.2k|    else if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) )
  ------------------
  |  |   26|      0|#define IGRAPH_I_MULTI_LOOPS_SW 0x04 /* 100, more than one self-loop allowed on the same vertex   */
  ------------------
                  else if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) )
  ------------------
  |  |   25|      0|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (775:15): [True: 0, False: 10.2k]
  |  Branch (775:57): [True: 0, False: 0]
  |  Branch (775:109): [True: 0, False: 0]
  ------------------
  776|      0|    {
  777|      0|        IGRAPH_ERROR("Graph realization with at most one self-loop per vertex is not implemented.", IGRAPH_UNIMPLEMENTED);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  778|      0|    }
  779|  10.2k|    else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) )
  ------------------
  |  |   25|  10.2k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (779:15): [True: 10.2k, False: 0]
  |  Branch (779:59): [True: 10.2k, False: 0]
  ------------------
  780|  10.2k|    {
  781|  10.2k|        switch (method) {
  782|  3.41k|        case IGRAPH_REALIZE_DEGSEQ_SMALLEST:
  ------------------
  |  Branch (782:9): [True: 3.41k, False: 6.83k]
  ------------------
  783|  3.41k|            IGRAPH_CHECK(igraph_i_havel_hakimi(deg, &edges, IGRAPH_REALIZE_DEGSEQ_SMALLEST));
  ------------------
  |  |  656|  3.41k|    do { \
  |  |  657|  3.41k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  3.41k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  3.41k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 740, False: 2.67k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|    740|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|    740|    do { \
  |  |  |  |  427|    740|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|    740|        return igraph_errno ; \
  |  |  |  |  429|    740|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|    740|        } \
  |  |  661|  3.41k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.67k]
  |  |  ------------------
  ------------------
  784|  2.67k|            break;
  785|  3.41k|        case IGRAPH_REALIZE_DEGSEQ_LARGEST:
  ------------------
  |  Branch (785:9): [True: 3.41k, False: 6.83k]
  ------------------
  786|  3.41k|            IGRAPH_CHECK(igraph_i_havel_hakimi(deg, &edges, IGRAPH_REALIZE_DEGSEQ_LARGEST));
  ------------------
  |  |  656|  3.41k|    do { \
  |  |  657|  3.41k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  3.41k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  3.41k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 740, False: 2.67k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|    740|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|    740|    do { \
  |  |  |  |  427|    740|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|    740|        return igraph_errno ; \
  |  |  |  |  429|    740|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|    740|        } \
  |  |  661|  3.41k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.67k]
  |  |  ------------------
  ------------------
  787|  2.67k|            break;
  788|  3.41k|        case IGRAPH_REALIZE_DEGSEQ_INDEX:
  ------------------
  |  Branch (788:9): [True: 3.41k, False: 6.83k]
  ------------------
  789|  3.41k|            IGRAPH_CHECK(igraph_i_havel_hakimi(deg, &edges, IGRAPH_REALIZE_DEGSEQ_INDEX));
  ------------------
  |  |  656|  3.41k|    do { \
  |  |  657|  3.41k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  3.41k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  3.41k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 740, False: 2.67k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|    740|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|    740|    do { \
  |  |  |  |  427|    740|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|    740|        return igraph_errno ; \
  |  |  |  |  429|    740|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|    740|        } \
  |  |  661|  3.41k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.67k]
  |  |  ------------------
  ------------------
  790|  2.67k|            break;
  791|  2.67k|        default:
  ------------------
  |  Branch (791:9): [True: 0, False: 10.2k]
  ------------------
  792|      0|            IGRAPH_ERROR("Invalid degree sequence realization method.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  793|  10.2k|        }
  794|  10.2k|    }
  795|      0|    else
  796|      0|    {
  797|       |        /* Remaining cases:
  798|       |         *  - At most one self-loop per vertex but multi-edges between distinct vertices allowed.
  799|       |         *  - At most one edge between distinct vertices but multi-self-loops allowed.
  800|       |         * These cases cannot currently be requested through the documented API,
  801|       |         * so no explanatory error message for now. */
  802|      0|        return IGRAPH_UNIMPLEMENTED;
  803|      0|    }
  804|  34.8k|    IGRAPH_HANDLE_EXCEPTIONS_END;
  ------------------
  |  |   23|  34.8k|    } \
  |  |   24|  34.8k|    catch (const std::bad_alloc &e) { IGRAPH_ERROR(e.what(), IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ } \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   25|  34.8k|    catch (const std::range_error &e) { IGRAPH_ERROR(e.what(), IGRAPH_EOVERFLOW); /* LCOV_EXCL_LINE */ } \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   26|  34.8k|    catch (const std::exception &e) { IGRAPH_ERROR(e.what(), IGRAPH_FAILURE); /* LCOV_EXCL_LINE */ } \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|  34.8k|    catch (...) { IGRAPH_ERROR("Unknown exception caught.", IGRAPH_FAILURE); /* LCOV_EXCL_LINE */ }
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  805|       |
  806|  31.4k|    IGRAPH_CHECK(igraph_create(graph, &edges, node_count, false));
  ------------------
  |  |  656|  31.4k|    do { \
  |  |  657|  31.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  31.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  31.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 31.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  31.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 31.4k]
  |  |  ------------------
  ------------------
  807|       |
  808|  31.4k|    igraph_vector_int_destroy(&edges);
  809|  31.4k|    IGRAPH_FINALLY_CLEAN(1);
  810|       |
  811|  31.4k|    return IGRAPH_SUCCESS;
  812|  31.4k|}
degree_sequence.cpp:_ZL33igraph_i_realize_undirected_multiPK19igraph_vector_int_tPS_bb:
  421|  16.4k|static igraph_error_t igraph_i_realize_undirected_multi(const igraph_vector_int_t *deg, igraph_vector_int_t *edges, bool loops, bool largest) {
  422|  16.4k|    igraph_int_t vcount = igraph_vector_int_size(deg);
  423|       |
  424|  16.4k|    if (vcount == 0) {
  ------------------
  |  Branch (424:9): [True: 8, False: 16.4k]
  ------------------
  425|      8|        return IGRAPH_SUCCESS;
  426|      8|    }
  427|       |
  428|  16.4k|    std::vector<vd_pair> vertices;
  429|  16.4k|    vertices.reserve(vcount);
  430|  2.84M|    for (igraph_int_t i = 0; i < vcount; ++i) {
  ------------------
  |  Branch (430:30): [True: 2.83M, False: 16.4k]
  ------------------
  431|  2.83M|        igraph_int_t d = VECTOR(*deg)[i];
  ------------------
  |  |   60|  2.83M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  432|  2.83M|        vertices.push_back(vd_pair(i, d));
  433|  2.83M|    }
  434|       |
  435|       |    // Initial sort in non-increasing order.
  436|       |    // O (V log V)
  437|  16.4k|    std::stable_sort(vertices.begin(), vertices.end(), degree_greater<vd_pair>);
  438|       |
  439|  16.4k|    igraph_int_t ec = 0;
  440|  3.36M|    while (! vertices.empty()) {
  ------------------
  |  Branch (440:12): [True: 3.35M, False: 13.9k]
  ------------------
  441|       |        // Remove any zero degrees, and error on negative ones.
  442|       |
  443|  3.35M|        vd_pair &w = vertices.back();
  444|       |
  445|  3.35M|        if (w.degree == 0) {
  ------------------
  |  Branch (445:13): [True: 2.83M, False: 523k]
  ------------------
  446|  2.83M|            vertices.pop_back();
  447|  2.83M|            continue;
  448|  2.83M|        }
  449|       |
  450|       |        // If only one vertex remains, then the degree sequence cannot be realized as
  451|       |        // a loopless multigraph. We either complete the graph by adding loops on this vertex
  452|       |        // or throw an error, depending on the 'loops' setting.
  453|   523k|        if (vertices.size() == 1) {
  ------------------
  |  Branch (453:13): [True: 2.41k, False: 521k]
  ------------------
  454|  2.41k|            if (loops) {
  ------------------
  |  Branch (454:17): [True: 1.60k, False: 804]
  ------------------
  455|  45.5k|                for (igraph_int_t i = 0; i < w.degree / 2; ++i) {
  ------------------
  |  Branch (455:42): [True: 43.9k, False: 1.60k]
  ------------------
  456|  43.9k|                    VECTOR(*edges)[2 * ec]   = w.vertex;
  ------------------
  |  |   60|  43.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  457|  43.9k|                    VECTOR(*edges)[2 * ec + 1] = w.vertex;
  ------------------
  |  |   60|  43.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  458|  43.9k|                    ec++;
  459|  43.9k|                }
  460|  1.60k|                break;
  461|  1.60k|            } else {
  462|    804|                IGRAPH_ERROR("The given degree sequence cannot be realized as a loopless multigraph.", IGRAPH_EINVAL);
  ------------------
  |  |  426|    804|    do { \
  |  |  427|    804|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|    804|        return igraph_errno ; \
  |  |  429|    804|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  463|    804|            }
  464|  2.41k|        }
  465|       |
  466|       |        // At this point we are guaranteed to have at least two remaining vertices.
  467|       |
  468|   521k|        vd_pair *u, *v;
  469|   521k|        if (largest) {
  ------------------
  |  Branch (469:13): [True: 260k, False: 260k]
  ------------------
  470|   260k|            u = &vertices[0];
  471|   260k|            v = &vertices[1];
  472|   260k|        } else {
  473|   260k|            u = &vertices.front();
  474|   260k|            v = &vertices.back();
  475|   260k|        }
  476|       |
  477|   521k|        u->degree -= 1;
  478|   521k|        v->degree -= 1;
  479|       |
  480|   521k|        VECTOR(*edges)[2*ec]   = u->vertex;
  ------------------
  |  |   60|   521k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  481|   521k|        VECTOR(*edges)[2*ec+1] = v->vertex;
  ------------------
  |  |   60|   521k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  482|   521k|        ec++;
  483|       |
  484|       |        // Now the first element may be out of order.
  485|       |        // If largest=true, the first two elements may be out of order.
  486|       |        // Restore the sorted order using a single step of bubble sort.
  487|   521k|        if (largest) {
  ------------------
  |  Branch (487:13): [True: 260k, False: 260k]
  ------------------
  488|   260k|            bubble_up(vertices.begin() + 1, vertices.end(), degree_greater<vd_pair>);
  489|   260k|        }
  490|   521k|        bubble_up(vertices.begin(), vertices.end(), degree_greater<vd_pair>);
  491|   521k|    }
  492|       |
  493|  15.6k|    return IGRAPH_SUCCESS;
  494|  16.4k|}
degree_sequence.cpp:_ZL9bubble_upINSt3__111__wrap_iterIP7vd_pairEEPFbRKS2_S6_EEvT_S9_T0_:
  396|   781k|static void bubble_up(It first, It last, Compare comp) {
  397|   781k|    if (first == last) {
  ------------------
  |  Branch (397:9): [True: 0, False: 781k]
  ------------------
  398|      0|        return;
  399|      0|    }
  400|   781k|    It it = first;
  401|   781k|    it++;
  402|  29.5M|    while (it != last) {
  ------------------
  |  Branch (402:12): [True: 29.1M, False: 389k]
  ------------------
  403|  29.1M|        if (comp(*first, *it)) {
  ------------------
  |  Branch (403:13): [True: 391k, False: 28.7M]
  ------------------
  404|   391k|            break;
  405|  28.7M|        } else {
  406|  28.7M|            std::swap(*first, *it);
  407|  28.7M|        }
  408|  28.7M|        first = it;
  409|  28.7M|        it++;
  410|  28.7M|    }
  411|   781k|}
degree_sequence.cpp:_ZL39igraph_i_realize_undirected_multi_indexPK19igraph_vector_int_tPS_b:
  497|  8.20k|static igraph_error_t igraph_i_realize_undirected_multi_index(const igraph_vector_int_t *deg, igraph_vector_int_t *edges, bool loops) {
  498|  8.20k|    igraph_int_t vcount = igraph_vector_int_size(deg);
  499|       |
  500|  8.20k|    if (vcount == 0) {
  ------------------
  |  Branch (500:9): [True: 4, False: 8.20k]
  ------------------
  501|      4|        return IGRAPH_SUCCESS;
  502|      4|    }
  503|       |
  504|  8.20k|    typedef std::list<vd_pair> vlist;
  505|  8.20k|    vlist vertices;
  506|  1.42M|    for (igraph_int_t i = 0; i < vcount; ++i) {
  ------------------
  |  Branch (506:30): [True: 1.41M, False: 8.20k]
  ------------------
  507|  1.41M|        vertices.push_back(vd_pair(i, VECTOR(*deg)[i]));
  ------------------
  |  |   60|  1.41M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  508|  1.41M|    }
  509|       |
  510|  8.20k|    std::vector<vlist::iterator> pointers;
  511|  8.20k|    pointers.reserve(vcount);
  512|  1.42M|    for (auto it = vertices.begin(); it != vertices.end(); ++it) {
  ------------------
  |  Branch (512:38): [True: 1.41M, False: 8.20k]
  ------------------
  513|  1.41M|        pointers.push_back(it);
  514|  1.41M|    }
  515|       |
  516|       |    // Initial sort
  517|  8.20k|    vertices.sort(degree_greater<vd_pair>);
  518|       |
  519|  8.20k|    igraph_int_t ec = 0;
  520|  1.33M|    for (const auto &pt : pointers) {
  ------------------
  |  Branch (520:25): [True: 1.33M, False: 6.99k]
  ------------------
  521|  1.33M|        vd_pair vd = *pt;
  522|  1.33M|        vertices.erase(pt);
  523|       |
  524|  1.59M|        while (vd.degree > 0) {
  ------------------
  |  Branch (524:16): [True: 261k, False: 1.33M]
  ------------------
  525|   261k|            auto uit = vertices.begin();
  526|       |
  527|   261k|            if (vertices.empty() || uit->degree == 0) {
  ------------------
  |  Branch (527:17): [True: 459, False: 261k]
  |  Branch (527:37): [True: 747, False: 260k]
  ------------------
  528|       |                // We are out of non-zero degree vertices to connect to.
  529|  1.20k|                if (loops) {
  ------------------
  |  Branch (529:21): [True: 804, False: 402]
  ------------------
  530|  22.7k|                    for (igraph_int_t i = 0; i < vd.degree / 2; ++i) {
  ------------------
  |  Branch (530:46): [True: 21.9k, False: 804]
  ------------------
  531|  21.9k|                        VECTOR(*edges)[2 * ec]   = vd.vertex;
  ------------------
  |  |   60|  21.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  532|  21.9k|                        VECTOR(*edges)[2 * ec + 1] = vd.vertex;
  ------------------
  |  |   60|  21.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  533|  21.9k|                        ec++;
  534|  21.9k|                    }
  535|    804|                    return IGRAPH_SUCCESS;
  536|    804|                } else {
  537|    402|                    IGRAPH_ERROR("The given degree sequence cannot be realized as a loopless multigraph.", IGRAPH_EINVAL);
  ------------------
  |  |  426|    402|    do { \
  |  |  427|    402|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|    402|        return igraph_errno ; \
  |  |  429|    402|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  538|    402|                }
  539|  1.20k|            }
  540|       |
  541|   260k|            vd.degree   -= 1;
  542|   260k|            uit->degree -= 1;
  543|       |
  544|   260k|            VECTOR(*edges)[2*ec]   = vd.vertex;
  ------------------
  |  |   60|   260k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  545|   260k|            VECTOR(*edges)[2*ec+1] = uit->vertex;
  ------------------
  |  |   60|   260k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  546|   260k|            ec++;
  547|       |
  548|       |            // If there are at least two elements, and the first two are not in order,
  549|       |            // re-sort the list. A possible optimization would be a version of
  550|       |            // bubble_up() that can exchange list nodes instead of swapping their values.
  551|   260k|            if (vertices.size() > 1) {
  ------------------
  |  Branch (551:17): [True: 255k, False: 5.54k]
  ------------------
  552|   255k|                auto wit = uit;
  553|   255k|                ++wit;
  554|       |
  555|   255k|                if (wit->degree > uit->degree) {
  ------------------
  |  Branch (555:21): [True: 172k, False: 82.9k]
  ------------------
  556|   172k|                    vertices.sort(degree_greater<vd_pair>);
  557|   172k|                }
  558|   255k|            }
  559|   260k|        }
  560|  1.33M|    }
  561|       |
  562|  6.99k|    return IGRAPH_SUCCESS;
  563|  8.20k|}
degree_sequence.cpp:_ZL21igraph_i_havel_hakimiPK19igraph_vector_int_tPS_23igraph_realize_degseq_t:
  320|  10.2k|                                            igraph_realize_degseq_t method) {
  321|  10.2k|    igraph_int_t n_nodes = igraph_vector_int_size(degseq);
  322|       |
  323|       |    // ----- upfront error/graphicality checks ----- //
  324|  10.2k|    if (n_nodes == 0 || (n_nodes == 1 && VECTOR(*degseq)[0] == 0)) {
  ------------------
  |  |   60|     57|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (324:9): [True: 6, False: 10.2k]
  |  Branch (324:26): [True: 57, False: 10.1k]
  |  Branch (324:42): [True: 6, False: 51]
  ------------------
  325|     12|        return IGRAPH_SUCCESS;
  326|     12|    }
  327|       |
  328|  1.79M|    for (igraph_int_t i = 0; i < n_nodes; i++) {
  ------------------
  |  Branch (328:30): [True: 1.78M, False: 9.57k]
  ------------------
  329|  1.78M|        igraph_int_t deg = VECTOR(*degseq)[i];
  ------------------
  |  |   60|  1.78M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  330|  1.78M|        if (deg >= n_nodes) {
  ------------------
  |  Branch (330:13): [True: 657, False: 1.78M]
  ------------------
  331|    657|            IGRAPH_ERROR("The given degree sequence cannot be realized as a simple graph.", IGRAPH_EINVAL);
  ------------------
  |  |  426|    657|    do { \
  |  |  427|    657|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|    657|        return igraph_errno ; \
  |  |  429|    657|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  332|    657|        }
  333|  1.78M|    }
  334|       |
  335|       |    // ----- main Havel-Hakimi loop ----- //
  336|       |    // O(V + alpha(V) * E)
  337|       |    // O(V + E) for the LARGEST_FIRST method
  338|  9.57k|    igraph_vector_int_t seq;
  339|  9.57k|    IGRAPH_CHECK(igraph_vector_int_init_copy(&seq, degseq));
  ------------------
  |  |  656|  9.57k|    do { \
  |  |  657|  9.57k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  9.57k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  9.57k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.57k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  9.57k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 9.57k]
  |  |  ------------------
  ------------------
  340|  9.57k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &seq);
  ------------------
  |  |  603|  9.57k|    do { \
  |  |  604|  9.57k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  9.57k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  9.57k|         * incorrect destructor function with the pointer */ \
  |  |  607|  9.57k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 9.57k]
  |  |  ------------------
  |  |  608|  9.57k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  9.57k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 9.57k]
  |  |  ------------------
  ------------------
  341|       |
  342|  9.57k|    HavelHakimiList vault(&seq);
  343|       |
  344|  9.57k|    igraph_int_t n_edges_added = 0;
  345|  9.57k|    igraph_vector_int_t spokes;
  346|  9.57k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&spokes, 0);
  ------------------
  |  |  119|  9.57k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  9.57k|    do { \
  |  |  |  |  657|  9.57k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  9.57k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  9.57k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.57k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  9.57k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 9.57k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  9.57k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  9.57k|    do { \
  |  |  |  |  604|  9.57k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  9.57k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  9.57k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  9.57k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 9.57k]
  |  |  |  |  ------------------
  |  |  |  |  608|  9.57k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  9.57k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 9.57k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 9.57k]
  |  |  ------------------
  ------------------
  347|       |
  348|   670k|    for (igraph_int_t i = 0; i < n_nodes; i++) {
  ------------------
  |  Branch (348:30): [True: 668k, False: 2.67k]
  ------------------
  349|       |        // hub node selection
  350|   668k|        vd_pair hub;
  351|   668k|        if (method == IGRAPH_REALIZE_DEGSEQ_SMALLEST) {
  ------------------
  |  Branch (351:13): [True: 88.8k, False: 579k]
  ------------------
  352|  88.8k|            if (!vault.get_min_node(/* out param */hub)) break;
  ------------------
  |  Branch (352:17): [True: 2.67k, False: 86.1k]
  ------------------
  353|  86.1k|            vault.remove_min_node();
  354|  86.1k|        }
  355|   579k|        else if (method == IGRAPH_REALIZE_DEGSEQ_LARGEST) {
  ------------------
  |  Branch (355:18): [True: 42.4k, False: 536k]
  ------------------
  356|  42.4k|            if (!vault.get_max_node(/* out param */hub)) break;
  ------------------
  |  Branch (356:17): [True: 2.67k, False: 39.7k]
  ------------------
  357|  39.7k|            vault.remove_max_node();
  358|  39.7k|        }
  359|   536k|        else if (method == IGRAPH_REALIZE_DEGSEQ_INDEX) {
  ------------------
  |  Branch (359:18): [True: 536k, False: 0]
  ------------------
  360|   536k|            igraph_int_t degree = VECTOR(seq)[i];
  ------------------
  |  |   60|   536k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  361|   536k|            hub = vd_pair{i, degree};
  362|   536k|            vault.buckets[degree].count--;
  363|   536k|        } else {
  364|       |            // The fatal error is effectively an assertion that this line
  365|       |            // should not be reachable:
  366|      0|            IGRAPH_FATAL("Invalid degree sequence realization method.");
  ------------------
  |  |  895|      0|    do { \
  |  |  896|      0|        igraph_fatal(reason, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  897|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (897:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  367|      0|        }
  368|   662k|        VECTOR(seq)[hub.vertex] = 0;
  ------------------
  |  |   60|   662k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  369|       |
  370|       |        // spoke nodes selection
  371|   662k|        IGRAPH_CHECK(vault.get_spokes(hub.degree, seq, spokes));
  ------------------
  |  |  656|   662k|    do { \
  |  |  657|   662k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   662k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   662k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 1.56k, False: 661k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|  1.56k|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|  1.56k|    do { \
  |  |  |  |  427|  1.56k|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|  1.56k|        return igraph_errno ; \
  |  |  |  |  429|  1.56k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|  1.56k|        } \
  |  |  661|   662k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 661k]
  |  |  ------------------
  ------------------
  372|       |
  373|   661k|        igraph_int_t n_spokes = igraph_vector_int_size(&spokes);
  374|   937k|        for (igraph_int_t j = 0; j < n_spokes; j++) {
  ------------------
  |  Branch (374:34): [True: 276k, False: 661k]
  ------------------
  375|   276k|            igraph_int_t spoke_idx = VECTOR(spokes)[j];
  ------------------
  |  |   60|   276k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  376|   276k|            VECTOR(*edges)[2*n_edges_added] = hub.vertex;
  ------------------
  |  |   60|   276k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  377|   276k|            VECTOR(*edges)[2*n_edges_added + 1] = spoke_idx;
  ------------------
  |  |   60|   276k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  378|   276k|            n_edges_added++;
  379|       |
  380|   276k|            VECTOR(seq)[spoke_idx]--;
  ------------------
  |  |   60|   276k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  381|   276k|        }
  382|   661k|    }
  383|  8.01k|    igraph_vector_int_destroy(&spokes);
  384|  8.01k|    igraph_vector_int_destroy(&seq);
  385|  8.01k|    IGRAPH_FINALLY_CLEAN(2);
  386|  8.01k|    return IGRAPH_SUCCESS;
  387|  9.57k|}
_ZN15HavelHakimiListC2EPK19igraph_vector_int_t:
   90|  9.57k|        n_buckets(igraph_vector_int_size(degseq)+1), buckets(n_buckets)
   91|  9.57k|    {
   92|  9.57k|        igraph_int_t n_nodes = igraph_vector_int_size(degseq);
   93|  1.79M|        for (igraph_int_t i = 0; i <= n_nodes; i++) {
  ------------------
  |  Branch (93:34): [True: 1.78M, False: 9.57k]
  ------------------
   94|  1.78M|            if (i == 0) {
  ------------------
  |  Branch (94:17): [True: 9.57k, False: 1.77M]
  ------------------
   95|  9.57k|                buckets[i].prev = -1;
   96|  1.77M|            } else {
   97|  1.77M|                buckets[i].prev = i - 1;
   98|  1.77M|            }
   99|       |
  100|  1.78M|            if (i == n_nodes) {
  ------------------
  |  Branch (100:17): [True: 9.57k, False: 1.77M]
  ------------------
  101|  9.57k|                buckets[i].next = -1;
  102|  1.77M|            } else {
  103|  1.77M|                buckets[i].next = i + 1;
  104|  1.77M|            }
  105|  1.78M|        }
  106|       |
  107|  1.78M|        for (igraph_int_t i = 0; i < n_nodes; i++) {
  ------------------
  |  Branch (107:34): [True: 1.77M, False: 9.57k]
  ------------------
  108|  1.77M|            igraph_int_t degree = VECTOR(*degseq)[i];
  ------------------
  |  |   60|  1.77M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  109|  1.77M|            buckets[degree].nodes.push(vd_pair{i, degree});
  110|  1.77M|            buckets[degree].count++;
  111|  1.77M|        }
  112|  9.57k|    }
_ZN15HavelHakimiList12get_min_nodeER7vd_pair:
  199|  88.8k|    bool get_min_node(vd_pair &min_node) {
  200|  88.8k|        igraph_int_t min_bucket = get_min_bucket();
  201|  88.8k|        if (min_bucket >= n_buckets - 1) {
  ------------------
  |  Branch (201:13): [True: 2.67k, False: 86.1k]
  ------------------
  202|  2.67k|            return false;
  203|  2.67k|        }
  204|  86.1k|        min_node = buckets[min_bucket].nodes.top();
  205|  86.1k|        return true;
  206|  88.8k|    }
_ZN15HavelHakimiList14get_min_bucketEv:
  140|   175k|    igraph_int_t get_min_bucket() {
  141|   175k|        igraph_int_t curr = head().next;
  142|   207k|        while (curr < n_buckets - 1 && buckets[curr].is_empty()) {
  ------------------
  |  Branch (142:16): [True: 205k, False: 2.67k]
  |  Branch (142:40): [True: 32.6k, False: 172k]
  ------------------
  143|  32.6k|            remove_bucket(curr);
  144|  32.6k|            curr = head().next;
  145|  32.6k|        }
  146|   175k|        return curr;
  147|   175k|    }
_ZNK15HavelHakimiList4headEv:
  115|   207k|    const BNode & head() const { return buckets.front(); }
_ZNK5BNode8is_emptyEv:
   79|  2.61M|    bool is_empty() const { return count == 0; }
_ZN15HavelHakimiList13remove_bucketEl:
  149|  1.81M|    void remove_bucket(igraph_int_t degree) {
  150|       |        // bounds check and prevent accidental removal of sentinels
  151|  1.81M|        assert(0 < degree && degree < n_buckets - 1);
  ------------------
  |  Branch (151:9): [True: 1.81M, False: 0]
  |  Branch (151:9): [True: 1.81M, False: 0]
  |  Branch (151:9): [True: 1.81M, False: 0]
  ------------------
  152|       |
  153|  1.81M|        igraph_int_t &prev_idx = buckets[degree].prev;
  154|  1.81M|        igraph_int_t &next_idx = buckets[degree].next;
  155|  1.81M|        if (prev_idx != -1) buckets[prev_idx].next = next_idx;
  ------------------
  |  Branch (155:13): [True: 1.81M, False: 0]
  ------------------
  156|  1.81M|        if (next_idx != -1) buckets[next_idx].prev = prev_idx;
  ------------------
  |  Branch (156:13): [True: 1.81M, False: 0]
  ------------------
  157|       |
  158|  1.81M|        prev_idx = -1;
  159|  1.81M|        next_idx = -1;
  160|  1.81M|    }
_ZN15HavelHakimiList15remove_min_nodeEv:
  208|  86.1k|    void remove_min_node() {
  209|  86.1k|        igraph_int_t min_bucket = get_min_bucket();
  210|  86.1k|        if (min_bucket >= n_buckets - 1) return;
  ------------------
  |  Branch (210:13): [True: 0, False: 86.1k]
  ------------------
  211|  86.1k|        buckets[min_bucket].nodes.pop();
  212|  86.1k|        buckets[min_bucket].count--;
  213|  86.1k|    }
_ZN15HavelHakimiList12get_max_nodeER7vd_pair:
  183|  42.4k|    bool get_max_node(vd_pair &max_node) {
  184|  42.4k|        igraph_int_t max_bucket = get_max_bucket();
  185|  42.4k|        if (max_bucket <= 0) {
  ------------------
  |  Branch (185:13): [True: 2.67k, False: 39.7k]
  ------------------
  186|  2.67k|            return false;
  187|  2.67k|        }
  188|  39.7k|        max_node = buckets[max_bucket].nodes.top();
  189|  39.7k|        return true;
  190|  42.4k|    }
_ZN15HavelHakimiList14get_max_bucketEv:
  132|   745k|    igraph_int_t get_max_bucket() {
  133|       |        // TODO: either change get_prev to take a BNode, or change
  134|       |        // head()/tail() to return integers
  135|   745k|        return get_prev(n_buckets - 1);
  136|   745k|    }
_ZN15HavelHakimiList8get_prevEl:
  120|   936k|    igraph_int_t get_prev(igraph_int_t degree) {
  121|   936k|        assert(0 < degree && degree <= n_buckets - 1); // upper sentinel allowed as input
  ------------------
  |  Branch (121:9): [True: 936k, False: 0]
  |  Branch (121:9): [True: 936k, False: 0]
  |  Branch (121:9): [True: 936k, False: 0]
  ------------------
  122|   936k|        igraph_int_t curr = buckets[degree].prev;
  123|  2.71M|        while (curr > 0 && buckets[curr].is_empty()) {
  ------------------
  |  Branch (123:16): [True: 2.41M, False: 305k]
  |  Branch (123:28): [True: 1.78M, False: 630k]
  ------------------
  124|  1.78M|            remove_bucket(curr);
  125|  1.78M|            curr = buckets[degree].prev;
  126|  1.78M|        }
  127|   936k|        return curr;
  128|   936k|    }
_ZN15HavelHakimiList15remove_max_nodeEv:
  192|  39.7k|    void remove_max_node() {
  193|  39.7k|        igraph_int_t max_bucket = get_max_bucket();
  194|  39.7k|        if (max_bucket <= 0) return;
  ------------------
  |  Branch (194:13): [True: 0, False: 39.7k]
  ------------------
  195|  39.7k|        buckets[max_bucket].nodes.pop();
  196|  39.7k|        buckets[max_bucket].count--;
  197|  39.7k|    }
_ZN15HavelHakimiList10get_spokesElRK19igraph_vector_int_tRS0_:
  218|   662k|                              igraph_vector_int_t &spokes) {
  219|   662k|        std::stack<igraph_int_t> buckets_req; // stack of needed degree buckets
  220|   662k|        igraph_int_t num_nodes = 0;
  221|   662k|        igraph_int_t curr = get_max_bucket(); // starts with max_bucket
  222|       |
  223|   662k|        igraph_vector_int_clear(&spokes);
  224|   662k|        IGRAPH_CHECK(igraph_vector_int_reserve(&spokes, degree));
  ------------------
  |  |  656|   662k|    do { \
  |  |  657|   662k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   662k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   662k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 662k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   662k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 662k]
  |  |  ------------------
  ------------------
  225|       |
  226|   854k|        while (num_nodes < degree && curr > 0) {
  ------------------
  |  Branch (226:16): [True: 192k, False: 661k]
  |  Branch (226:38): [True: 191k, False: 1.56k]
  ------------------
  227|   191k|            num_nodes += buckets[curr].count;
  228|   191k|            buckets_req.push(curr);
  229|   191k|            curr = get_prev(curr); // gets next smallest NON-EMPTY bucket
  230|   191k|        }
  231|   662k|        if (num_nodes < degree) { // not enough spokes for hub degree
  ------------------
  |  Branch (231:13): [True: 1.56k, False: 661k]
  ------------------
  232|  1.56k|            IGRAPH_ERROR("The given degree sequence cannot be realized as a simple graph.", IGRAPH_EINVAL);
  ------------------
  |  |  426|  1.56k|    do { \
  |  |  427|  1.56k|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|  1.56k|        return igraph_errno ; \
  |  |  429|  1.56k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  233|  1.56k|        }
  234|       |
  235|   661k|        igraph_int_t num_skip = num_nodes - degree;
  236|   850k|        while (!buckets_req.empty()) { // starting from the smallest degree
  ------------------
  |  Branch (236:16): [True: 189k, False: 661k]
  ------------------
  237|   189k|            igraph_int_t bucket = buckets_req.top();
  238|   189k|            buckets_req.pop();
  239|       |
  240|   189k|            igraph_int_t to_get = buckets[bucket].count - num_skip;
  241|   475k|            while (to_get > 0) {
  ------------------
  |  Branch (241:20): [True: 285k, False: 189k]
  ------------------
  242|   285k|                vd_pair node = buckets[bucket].nodes.top();
  243|   285k|                if (VECTOR(seq)[node.vertex] != 0) { // if "not marked for removal"
  ------------------
  |  |   60|   285k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (243:21): [True: 276k, False: 9.32k]
  ------------------
  244|   276k|                    IGRAPH_CHECK(igraph_vector_int_push_back(&spokes, node.vertex)); // add as spoke
  ------------------
  |  |  656|   276k|    do { \
  |  |  657|   276k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   276k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   276k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 276k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   276k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 276k]
  |  |  ------------------
  ------------------
  245|       |
  246|   276k|                    node.degree--;
  247|   276k|                    insert_node(node); // first, insert into bucket below
  248|       |
  249|   276k|                    buckets[bucket].count--;
  250|   276k|                    to_get--;
  251|   276k|                }
  252|   285k|                buckets[bucket].nodes.pop(); // then pop from original bucket
  253|   285k|            }
  254|   189k|            num_skip = 0;
  255|   189k|        }
  256|   661k|        return IGRAPH_SUCCESS;
  257|   661k|    }
_ZN15HavelHakimiList11insert_nodeE7vd_pair:
  177|   276k|    void insert_node(vd_pair node) {
  178|   276k|        insert_bucket(node.degree); // does nothing if already exists
  179|   276k|        buckets[node.degree].nodes.push(vd_pair{node.vertex, node.degree});
  180|   276k|        buckets[node.degree].count++;
  181|   276k|    }
_ZN15HavelHakimiList13insert_bucketEl:
  162|   276k|    void insert_bucket(igraph_int_t degree) {
  163|   276k|        assert(0 <= degree && degree < n_buckets - 1); // can insert into zero-degree bucket
  ------------------
  |  Branch (163:9): [True: 276k, False: 0]
  |  Branch (163:9): [True: 276k, False: 0]
  |  Branch (163:9): [True: 276k, False: 0]
  ------------------
  164|       |
  165|   276k|        igraph_int_t &prev_idx = buckets[degree].prev;
  166|   276k|        igraph_int_t &next_idx = buckets[degree].next;
  167|       |
  168|   276k|        if (prev_idx == -1 && next_idx == -1) {
  ------------------
  |  Branch (168:13): [True: 155k, False: 120k]
  |  Branch (168:31): [True: 45.7k, False: 110k]
  ------------------
  169|  45.7k|            next_idx = degree + 1;
  170|  45.7k|            prev_idx = buckets[next_idx].prev;
  171|       |
  172|  45.7k|            buckets[next_idx].prev = degree;
  173|  45.7k|            buckets[prev_idx].next = degree;
  174|  45.7k|        }
  175|   276k|    }
_ZN7vd_pairC2Ell:
   43|  6.84M|    vd_pair(igraph_int_t vertex, igraph_int_t degree) : vertex(vertex), degree(degree) {}
_Z14degree_greaterI7vd_pairEbRKT_S3_:
   59|   151M|template<typename T> inline bool degree_greater(const T &a, const T &b) {
   60|   151M|    return a.degree > b.degree;
   61|   151M|}

igraph_is_graphical:
  135|  18.0k|{
  136|       |    /* Undirected case: */
  137|  18.0k|    if (in_degrees == NULL)
  ------------------
  |  Branch (137:9): [True: 18.0k, False: 0]
  ------------------
  138|  18.0k|    {
  139|  18.0k|        if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW )) {
  ------------------
  |  |   26|  9.03k|#define IGRAPH_I_MULTI_LOOPS_SW 0x04 /* 100, more than one self-loop allowed on the same vertex   */
  ------------------
  |  Branch (139:14): [True: 9.03k, False: 9.03k]
  |  Branch (139:56): [True: 4.51k, False: 4.51k]
  ------------------
  140|       |            /* Typically this case is used when multiple edges are allowed both as self-loops and
  141|       |             * between distinct vertices. However, the conditions are the same even if multi-edges
  142|       |             * are not allowed between distinct vertices (only as self-loops). Therefore, we
  143|       |             * do not test IGRAPH_I_MULTI_EDGES_SW in the if (...). */
  144|  4.51k|            return igraph_i_is_graphical_undirected_multi_loops(out_degrees, res);
  145|  4.51k|        }
  146|  13.5k|        else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   25|  9.03k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (146:19): [True: 9.03k, False: 4.51k]
  |  Branch (146:63): [True: 4.51k, False: 4.51k]
  ------------------
  147|  4.51k|            return igraph_i_is_graphical_undirected_loopless_multi(out_degrees, res);
  148|  4.51k|        }
  149|  9.03k|        else if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   26|  4.51k|#define IGRAPH_I_MULTI_LOOPS_SW 0x04 /* 100, more than one self-loop allowed on the same vertex   */
  ------------------
                      else if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   25|  4.51k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (149:19): [True: 4.51k, False: 4.51k]
  |  Branch (149:61): [True: 4.51k, False: 0]
  |  Branch (149:113): [True: 4.51k, False: 0]
  ------------------
  150|  4.51k|            return igraph_i_is_graphical_undirected_loopy_simple(out_degrees, res);
  151|  4.51k|        }
  152|  4.51k|        else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   25|  4.51k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (152:19): [True: 4.51k, False: 0]
  |  Branch (152:63): [True: 4.51k, False: 0]
  ------------------
  153|  4.51k|            return igraph_i_is_graphical_undirected_simple(out_degrees, res);
  154|  4.51k|        } else {
  155|       |            /* Remaining case:
  156|       |             *  - At most one self-loop per vertex but multi-edges between distinct vertices allowed.
  157|       |             * These cases cannot currently be requested through the documented API,
  158|       |             * so no explanatory error message for now. */
  159|      0|            return IGRAPH_UNIMPLEMENTED;
  160|      0|        }
  161|  18.0k|    }
  162|       |    /* Directed case: */
  163|      0|    else
  164|      0|    {
  165|      0|        if (igraph_vector_int_size(in_degrees) != igraph_vector_int_size(out_degrees)) {
  ------------------
  |  Branch (165:13): [True: 0, False: 0]
  ------------------
  166|      0|            IGRAPH_ERROR("The length of out- and in-degree sequences must be the same.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  167|      0|        }
  168|       |
  169|      0|        if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) && (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW ) ) {
  ------------------
  |  |   25|      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 ) ) {
  ------------------
  |  |   26|      0|#define IGRAPH_I_MULTI_LOOPS_SW 0x04 /* 100, more than one self-loop allowed on the same vertex   */
  ------------------
  |  Branch (169:14): [True: 0, False: 0]
  |  Branch (169:56): [True: 0, False: 0]
  |  Branch (169:106): [True: 0, False: 0]
  ------------------
  170|      0|            return igraph_i_is_graphical_directed_loopy_multi(out_degrees, in_degrees, res);
  171|      0|        }
  172|      0|        else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   25|      0|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (172:19): [True: 0, False: 0]
  |  Branch (172:63): [True: 0, False: 0]
  ------------------
  173|      0|            return igraph_i_is_graphical_directed_loopless_multi(out_degrees, in_degrees, res);
  174|      0|        }
  175|      0|        else if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   26|      0|#define IGRAPH_I_MULTI_LOOPS_SW 0x04 /* 100, more than one self-loop allowed on the same vertex   */
  ------------------
                      else if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   25|      0|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (175:19): [True: 0, False: 0]
  |  Branch (175:61): [True: 0, False: 0]
  |  Branch (175:113): [True: 0, False: 0]
  ------------------
  176|      0|            return igraph_i_is_graphical_directed_loopy_simple(out_degrees, in_degrees, res);
  177|      0|        }
  178|      0|        else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   25|      0|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (178:19): [True: 0, False: 0]
  |  Branch (178:63): [True: 0, False: 0]
  ------------------
  179|      0|            return igraph_i_is_graphical_directed_simple(out_degrees, in_degrees, res);
  180|      0|        } else {
  181|       |            /* Remaining cases:
  182|       |             *  - At most one self-loop per vertex but multi-edges between distinct vertices allowed.
  183|       |             *  - At most one edge between distinct vertices but multi-self-loops allowed.
  184|       |             * These cases cannot currently be requested through the documented API,
  185|       |             * so no explanatory error message for now. */
  186|      0|            return IGRAPH_UNIMPLEMENTED;
  187|      0|        }
  188|      0|    }
  189|       |
  190|       |    /* can't reach here */
  191|  18.0k|}
graphicality.c:igraph_i_is_graphical_undirected_multi_loops:
  259|  9.03k|static igraph_error_t igraph_i_is_graphical_undirected_multi_loops(const igraph_vector_int_t *degrees, igraph_bool_t *res) {
  260|  9.03k|    igraph_int_t sum_parity = 0; /* 0 if the degree sum is even, 1 if it is odd */
  261|  9.03k|    igraph_int_t n = igraph_vector_int_size(degrees);
  262|  9.03k|    igraph_int_t i;
  263|       |
  264|  1.55M|    for (i = 0; i < n; ++i) {
  ------------------
  |  Branch (264:17): [True: 1.54M, False: 9.03k]
  ------------------
  265|  1.54M|        igraph_int_t d = VECTOR(*degrees)[i];
  ------------------
  |  |   60|  1.54M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  266|       |
  267|  1.54M|        if (d < 0) {
  ------------------
  |  Branch (267:13): [True: 0, False: 1.54M]
  ------------------
  268|      0|            *res = false;
  269|      0|            return IGRAPH_SUCCESS;
  270|      0|        }
  271|  1.54M|        sum_parity = (sum_parity + d) & 1;
  272|  1.54M|    }
  273|       |
  274|  9.03k|    *res = (sum_parity == 0);
  275|       |
  276|  9.03k|    return IGRAPH_SUCCESS;
  277|  9.03k|}
graphicality.c:igraph_i_is_graphical_undirected_loopless_multi:
  285|  4.51k|static igraph_error_t igraph_i_is_graphical_undirected_loopless_multi(const igraph_vector_int_t *degrees, igraph_bool_t *res) {
  286|  4.51k|    igraph_int_t i;
  287|  4.51k|    igraph_int_t n = igraph_vector_int_size(degrees);
  288|  4.51k|    igraph_int_t dsum, dmax;
  289|       |
  290|       |    /* Zero-length sequences are considered graphical. */
  291|  4.51k|    if (n == 0) {
  ------------------
  |  Branch (291:9): [True: 2, False: 4.51k]
  ------------------
  292|      2|        *res = true;
  293|      2|        return IGRAPH_SUCCESS;
  294|      2|    }
  295|       |
  296|  4.51k|    dsum = 0; dmax = 0;
  297|   778k|    for (i = 0; i < n; ++i) {
  ------------------
  |  Branch (297:17): [True: 773k, False: 4.51k]
  ------------------
  298|   773k|        igraph_int_t d = VECTOR(*degrees)[i];
  ------------------
  |  |   60|   773k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  299|       |
  300|   773k|        if (d < 0) {
  ------------------
  |  Branch (300:13): [True: 0, False: 773k]
  ------------------
  301|      0|            *res = false;
  302|      0|            return IGRAPH_SUCCESS;
  303|      0|        }
  304|   773k|        dsum += d;
  305|   773k|        if (d > dmax) {
  ------------------
  |  Branch (305:13): [True: 7.42k, False: 766k]
  ------------------
  306|  7.42k|            dmax = d;
  307|  7.42k|        }
  308|   773k|    }
  309|       |
  310|  4.51k|    *res = (dsum % 2 == 0) && (dsum >= 2*dmax);
  ------------------
  |  Branch (310:12): [True: 4.51k, False: 0]
  |  Branch (310:31): [True: 3.71k, False: 804]
  ------------------
  311|       |
  312|  4.51k|    return IGRAPH_SUCCESS;
  313|  4.51k|}
graphicality.c:igraph_i_is_graphical_undirected_loopy_simple:
  321|  4.51k|static igraph_error_t igraph_i_is_graphical_undirected_loopy_simple(const igraph_vector_int_t *degrees, igraph_bool_t *res) {
  322|  4.51k|    igraph_vector_int_t num_degs;
  323|  4.51k|    igraph_int_t w, b, s, c, n, k, wd, kd;
  324|       |
  325|  4.51k|    n = igraph_vector_int_size(degrees);
  326|       |
  327|       |    /* Zero-length sequences are considered graphical. */
  328|  4.51k|    if (n == 0) {
  ------------------
  |  Branch (328:9): [True: 2, False: 4.51k]
  ------------------
  329|      2|        *res = true;
  330|      2|        return IGRAPH_SUCCESS;
  331|      2|    }
  332|       |
  333|       |    /* The conditions from the loopy multigraph case are necessary here as well. */
  334|  4.51k|    IGRAPH_CHECK(igraph_i_is_graphical_undirected_multi_loops(degrees, res));
  ------------------
  |  |  656|  4.51k|    do { \
  |  |  657|  4.51k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.51k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.51k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.51k]
  |  |  ------------------
  ------------------
  335|  4.51k|    if (! *res) {
  ------------------
  |  Branch (335:9): [True: 0, False: 4.51k]
  ------------------
  336|      0|        return IGRAPH_SUCCESS;
  337|      0|    }
  338|       |
  339|       |    /*
  340|       |     * We follow this paper:
  341|       |     *
  342|       |     * G. Cairns & S. Mendan: Degree Sequences for Graphs with Loops, 2013
  343|       |     * https://arxiv.org/abs/1303.2145v1
  344|       |     *
  345|       |     * They give the following modification of the Erdős-Gallai theorem:
  346|       |     *
  347|       |     * A non-increasing degree sequence d_1 >= ... >= d_n has a realization as
  348|       |     * a simple graph with loops (i.e. at most one self-loop allowed on each vertex)
  349|       |     * iff
  350|       |     *
  351|       |     * \sum_{i=1}^k d_i <= k(k+1) + \sum_{i=k+1}^{n} min(d_i, k)
  352|       |     *
  353|       |     * for each k=1..n
  354|       |     *
  355|       |     * The difference from Erdős-Gallai is that here we have the term
  356|       |     * k(k+1) instead of k(k-1).
  357|       |     *
  358|       |     * The implementation is analogous to igraph_i_is_graphical_undirected_simple(),
  359|       |     * which in turn is based on Király 2012. See comments in that function for details.
  360|       |     * w and k are zero-based here, unlike in the statement of the theorem above.
  361|       |     */
  362|       |
  363|  4.51k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&num_degs, n+2);
  ------------------
  |  |  119|  4.51k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  4.51k|    do { \
  |  |  |  |  657|  4.51k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.51k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.51k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.51k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  4.51k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.51k|    do { \
  |  |  |  |  604|  4.51k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.51k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.51k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.51k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.51k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.51k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.51k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 4.51k]
  |  |  ------------------
  ------------------
  364|       |
  365|   769k|    for (igraph_int_t i = 0; i < n; ++i) {
  ------------------
  |  Branch (365:30): [True: 765k, False: 4.14k]
  ------------------
  366|   765k|        igraph_int_t degree = VECTOR(*degrees)[i];
  ------------------
  |  |   60|   765k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  367|       |
  368|       |        /* Negative degrees are already checked in igraph_i_is_graphical_undirected_multi_loops() */
  369|   765k|        if (degree > n+1) {
  ------------------
  |  Branch (369:13): [True: 366, False: 765k]
  ------------------
  370|    366|            *res = false;
  371|    366|            goto undirected_loopy_simple_finish;
  372|    366|        }
  373|       |
  374|   765k|        ++VECTOR(num_degs)[degree];
  ------------------
  |  |   60|   765k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  375|   765k|    }
  376|       |
  377|       |    /* Convert num_degs to a cumulative sum array. */
  378|   770k|    for (igraph_int_t d = n; d >= 0; --d) {
  ------------------
  |  Branch (378:30): [True: 766k, False: 4.14k]
  ------------------
  379|   766k|        VECTOR(num_degs)[d] += VECTOR(num_degs)[d+1];
  ------------------
  |  |   60|   766k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(num_degs)[d] += VECTOR(num_degs)[d+1];
  ------------------
  |  |   60|   766k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  380|   766k|    }
  381|       |
  382|  4.14k|    wd = 0, kd = n+1;
  383|  4.14k|    *res = true;
  384|  4.14k|    w = n - 1; b = 0; s = 0; c = 0;
  385|  8.72k|    for (k = 0; k < n; k++) {
  ------------------
  |  Branch (385:17): [True: 8.72k, False: 0]
  ------------------
  386|   731k|        while (k >= VECTOR(num_degs)[kd]) {
  ------------------
  |  |   60|   731k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (386:16): [True: 722k, False: 8.72k]
  ------------------
  387|   722k|            --kd;
  388|   722k|        }
  389|  8.72k|        b += kd;
  390|  8.72k|        c += w;
  391|   760k|        while (w > k) {
  ------------------
  |  Branch (391:16): [True: 756k, False: 3.72k]
  ------------------
  392|   771k|            while (wd + 1 <= n + 1 && w < VECTOR(num_degs)[wd + 1]) {
  ------------------
  |  |   60|   771k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (392:20): [True: 771k, False: 18]
  |  Branch (392:39): [True: 14.6k, False: 756k]
  ------------------
  393|  14.6k|                wd++;
  394|  14.6k|            }
  395|   756k|            if (wd > k + 1) break;
  ------------------
  |  Branch (395:17): [True: 4.99k, False: 751k]
  ------------------
  396|   751k|            s += wd;
  397|   751k|            c -= (k + 1);
  398|   751k|            w--;
  399|   751k|        }
  400|  8.72k|        if (b > c + s + 2*(k + 1)) {
  ------------------
  |  Branch (400:13): [True: 578, False: 8.14k]
  ------------------
  401|    578|            *res = false;
  402|    578|            break;
  403|    578|        }
  404|  8.14k|        if (w == k) {
  ------------------
  |  Branch (404:13): [True: 3.57k, False: 4.57k]
  ------------------
  405|  3.57k|            break;
  406|  3.57k|        }
  407|  8.14k|    }
  408|       |
  409|  4.51k|undirected_loopy_simple_finish:
  410|  4.51k|    igraph_vector_int_destroy(&num_degs);
  411|  4.51k|    IGRAPH_FINALLY_CLEAN(1);
  412|       |
  413|  4.51k|    return IGRAPH_SUCCESS;
  414|  4.14k|}
graphicality.c:igraph_i_is_graphical_undirected_simple:
  422|  4.51k|static igraph_error_t igraph_i_is_graphical_undirected_simple(const igraph_vector_int_t *degrees, igraph_bool_t *res) {
  423|  4.51k|    igraph_vector_int_t num_degs; /* num_degs[d] is the # of vertices with degree d */
  424|  4.51k|    const igraph_int_t p = igraph_vector_int_size(degrees);
  425|  4.51k|    igraph_int_t dmin, dmax, dsum;
  426|  4.51k|    igraph_int_t n; /* number of non-zero degrees */
  427|  4.51k|    igraph_int_t k, sum_deg, sum_ni, sum_ini;
  428|  4.51k|    igraph_int_t i, dk;
  429|  4.51k|    igraph_int_t zverovich_bound;
  430|       |
  431|  4.51k|    if (p == 0) {
  ------------------
  |  Branch (431:9): [True: 2, False: 4.51k]
  ------------------
  432|      2|        *res = true;
  433|      2|        return IGRAPH_SUCCESS;
  434|      2|    }
  435|       |
  436|       |    /* The following implementation of the Erdős-Gallai test
  437|       |     * is mostly a direct translation of the Python code given in
  438|       |     *
  439|       |     * Brian Cloteaux, Is This for Real? Fast Graphicality Testing,
  440|       |     * Computing Prescriptions, pp. 91-95, vol. 17 (2015)
  441|       |     * https://dx.doi.org/10.1109/MCSE.2015.125
  442|       |     *
  443|       |     * It uses counting sort to achieve linear runtime.
  444|       |     */
  445|       |
  446|  4.51k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&num_degs, p);
  ------------------
  |  |  119|  4.51k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  4.51k|    do { \
  |  |  |  |  657|  4.51k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.51k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.51k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.51k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  4.51k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.51k|    do { \
  |  |  |  |  604|  4.51k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.51k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.51k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.51k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.51k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.51k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.51k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 4.51k]
  |  |  ------------------
  ------------------
  447|       |
  448|  4.51k|    dmin = p; dmax = 0; dsum = 0; n = 0;
  449|   768k|    for (i = 0; i < p; ++i) {
  ------------------
  |  Branch (449:17): [True: 764k, False: 4.07k]
  ------------------
  450|   764k|        igraph_int_t d = VECTOR(*degrees)[i];
  ------------------
  |  |   60|   764k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  451|       |
  452|   764k|        if (d < 0 || d >= p) {
  ------------------
  |  Branch (452:13): [True: 0, False: 764k]
  |  Branch (452:22): [True: 438, False: 763k]
  ------------------
  453|    438|            *res = false;
  454|    438|            goto finish;
  455|    438|        }
  456|       |
  457|   763k|        if (d > 0) {
  ------------------
  |  Branch (457:13): [True: 123k, False: 640k]
  ------------------
  458|   123k|            dmax = d > dmax ? d : dmax;
  ------------------
  |  Branch (458:20): [True: 6.93k, False: 116k]
  ------------------
  459|   123k|            dmin = d < dmin ? d : dmin;
  ------------------
  |  Branch (459:20): [True: 6.63k, False: 116k]
  ------------------
  460|   123k|            dsum += d;
  461|   123k|            n++;
  462|   123k|            VECTOR(num_degs)[d] += 1;
  ------------------
  |  |   60|   123k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  463|   123k|        }
  464|   763k|    }
  465|       |
  466|  4.07k|    if (dsum % 2 != 0) {
  ------------------
  |  Branch (466:9): [True: 0, False: 4.07k]
  ------------------
  467|      0|        *res = false;
  468|      0|        goto finish;
  469|      0|    }
  470|       |
  471|  4.07k|    if (n == 0) {
  ------------------
  |  Branch (471:9): [True: 194, False: 3.88k]
  ------------------
  472|    194|        *res = true;
  473|    194|        goto finish; /* all degrees are zero => graphical */
  474|    194|    }
  475|       |
  476|       |    /* According to:
  477|       |     *
  478|       |     * G. Cairns, S. Mendan, and Y. Nikolayevsky, A sharp refinement of a result of Zverovich-Zverovich,
  479|       |     * Discrete Math. 338, 1085 (2015).
  480|       |     * https://dx.doi.org/10.1016/j.disc.2015.02.001
  481|       |     *
  482|       |     * a sufficient but not necessary condition of graphicality for a sequence of
  483|       |     * n strictly positive integers is that
  484|       |     *
  485|       |     * dmin * n >= floor( (dmax + dmin + 1)^2 / 4 ) - 1
  486|       |     * if dmin is odd or (dmax + dmin) mod 4 == 1
  487|       |     *
  488|       |     * or
  489|       |     *
  490|       |     * dmin * n >= floor( (dmax + dmin + 1)^2 / 4 )
  491|       |     * otherwise.
  492|       |     */
  493|       |
  494|  3.88k|    zverovich_bound = ((dmax + dmin + 1) * (dmax + dmin + 1)) / 4;
  495|  3.88k|    if (dmin % 2 == 1 || (dmax + dmin) % 4 == 1) {
  ------------------
  |  Branch (495:9): [True: 3.27k, False: 610]
  |  Branch (495:26): [True: 32, False: 578]
  ------------------
  496|  3.30k|        zverovich_bound -= 1;
  497|  3.30k|    }
  498|       |
  499|  3.88k|    if (dmin*n >= zverovich_bound) {
  ------------------
  |  Branch (499:9): [True: 1.71k, False: 2.17k]
  ------------------
  500|  1.71k|        *res = true;
  501|  1.71k|        goto finish;
  502|  1.71k|    }
  503|       |
  504|  2.17k|    k = 0; sum_deg = 0; sum_ni = 0; sum_ini = 0;
  505|  34.7k|    for (dk = dmax; dk >= dmin; --dk) {
  ------------------
  |  Branch (505:21): [True: 34.6k, False: 12]
  ------------------
  506|  34.6k|        igraph_int_t run_size, v;
  507|       |
  508|  34.6k|        if (dk < k+1) {
  ------------------
  |  Branch (508:13): [True: 1.11k, False: 33.5k]
  ------------------
  509|  1.11k|            *res = true;
  510|  1.11k|            goto finish;
  511|  1.11k|        }
  512|       |
  513|  33.5k|        run_size = VECTOR(num_degs)[dk];
  ------------------
  |  |   60|  33.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  514|  33.5k|        if (run_size > 0) {
  ------------------
  |  Branch (514:13): [True: 3.65k, False: 29.9k]
  ------------------
  515|  3.65k|            if (dk < k + run_size) {
  ------------------
  |  Branch (515:17): [True: 326, False: 3.33k]
  ------------------
  516|    326|                run_size = dk - k;
  517|    326|            }
  518|  3.65k|            sum_deg += run_size * dk;
  519|  8.30k|            for (v=0; v < run_size; ++v) {
  ------------------
  |  Branch (519:23): [True: 4.64k, False: 3.65k]
  ------------------
  520|  4.64k|                sum_ni += VECTOR(num_degs)[k+v];
  ------------------
  |  |   60|  4.64k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  521|  4.64k|                sum_ini += (k+v) * VECTOR(num_degs)[k+v];
  ------------------
  |  |   60|  4.64k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  522|  4.64k|            }
  523|  3.65k|            k += run_size;
  524|  3.65k|            if (sum_deg > k*(n-1) - k*sum_ni + sum_ini) {
  ------------------
  |  Branch (524:17): [True: 1.04k, False: 2.61k]
  ------------------
  525|  1.04k|                *res = false;
  526|  1.04k|                goto finish;
  527|  1.04k|            }
  528|  3.65k|        }
  529|  33.5k|    }
  530|       |
  531|     12|    *res = true;
  532|       |
  533|  4.51k|finish:
  534|  4.51k|    igraph_vector_int_destroy(&num_degs);
  535|  4.51k|    IGRAPH_FINALLY_CLEAN(1);
  536|       |
  537|  4.51k|    return IGRAPH_SUCCESS;
  538|     12|}

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

igraph_minimum_spanning_tree:
  464|  2.25k|{
  465|  2.25k|    if (method == IGRAPH_MST_AUTOMATIC) {
  ------------------
  |  Branch (465:9): [True: 0, False: 2.25k]
  ------------------
  466|       |        /* For now we use igraph_minimum_spanning_tree_kruskal() unconditionally
  467|       |         * for the weighted case; see benchmarks. */
  468|      0|        if (weights == NULL) {
  ------------------
  |  Branch (468:13): [True: 0, False: 0]
  ------------------
  469|      0|            method = IGRAPH_MST_UNWEIGHTED;
  470|      0|        } else {
  471|      0|            method = IGRAPH_MST_KRUSKAL;
  472|      0|        }
  473|      0|    }
  474|  2.25k|    switch (method) {
  475|  2.25k|    case IGRAPH_MST_UNWEIGHTED:
  ------------------
  |  Branch (475:5): [True: 2.25k, False: 0]
  ------------------
  476|  2.25k|        return igraph_i_minimum_spanning_tree_unweighted(graph, res);
  477|      0|    case IGRAPH_MST_PRIM:
  ------------------
  |  Branch (477:5): [True: 0, False: 2.25k]
  ------------------
  478|      0|        return igraph_i_minimum_spanning_tree_prim(graph, res, weights);
  479|      0|    case IGRAPH_MST_KRUSKAL:
  ------------------
  |  Branch (479:5): [True: 0, False: 2.25k]
  ------------------
  480|      0|        return igraph_i_minimum_spanning_tree_kruskal(graph, res, weights);
  481|      0|    default:
  ------------------
  |  Branch (481:5): [True: 0, False: 2.25k]
  ------------------
  482|      0|        IGRAPH_ERROR("Invalid method for minimum spanning tree.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  483|  2.25k|    }
  484|  2.25k|}
spanning_trees.c:igraph_i_minimum_spanning_tree_unweighted:
   72|  2.25k|        igraph_vector_int_t* res) {
   73|       |
   74|  2.25k|    const igraph_int_t no_of_nodes = igraph_vcount(graph);
   75|  2.25k|    const igraph_int_t no_of_edges = igraph_ecount(graph);
   76|  2.25k|    igraph_bitset_t already_added, added_edges;
   77|       |
   78|  2.25k|    igraph_dqueue_int_t q;
   79|  2.25k|    igraph_vector_int_t eids;
   80|       |
   81|  2.25k|    IGRAPH_BITSET_INIT_FINALLY(&added_edges, no_of_edges);
  ------------------
  |  |  259|  2.25k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  260|  2.25k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.25k|    do { \
  |  |  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  261|  2.25k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.25k|    do { \
  |  |  |  |  604|  2.25k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.25k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.25k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.25k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.25k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (261:62): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
   82|  2.25k|    IGRAPH_BITSET_INIT_FINALLY(&already_added, no_of_nodes);
  ------------------
  |  |  259|  2.25k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  260|  2.25k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.25k|    do { \
  |  |  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  261|  2.25k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.25k|    do { \
  |  |  |  |  604|  2.25k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.25k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.25k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.25k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.25k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (261:62): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
   83|  2.25k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&eids, 0);
  ------------------
  |  |  119|  2.25k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.25k|    do { \
  |  |  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.25k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.25k|    do { \
  |  |  |  |  604|  2.25k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.25k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.25k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.25k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.25k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
   84|  2.25k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  2.25k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.25k|    do { \
  |  |  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.25k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.25k|    do { \
  |  |  |  |  604|  2.25k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.25k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.25k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.25k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.25k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
   85|       |
   86|  2.25k|    igraph_vector_int_clear(res);
   87|  2.25k|    IGRAPH_CHECK(igraph_vector_int_reserve(res, max_tree_edges(no_of_nodes, no_of_edges)));
  ------------------
  |  |  656|  2.25k|    do { \
  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
   88|       |
   89|       |    /* Perform a BFS */
   90|   389k|    for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (90:30): [True: 386k, False: 2.25k]
  ------------------
   91|   386k|        if (IGRAPH_BIT_TEST(already_added, i)) {
  ------------------
  |  |  142|   386k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|   386k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   386k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|   386k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   386k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (142:36): [True: 52.4k, False: 334k]
  |  |  ------------------
  ------------------
   92|  52.4k|            continue;
   93|  52.4k|        }
   94|       |
   95|   334k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   334k|    do { \
  |  |   47|   334k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 334k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   334k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 334k]
  |  |  ------------------
  ------------------
   96|       |
   97|   334k|        IGRAPH_BIT_SET(already_added, i);
  ------------------
  |  |  103|   334k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   334k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|   334k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   334k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|   334k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   334k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   98|   334k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, i));
  ------------------
  |  |  656|   334k|    do { \
  |  |  657|   334k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   334k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   334k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 334k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   334k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 334k]
  |  |  ------------------
  ------------------
   99|   721k|        while (! igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (99:16): [True: 386k, False: 334k]
  ------------------
  100|   386k|            igraph_int_t eids_size;
  101|   386k|            igraph_int_t act_node = igraph_dqueue_int_pop(&q);
  102|   386k|            IGRAPH_CHECK(igraph_incident(graph, &eids, act_node, IGRAPH_ALL, IGRAPH_LOOPS));
  ------------------
  |  |  656|   386k|    do { \
  |  |  657|   386k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   386k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   386k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 386k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   386k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 386k]
  |  |  ------------------
  ------------------
  103|   386k|            eids_size = igraph_vector_int_size(&eids);
  104|   552k|            for (igraph_int_t j = 0; j < eids_size; j++) {
  ------------------
  |  Branch (104:38): [True: 165k, False: 386k]
  ------------------
  105|   165k|                igraph_int_t edge = VECTOR(eids)[j];
  ------------------
  |  |   60|   165k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  106|   165k|                if (! IGRAPH_BIT_TEST(added_edges, edge)) {
  ------------------
  |  |  142|   165k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   165k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|   165k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   165k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|   165k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   165k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (106:21): [True: 112k, False: 52.4k]
  ------------------
  107|   112k|                    igraph_int_t to = IGRAPH_OTHER(graph, edge, act_node);
  ------------------
  |  |  146|   112k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   112k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   112k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  81.7k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  81.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  31.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  31.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 81.7k, False: 31.2k]
  |  |  ------------------
  ------------------
  108|   112k|                    if (! IGRAPH_BIT_TEST(already_added, to)) {
  ------------------
  |  |  142|   112k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   112k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|   112k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   112k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|   112k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   112k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (108:25): [True: 52.4k, False: 60.5k]
  ------------------
  109|  52.4k|                        IGRAPH_BIT_SET(already_added, to);
  ------------------
  |  |  103|  52.4k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  52.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  52.4k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  52.4k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  52.4k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  52.4k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  110|  52.4k|                        IGRAPH_BIT_SET(added_edges, edge);
  ------------------
  |  |  103|  52.4k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  52.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  52.4k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  52.4k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  52.4k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  52.4k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  111|  52.4k|                        igraph_vector_int_push_back(res, edge); /* reserved */
  112|  52.4k|                        IGRAPH_CHECK(igraph_dqueue_int_push(&q, to));
  ------------------
  |  |  656|  52.4k|    do { \
  |  |  657|  52.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  52.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  52.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 52.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  52.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 52.4k]
  |  |  ------------------
  ------------------
  113|  52.4k|                    }
  114|   112k|                }
  115|   165k|            }
  116|   386k|        }
  117|   334k|    }
  118|       |
  119|  2.25k|    igraph_dqueue_int_destroy(&q);
  120|  2.25k|    igraph_vector_int_destroy(&eids);
  121|  2.25k|    igraph_bitset_destroy(&already_added);
  122|  2.25k|    igraph_bitset_destroy(&added_edges);
  123|  2.25k|    IGRAPH_FINALLY_CLEAN(4);
  124|       |
  125|  2.25k|    return IGRAPH_SUCCESS;
  126|  2.25k|}
spanning_trees.c:max_tree_edges:
   30|  2.25k|static igraph_int_t max_tree_edges(igraph_int_t no_of_nodes, igraph_int_t no_of_edges) {
   31|  2.25k|    if (no_of_nodes == 0) return 0;
  ------------------
  |  Branch (31:9): [True: 1, False: 2.25k]
  ------------------
   32|  2.25k|    if (no_of_edges < no_of_nodes) return no_of_edges;
  ------------------
  |  Branch (32:9): [True: 2.00k, False: 252]
  ------------------
   33|    252|    return no_of_nodes - 1;
   34|  2.25k|}

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

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

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

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

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

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

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

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

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

igraph_mean_degree:
  133|  2.25k|                                  igraph_bool_t loops) {
  134|       |
  135|  2.25k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  136|  2.25k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  137|  2.25k|    igraph_bool_t directed = igraph_is_directed(graph);
  138|       |
  139|  2.25k|    if (no_of_nodes == 0) {
  ------------------
  |  Branch (139:9): [True: 1, False: 2.25k]
  ------------------
  140|      1|        *res = IGRAPH_NAN;
  ------------------
  |  |  138|      1|#define IGRAPH_NAN ((double)NAN)
  ------------------
  141|      1|        return IGRAPH_SUCCESS;
  142|      1|    }
  143|       |
  144|  2.25k|    if (! loops) {
  ------------------
  |  Branch (144:9): [True: 2.25k, False: 0]
  ------------------
  145|  2.25k|        igraph_int_t loop_count;
  146|  2.25k|        IGRAPH_CHECK(igraph_count_loops(graph, &loop_count));
  ------------------
  |  |  656|  2.25k|    do { \
  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  147|  2.25k|        no_of_edges -= loop_count;
  148|  2.25k|    }
  149|       |
  150|  2.25k|    *res = (directed ? 1.0 : 2.0) * (igraph_real_t) no_of_edges / (igraph_real_t) no_of_nodes;
  ------------------
  |  Branch (150:13): [True: 0, False: 2.25k]
  ------------------
  151|       |
  152|  2.25k|    return IGRAPH_SUCCESS;
  153|  2.25k|}

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

igraph_girth:
   75|  2.25k|                            igraph_vector_int_t *cycle) {
   76|       |
   77|  2.25k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
   78|  2.25k|    igraph_dqueue_int_t q;
   79|  2.25k|    igraph_lazy_adjlist_t adjlist;
   80|  2.25k|    igraph_int_t mincirc = IGRAPH_INTEGER_MAX, minvertex = 0;
  ------------------
  |  |   72|  2.25k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
   81|  2.25k|    igraph_int_t node;
   82|  2.25k|    igraph_bool_t triangle = false;
   83|  2.25k|    igraph_vector_int_t *neis;
   84|  2.25k|    igraph_vector_int_t level;
   85|  2.25k|    igraph_int_t stoplevel = no_of_nodes + 1;
   86|  2.25k|    igraph_bool_t anycircle = false;
   87|  2.25k|    igraph_int_t t1 = 0, t2 = 0;
   88|       |
   89|  2.25k|    IGRAPH_CHECK(igraph_lazy_adjlist_init(graph, &adjlist, IGRAPH_ALL, IGRAPH_NO_LOOPS, IGRAPH_NO_MULTIPLE));
  ------------------
  |  |  656|  2.25k|    do { \
  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
   90|  2.25k|    IGRAPH_FINALLY(igraph_lazy_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  2.25k|    do { \
  |  |  604|  2.25k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.25k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.25k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.25k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.25k]
  |  |  ------------------
  |  |  608|  2.25k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
   91|  2.25k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  2.25k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.25k|    do { \
  |  |  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.25k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.25k|    do { \
  |  |  |  |  604|  2.25k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.25k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.25k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.25k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.25k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
   92|  2.25k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&level, no_of_nodes);
  ------------------
  |  |  119|  2.25k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.25k|    do { \
  |  |  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.25k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.25k|    do { \
  |  |  |  |  604|  2.25k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.25k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.25k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.25k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.25k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
   93|       |
   94|   335k|    for (node = 0; !triangle && node < no_of_nodes; node++) {
  ------------------
  |  Branch (94:20): [True: 334k, False: 334]
  |  Branch (94:33): [True: 333k, False: 1.77k]
  ------------------
   95|       |
   96|       |        /* Are there circles in this graph at all? */
   97|   333k|        if (node == 1 && anycircle == 0) {
  ------------------
  |  Branch (97:13): [True: 2.12k, False: 331k]
  |  Branch (97:26): [True: 1.85k, False: 262]
  ------------------
   98|  1.85k|            igraph_bool_t conn;
   99|  1.85k|            IGRAPH_CHECK(igraph_is_connected(graph, &conn, IGRAPH_WEAK));
  ------------------
  |  |  656|  1.85k|    do { \
  |  |  657|  1.85k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.85k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.85k]
  |  |  ------------------
  ------------------
  100|  1.85k|            if (conn) {
  ------------------
  |  Branch (100:17): [True: 152, False: 1.70k]
  ------------------
  101|       |                /* No, there are none */
  102|    152|                break;
  103|    152|            }
  104|  1.85k|        }
  105|       |
  106|   333k|        anycircle = 0;
  107|   333k|        igraph_dqueue_int_clear(&q);
  108|   333k|        igraph_vector_int_null(&level);
  109|   333k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, node));
  ------------------
  |  |  656|   333k|    do { \
  |  |  657|   333k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   333k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   333k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 333k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   333k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 333k]
  |  |  ------------------
  ------------------
  110|   333k|        VECTOR(level)[node] = 1;
  ------------------
  |  |   60|   333k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  111|       |
  112|   333k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   333k|    do { \
  |  |   47|   333k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 333k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   333k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 333k]
  |  |  ------------------
  ------------------
  113|       |
  114|  2.53M|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (114:16): [True: 2.21M, False: 321k]
  ------------------
  115|  2.21M|            igraph_int_t actnode = igraph_dqueue_int_pop(&q);
  116|  2.21M|            igraph_int_t actlevel = VECTOR(level)[actnode];
  ------------------
  |  |   60|  2.21M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  117|  2.21M|            igraph_int_t i, n;
  118|       |
  119|  2.21M|            if (actlevel >= stoplevel) {
  ------------------
  |  Branch (119:17): [True: 11.1k, False: 2.20M]
  ------------------
  120|  11.1k|                break;
  121|  11.1k|            }
  122|       |
  123|  2.20M|            neis = igraph_lazy_adjlist_get(&adjlist, actnode);
  ------------------
  |  |  158|  2.20M|    (igraph_lazy_adjlist_has(al,no) ? ((al)->adjs[(igraph_int_t)(no)]) \
  |  |  ------------------
  |  |  |  |  133|  2.20M|#define igraph_lazy_adjlist_has(al,no) ((al)->adjs[(igraph_int_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (133:40): [True: 1.86M, False: 339k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  159|  2.20M|                                    : (igraph_i_lazy_adjlist_get_real(al, no)))
  ------------------
  124|  2.20M|            IGRAPH_CHECK_OOM(neis, "Failed to query neighbors.");
  ------------------
  |  |  709|  2.20M|    do { \
  |  |  710|  2.20M|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.20M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.20M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  2.20M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.20M]
  |  |  ------------------
  ------------------
  125|       |
  126|  2.20M|            n = igraph_vector_int_size(neis);
  127|  6.09M|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (127:25): [True: 3.89M, False: 2.20M]
  ------------------
  128|  3.89M|                igraph_int_t nei = VECTOR(*neis)[i];
  ------------------
  |  |   60|  3.89M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  129|  3.89M|                igraph_int_t neilevel = VECTOR(level)[nei];
  ------------------
  |  |   60|  3.89M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  130|  3.89M|                if (neilevel != 0) {
  ------------------
  |  Branch (130:21): [True: 1.87M, False: 2.02M]
  ------------------
  131|  1.87M|                    if (neilevel == actlevel - 1) {
  ------------------
  |  Branch (131:25): [True: 1.86M, False: 6.72k]
  ------------------
  132|  1.86M|                        continue;
  133|  1.86M|                    } else {
  134|       |                        /* found circle */
  135|  6.72k|                        stoplevel = neilevel;
  136|  6.72k|                        anycircle = 1;
  137|  6.72k|                        if (actlevel < mincirc) {
  ------------------
  |  Branch (137:29): [True: 6.72k, False: 0]
  ------------------
  138|       |                            /* Is it a minimum circle? */
  139|  6.72k|                            mincirc = actlevel + neilevel - 1;
  140|  6.72k|                            minvertex = node;
  141|  6.72k|                            t1 = actnode; t2 = nei;
  142|  6.72k|                            if (neilevel == 2) {
  ------------------
  |  Branch (142:33): [True: 334, False: 6.38k]
  ------------------
  143|       |                                /* Is it a triangle? */
  144|    334|                                triangle = 1;
  145|    334|                            }
  146|  6.72k|                        }
  147|  6.72k|                        if (neilevel == actlevel) {
  ------------------
  |  Branch (147:29): [True: 577, False: 6.14k]
  ------------------
  148|    577|                            break;
  149|    577|                        }
  150|  6.72k|                    }
  151|  2.02M|                } else {
  152|  2.02M|                    IGRAPH_CHECK(igraph_dqueue_int_push(&q, nei));
  ------------------
  |  |  656|  2.02M|    do { \
  |  |  657|  2.02M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.02M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.02M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.02M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.02M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.02M]
  |  |  ------------------
  ------------------
  153|  2.02M|                    VECTOR(level)[nei] = actlevel + 1;
  ------------------
  |  |   60|  2.02M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  154|  2.02M|                }
  155|  3.89M|            }
  156|       |
  157|  2.20M|        } /* while q !empty */
  158|   333k|    } /* node */
  159|       |
  160|  2.25k|    if (girth) {
  ------------------
  |  Branch (160:9): [True: 2.25k, False: 0]
  ------------------
  161|  2.25k|        if (mincirc == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   72|  2.25k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (161:13): [True: 1.68k, False: 569]
  ------------------
  162|  1.68k|            *girth = IGRAPH_INFINITY;
  ------------------
  |  |  137|  1.68k|#define IGRAPH_INFINITY ((double)INFINITY)
  ------------------
  163|  1.68k|        } else {
  164|    569|            *girth = mincirc;
  165|    569|        }
  166|  2.25k|    }
  167|       |
  168|  2.25k|    if (mincirc == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   72|  2.25k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (168:9): [True: 1.68k, False: 569]
  ------------------
  169|  1.68k|        mincirc = 0;
  170|  1.68k|    }
  171|       |
  172|       |    /* Store the actual circle, if needed */
  173|  2.25k|    if (cycle) {
  ------------------
  |  Branch (173:9): [True: 2.25k, False: 0]
  ------------------
  174|  2.25k|        IGRAPH_CHECK(igraph_vector_int_resize(cycle, mincirc));
  ------------------
  |  |  656|  2.25k|    do { \
  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  175|  2.25k|        if (mincirc != 0) {
  ------------------
  |  Branch (175:13): [True: 569, False: 1.68k]
  ------------------
  176|    569|            igraph_int_t i, n, idx = 0;
  177|    569|            igraph_dqueue_int_clear(&q);
  178|    569|            igraph_vector_int_null(&level); /* used for parent pointers */
  179|    569|#define PARENT(x) (VECTOR(level)[(x)])
  180|    569|            IGRAPH_CHECK(igraph_dqueue_int_push(&q, minvertex));
  ------------------
  |  |  656|    569|    do { \
  |  |  657|    569|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    569|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    569|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 569]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    569|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 569]
  |  |  ------------------
  ------------------
  181|    569|            PARENT(minvertex) = minvertex;
  ------------------
  |  |  179|    569|#define PARENT(x) (VECTOR(level)[(x)])
  |  |  ------------------
  |  |  |  |   60|    569|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  182|  4.36k|            while (PARENT(t1) == 0 || PARENT(t2) == 0) {
  ------------------
  |  |  179|  4.36k|#define PARENT(x) (VECTOR(level)[(x)])
  |  |  ------------------
  |  |  |  |   60|  4.36k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                          while (PARENT(t1) == 0 || PARENT(t2) == 0) {
  ------------------
  |  |  179|  1.17k|#define PARENT(x) (VECTOR(level)[(x)])
  |  |  ------------------
  |  |  |  |   60|  1.17k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (182:20): [True: 3.19k, False: 1.17k]
  |  Branch (182:39): [True: 601, False: 569]
  ------------------
  183|  3.79k|                igraph_int_t actnode = igraph_dqueue_int_pop(&q);
  184|  3.79k|                neis = igraph_lazy_adjlist_get(&adjlist, actnode);
  ------------------
  |  |  158|  3.79k|    (igraph_lazy_adjlist_has(al,no) ? ((al)->adjs[(igraph_int_t)(no)]) \
  |  |  ------------------
  |  |  |  |  133|  3.79k|#define igraph_lazy_adjlist_has(al,no) ((al)->adjs[(igraph_int_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (133:40): [True: 3.79k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  159|  3.79k|                                    : (igraph_i_lazy_adjlist_get_real(al, no)))
  ------------------
  185|  3.79k|                IGRAPH_CHECK_OOM(neis, "Failed to query neighbors.");
  ------------------
  |  |  709|  3.79k|    do { \
  |  |  710|  3.79k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  3.79k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  3.79k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 3.79k]
  |  |  ------------------
  ------------------
  186|  3.79k|                n = igraph_vector_int_size(neis);
  187|  14.8k|                for (i = 0; i < n; i++) {
  ------------------
  |  Branch (187:29): [True: 11.0k, False: 3.79k]
  ------------------
  188|  11.0k|                    igraph_int_t nei = VECTOR(*neis)[i];
  ------------------
  |  |   60|  11.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  189|  11.0k|                    if (PARENT(nei) == 0) {
  ------------------
  |  |  179|  11.0k|#define PARENT(x) (VECTOR(level)[(x)])
  |  |  ------------------
  |  |  |  |   60|  11.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (189:25): [True: 7.65k, False: 3.39k]
  ------------------
  190|  7.65k|                        PARENT(nei) = actnode + 1;
  ------------------
  |  |  179|  7.65k|#define PARENT(x) (VECTOR(level)[(x)])
  |  |  ------------------
  |  |  |  |   60|  7.65k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  191|  7.65k|                        IGRAPH_CHECK(igraph_dqueue_int_push(&q, nei));
  ------------------
  |  |  656|  7.65k|    do { \
  |  |  657|  7.65k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  7.65k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  7.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  7.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 7.65k]
  |  |  ------------------
  ------------------
  192|  7.65k|                    }
  193|  11.0k|                }
  194|  3.79k|            }  /* while q !empty */
  195|       |            /* Ok, now use PARENT to create the path */
  196|  2.10k|            while (t1 != minvertex) {
  ------------------
  |  Branch (196:20): [True: 1.53k, False: 569]
  ------------------
  197|  1.53k|                VECTOR(*cycle)[idx++] = t1;
  ------------------
  |  |   60|  1.53k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  198|  1.53k|                t1 = PARENT(t1) - 1;
  ------------------
  |  |  179|  1.53k|#define PARENT(x) (VECTOR(level)[(x)])
  |  |  ------------------
  |  |  |  |   60|  1.53k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  199|  1.53k|            }
  200|    569|            VECTOR(*cycle)[idx] = minvertex;
  ------------------
  |  |   60|    569|#define VECTOR(v) ((v).stor_begin)
  ------------------
  201|    569|            idx = mincirc - 1;
  202|  2.28k|            while (t2 != minvertex) {
  ------------------
  |  Branch (202:20): [True: 1.71k, False: 569]
  ------------------
  203|  1.71k|                VECTOR(*cycle)[idx--] = t2;
  ------------------
  |  |   60|  1.71k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  204|  1.71k|                t2 = PARENT(t2) - 1;
  ------------------
  |  |  179|  1.71k|#define PARENT(x) (VECTOR(level)[(x)])
  |  |  ------------------
  |  |  |  |   60|  1.71k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  205|  1.71k|            }
  206|    569|        } /* anycircle */
  207|  2.25k|    } /* circle */
  208|  2.25k|#undef PARENT
  209|       |
  210|  2.25k|    igraph_vector_int_destroy(&level);
  211|  2.25k|    igraph_dqueue_int_destroy(&q);
  212|  2.25k|    igraph_lazy_adjlist_destroy(&adjlist);
  213|  2.25k|    IGRAPH_FINALLY_CLEAN(3);
  214|       |
  215|  2.25k|    return IGRAPH_SUCCESS;
  216|  2.25k|}

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

igraph_has_multiple:
  176|  4.51k|igraph_error_t igraph_has_multiple(const igraph_t *graph, igraph_bool_t *res) {
  177|  4.51k|    igraph_int_t vc = igraph_vcount(graph);
  178|  4.51k|    igraph_int_t ec = igraph_ecount(graph);
  179|  4.51k|    igraph_bool_t directed = igraph_is_directed(graph);
  180|       |
  181|  4.51k|    IGRAPH_RETURN_IF_CACHED_BOOL(graph, IGRAPH_PROP_HAS_MULTI, res);
  ------------------
  |  |   97|  4.51k|    do { \
  |  |   98|  4.51k|        if (igraph_i_property_cache_has((graphptr), (prop))) { \
  |  |  ------------------
  |  |  |  Branch (98:13): [True: 4.51k, False: 1]
  |  |  ------------------
  |  |   99|  4.51k|            *(resptr) = igraph_i_property_cache_get_bool((graphptr), (prop)); \
  |  |  100|  4.51k|            return IGRAPH_SUCCESS; \
  |  |  101|  4.51k|        } \
  |  |  102|  4.51k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (102:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
  182|       |
  183|      1|    if (vc == 0 || ec == 0) {
  ------------------
  |  Branch (183:9): [True: 1, False: 0]
  |  Branch (183:20): [True: 0, False: 0]
  ------------------
  184|      1|        *res = false;
  185|      1|    } else {
  186|      0|        igraph_vector_int_t neis;
  187|      0|        igraph_int_t i, j, n;
  188|      0|        igraph_bool_t found = false;
  189|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  190|      0|        for (i = 0; i < vc && !found; i++) {
  ------------------
  |  Branch (190:21): [True: 0, False: 0]
  |  Branch (190:31): [True: 0, False: 0]
  ------------------
  191|      0|            IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  192|      0|                graph, &neis, i, IGRAPH_OUT, IGRAPH_LOOPS, IGRAPH_MULTIPLE
  193|      0|            ));
  194|      0|            n = igraph_vector_int_size(&neis);
  195|      0|            for (j = 1; j < n; j++) {
  ------------------
  |  Branch (195:25): [True: 0, False: 0]
  ------------------
  196|      0|                if (VECTOR(neis)[j - 1] == VECTOR(neis)[j]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (VECTOR(neis)[j - 1] == VECTOR(neis)[j]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (196:21): [True: 0, False: 0]
  ------------------
  197|       |                    /* If the graph is undirected, loop edges appear twice in the neighbor
  198|       |                     * list, so check the next item as well */
  199|      0|                    if (directed) {
  ------------------
  |  Branch (199:25): [True: 0, False: 0]
  ------------------
  200|       |                        /* Directed, so this is a real multiple edge */
  201|      0|                        found = true; break;
  202|      0|                    } else if (VECTOR(neis)[j - 1] != i) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (202:32): [True: 0, False: 0]
  ------------------
  203|       |                        /* Undirected, but not a loop edge */
  204|      0|                        found = true; break;
  205|      0|                    } else if (j < n - 1 && VECTOR(neis)[j] == VECTOR(neis)[j + 1]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  } else if (j < n - 1 && VECTOR(neis)[j] == VECTOR(neis)[j + 1]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (205:32): [True: 0, False: 0]
  |  Branch (205:45): [True: 0, False: 0]
  ------------------
  206|       |                        /* Undirected, loop edge, multiple times */
  207|      0|                        found = true; break;
  208|      0|                    }
  209|      0|                }
  210|      0|            }
  211|      0|        }
  212|      0|        *res = found;
  213|      0|        igraph_vector_int_destroy(&neis);
  214|      0|        IGRAPH_FINALLY_CLEAN(1);
  215|      0|    }
  216|       |
  217|      1|    igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_MULTI, *res);
  218|       |
  219|      1|    return IGRAPH_SUCCESS;
  220|      1|}
igraph_is_multiple:
  250|  2.25k|                                  igraph_es_t es) {
  251|  2.25k|    igraph_eit_t eit;
  252|  2.25k|    igraph_int_t i, j, n;
  253|  2.25k|    igraph_lazy_inclist_t inclist;
  254|       |
  255|  2.25k|    IGRAPH_CHECK(igraph_eit_create(graph, es, &eit));
  ------------------
  |  |  656|  2.25k|    do { \
  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  256|  2.25k|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  603|  2.25k|    do { \
  |  |  604|  2.25k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.25k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.25k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.25k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.25k]
  |  |  ------------------
  |  |  608|  2.25k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  257|       |
  258|  2.25k|    IGRAPH_CHECK(igraph_lazy_inclist_init(graph, &inclist, IGRAPH_OUT, IGRAPH_LOOPS_ONCE));
  ------------------
  |  |  656|  2.25k|    do { \
  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  259|  2.25k|    IGRAPH_FINALLY(igraph_lazy_inclist_destroy, &inclist);
  ------------------
  |  |  603|  2.25k|    do { \
  |  |  604|  2.25k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.25k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.25k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.25k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.25k]
  |  |  ------------------
  |  |  608|  2.25k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  260|       |
  261|  2.25k|    IGRAPH_CHECK(igraph_vector_bool_resize(res, IGRAPH_EIT_SIZE(eit)));
  ------------------
  |  |  656|  2.25k|    do { \
  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  262|       |
  263|  84.9k|    for (i = 0; !IGRAPH_EIT_END(eit); i++, IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  371|  84.9k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                  for (i = 0; !IGRAPH_EIT_END(eit); i++, IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  359|  82.7k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (263:17): [True: 82.7k, False: 2.25k]
  ------------------
  264|  82.7k|        igraph_int_t e = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|  82.7k|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 82.7k, False: 0]
  |  |  ------------------
  |  |  406|  82.7k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  265|  82.7k|        igraph_int_t from = IGRAPH_FROM(graph, e);
  ------------------
  |  |  115|  82.7k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  82.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  266|  82.7k|        igraph_int_t to = IGRAPH_TO(graph, e);
  ------------------
  |  |  128|  82.7k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  82.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  267|  82.7k|        igraph_vector_int_t *neis = igraph_lazy_inclist_get(&inclist, from);
  ------------------
  |  |  214|  82.7k|    (igraph_lazy_inclist_has(il,no) ? ((il)->incs[(igraph_int_t)(no)]) \
  |  |  ------------------
  |  |  |  |  189|  82.7k|#define igraph_lazy_inclist_has(il,no) ((il)->incs[(igraph_int_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (189:40): [True: 42.8k, False: 39.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  215|  82.7k|                                    : (igraph_i_lazy_inclist_get_real(il,no)))
  ------------------
  268|       |
  269|  82.7k|        IGRAPH_CHECK_OOM(neis, "Failed to query incident edges.");
  ------------------
  |  |  709|  82.7k|    do { \
  |  |  710|  82.7k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  82.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 82.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  82.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 82.7k]
  |  |  ------------------
  ------------------
  270|       |
  271|  82.7k|        VECTOR(*res)[i] = false;
  ------------------
  |  |   60|  82.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  272|       |
  273|  82.7k|        n = igraph_vector_int_size(neis);
  274|  3.37M|        for (j = 0; j < n; j++) {
  ------------------
  |  Branch (274:21): [True: 3.29M, False: 82.7k]
  ------------------
  275|  3.29M|            igraph_int_t e2 = VECTOR(*neis)[j];
  ------------------
  |  |   60|  3.29M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  276|  3.29M|            igraph_int_t to2 = IGRAPH_OTHER(graph, e2, from);
  ------------------
  |  |  146|  3.29M|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  3.29M|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.29M|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  1.89M|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.89M|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  1.39M|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.39M|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 1.89M, False: 1.39M]
  |  |  ------------------
  ------------------
  277|  3.29M|            if (to2 == to && e2 < e) {
  ------------------
  |  Branch (277:17): [True: 2.50M, False: 788k]
  |  Branch (277:30): [True: 1.21M, False: 1.29M]
  ------------------
  278|  1.21M|                VECTOR(*res)[i] = true;
  ------------------
  |  |   60|  1.21M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  279|  1.21M|            }
  280|  3.29M|        }
  281|  82.7k|    }
  282|       |
  283|  2.25k|    igraph_lazy_inclist_destroy(&inclist);
  284|  2.25k|    igraph_eit_destroy(&eit);
  285|  2.25k|    IGRAPH_FINALLY_CLEAN(2);
  286|  2.25k|    return IGRAPH_SUCCESS;
  287|  2.25k|}
igraph_count_multiple:
  314|  2.25k|                                     igraph_es_t es) {
  315|  2.25k|    igraph_eit_t eit;
  316|  2.25k|    igraph_int_t i, j, n;
  317|  2.25k|    igraph_lazy_adjlist_t adjlist;
  318|       |
  319|  2.25k|    IGRAPH_CHECK(igraph_eit_create(graph, es, &eit));
  ------------------
  |  |  656|  2.25k|    do { \
  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  320|  2.25k|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  603|  2.25k|    do { \
  |  |  604|  2.25k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.25k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.25k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.25k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.25k]
  |  |  ------------------
  |  |  608|  2.25k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  321|  2.25k|    IGRAPH_CHECK(igraph_lazy_adjlist_init(graph, &adjlist, IGRAPH_OUT, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.25k|    do { \
  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  322|  2.25k|    IGRAPH_FINALLY(igraph_lazy_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  2.25k|    do { \
  |  |  604|  2.25k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.25k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.25k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.25k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.25k]
  |  |  ------------------
  |  |  608|  2.25k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  323|       |
  324|  2.25k|    IGRAPH_CHECK(igraph_vector_int_resize(res, IGRAPH_EIT_SIZE(eit)));
  ------------------
  |  |  656|  2.25k|    do { \
  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  325|       |
  326|  84.9k|    for (i = 0; !IGRAPH_EIT_END(eit); i++, IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  371|  84.9k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                  for (i = 0; !IGRAPH_EIT_END(eit); i++, IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  359|  82.7k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (326:17): [True: 82.7k, False: 2.25k]
  ------------------
  327|  82.7k|        igraph_int_t e = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|  82.7k|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 0, False: 82.7k]
  |  |  ------------------
  |  |  406|  82.7k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|  82.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  328|  82.7k|        igraph_int_t from = IGRAPH_FROM(graph, e);
  ------------------
  |  |  115|  82.7k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  82.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  329|  82.7k|        igraph_int_t to = IGRAPH_TO(graph, e);
  ------------------
  |  |  128|  82.7k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  82.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  330|  82.7k|        igraph_vector_int_t *neis = igraph_lazy_adjlist_get(&adjlist, from);
  ------------------
  |  |  158|  82.7k|    (igraph_lazy_adjlist_has(al,no) ? ((al)->adjs[(igraph_int_t)(no)]) \
  |  |  ------------------
  |  |  |  |  133|  82.7k|#define igraph_lazy_adjlist_has(al,no) ((al)->adjs[(igraph_int_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (133:40): [True: 42.8k, False: 39.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  159|  82.7k|                                    : (igraph_i_lazy_adjlist_get_real(al, no)))
  ------------------
  331|       |
  332|  82.7k|        IGRAPH_CHECK_OOM(neis, "Failed to query adjacent vertices.");
  ------------------
  |  |  709|  82.7k|    do { \
  |  |  710|  82.7k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  82.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 82.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  82.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 82.7k]
  |  |  ------------------
  ------------------
  333|       |
  334|  82.7k|        VECTOR(*res)[i] = 0;
  ------------------
  |  |   60|  82.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  335|       |
  336|  82.7k|        n = igraph_vector_int_size(neis);
  337|  3.37M|        for (j = 0; j < n; j++) {
  ------------------
  |  Branch (337:21): [True: 3.29M, False: 82.7k]
  ------------------
  338|  3.29M|            if (VECTOR(*neis)[j] == to) {
  ------------------
  |  |   60|  3.29M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (338:17): [True: 2.50M, False: 788k]
  ------------------
  339|  2.50M|                VECTOR(*res)[i]++;
  ------------------
  |  |   60|  2.50M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  340|  2.50M|            }
  341|  3.29M|        }
  342|  82.7k|    }
  343|       |
  344|  2.25k|    igraph_lazy_adjlist_destroy(&adjlist);
  345|  2.25k|    igraph_eit_destroy(&eit);
  346|  2.25k|    IGRAPH_FINALLY_CLEAN(2);
  347|       |
  348|  2.25k|    return IGRAPH_SUCCESS;
  349|  2.25k|}
igraph_count_multiple_1:
  369|  2.25k|{
  370|  2.25k|    igraph_int_t i, n, count;
  371|  2.25k|    igraph_int_t from = IGRAPH_FROM(graph, eid);
  ------------------
  |  |  115|  2.25k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  2.25k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  372|  2.25k|    igraph_int_t to = IGRAPH_TO(graph, eid);
  ------------------
  |  |  128|  2.25k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  2.25k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  373|  2.25k|    igraph_vector_int_t vids;
  374|       |
  375|  2.25k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&vids, 0);
  ------------------
  |  |  119|  2.25k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.25k|    do { \
  |  |  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.25k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.25k|    do { \
  |  |  |  |  604|  2.25k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.25k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.25k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.25k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.25k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  376|  2.25k|    IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|  2.25k|    do { \
  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  377|  2.25k|        graph, &vids, from, IGRAPH_OUT, IGRAPH_LOOPS, IGRAPH_MULTIPLE
  378|  2.25k|    ));
  379|       |
  380|  2.25k|    count = 0;
  381|  2.25k|    n = igraph_vector_int_size(&vids);
  382|  12.6k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (382:17): [True: 10.4k, False: 2.25k]
  ------------------
  383|  10.4k|        if (VECTOR(vids)[i] == to) {
  ------------------
  |  |   60|  10.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (383:13): [True: 2.35k, False: 8.07k]
  ------------------
  384|  2.35k|            count++;
  385|  2.35k|        }
  386|  10.4k|    }
  387|       |
  388|  2.25k|    igraph_vector_int_destroy(&vids);
  389|  2.25k|    IGRAPH_FINALLY_CLEAN(1);
  390|       |
  391|  2.25k|    *res = count;
  392|       |
  393|  2.25k|    return IGRAPH_SUCCESS;
  394|  2.25k|}

igraph_unfold_tree:
   59|  2.25k|                       igraph_vector_int_t *vertex_index) {
   60|       |
   61|  2.25k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
   62|  2.25k|    igraph_int_t no_of_edges = igraph_ecount(graph);
   63|  2.25k|    igraph_int_t no_of_roots = igraph_vector_int_size(roots);
   64|  2.25k|    igraph_int_t tree_vertex_count = no_of_nodes;
   65|       |
   66|  2.25k|    igraph_vector_int_t edges;
   67|  2.25k|    igraph_bitset_t seen_vertices;
   68|  2.25k|    igraph_bitset_t seen_edges;
   69|       |
   70|  2.25k|    igraph_dqueue_int_t Q;
   71|  2.25k|    igraph_vector_int_t neis;
   72|       |
   73|  2.25k|    igraph_int_t v_ptr = no_of_nodes;
   74|       |
   75|  2.25k|    if (! igraph_vector_int_isininterval(roots, 0, no_of_nodes-1)) {
  ------------------
  |  Branch (75:9): [True: 0, False: 2.25k]
  ------------------
   76|      0|        IGRAPH_ERROR("All roots should be vertices of the graph.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   77|      0|    }
   78|       |
   79|  2.25k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, 0);
  ------------------
  |  |  119|  2.25k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.25k|    do { \
  |  |  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.25k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.25k|    do { \
  |  |  |  |  604|  2.25k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.25k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.25k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.25k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.25k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
   80|  2.25k|    IGRAPH_CHECK(igraph_vector_int_reserve(&edges, no_of_edges * 2));
  ------------------
  |  |  656|  2.25k|    do { \
  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
   81|  2.25k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&Q, 100);
  ------------------
  |  |   61|  2.25k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.25k|    do { \
  |  |  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.25k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.25k|    do { \
  |  |  |  |  604|  2.25k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.25k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.25k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.25k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.25k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
   82|  2.25k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  119|  2.25k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.25k|    do { \
  |  |  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.25k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.25k|    do { \
  |  |  |  |  604|  2.25k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.25k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.25k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.25k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.25k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
   83|  2.25k|    IGRAPH_BITSET_INIT_FINALLY(&seen_vertices, no_of_nodes);
  ------------------
  |  |  259|  2.25k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  260|  2.25k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.25k|    do { \
  |  |  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  261|  2.25k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.25k|    do { \
  |  |  |  |  604|  2.25k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.25k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.25k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.25k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.25k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (261:62): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
   84|  2.25k|    IGRAPH_BITSET_INIT_FINALLY(&seen_edges, no_of_edges);
  ------------------
  |  |  259|  2.25k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  260|  2.25k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.25k|    do { \
  |  |  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  261|  2.25k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.25k|    do { \
  |  |  |  |  604|  2.25k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.25k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.25k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.25k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.25k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (261:62): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
   85|       |
   86|  2.25k|    if (vertex_index) {
  ------------------
  |  Branch (86:9): [True: 2.25k, False: 0]
  ------------------
   87|  2.25k|        IGRAPH_CHECK(igraph_vector_int_range(vertex_index, 0, no_of_nodes));
  ------------------
  |  |  656|  2.25k|    do { \
  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
   88|  2.25k|    }
   89|       |
   90|  4.51k|    for (igraph_int_t r = 0; r < no_of_roots; r++) {
  ------------------
  |  Branch (90:30): [True: 2.25k, False: 2.25k]
  ------------------
   91|       |
   92|  2.25k|        igraph_int_t root = VECTOR(*roots)[r];
  ------------------
  |  |   60|  2.25k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   93|  2.25k|        IGRAPH_BIT_SET(seen_vertices, root);
  ------------------
  |  |  103|  2.25k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  2.25k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  2.25k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  2.25k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  2.25k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  2.25k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   94|  2.25k|        IGRAPH_CHECK(igraph_dqueue_int_push(&Q, root));
  ------------------
  |  |  656|  2.25k|    do { \
  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
   95|       |
   96|  35.3k|        while (!igraph_dqueue_int_empty(&Q)) {
  ------------------
  |  Branch (96:16): [True: 33.0k, False: 2.25k]
  ------------------
   97|  33.0k|            igraph_int_t actnode = igraph_dqueue_int_pop(&Q);
   98|       |
   99|  33.0k|            IGRAPH_CHECK(igraph_incident(graph, &neis, actnode, mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  33.0k|    do { \
  |  |  657|  33.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  33.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  33.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 33.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  33.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 33.0k]
  |  |  ------------------
  ------------------
  100|       |
  101|  33.0k|            igraph_int_t n = igraph_vector_int_size(&neis);
  102|   135k|            for (igraph_int_t i = 0; i < n; i++) {
  ------------------
  |  Branch (102:38): [True: 102k, False: 33.0k]
  ------------------
  103|       |
  104|   102k|                igraph_int_t edge = VECTOR(neis)[i];
  ------------------
  |  |   60|   102k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  105|   102k|                igraph_int_t from = IGRAPH_FROM(graph, edge);
  ------------------
  |  |  115|   102k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|   102k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  106|   102k|                igraph_int_t to = IGRAPH_TO(graph, edge);
  ------------------
  |  |  128|   102k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|   102k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  107|   102k|                igraph_int_t nei = IGRAPH_OTHER(graph, edge, actnode);
  ------------------
  |  |  146|   102k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   102k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   102k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  62.8k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  62.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  39.8k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  39.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 62.8k, False: 39.8k]
  |  |  ------------------
  ------------------
  108|       |
  109|   102k|                if (! IGRAPH_BIT_TEST(seen_edges, edge)) {
  ------------------
  |  |  142|   102k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   102k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|   102k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   102k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|   102k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   102k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (109:21): [True: 51.3k, False: 51.3k]
  ------------------
  110|       |
  111|  51.3k|                    IGRAPH_BIT_SET(seen_edges, edge);
  ------------------
  |  |  103|  51.3k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  51.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  51.3k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  51.3k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  51.3k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  51.3k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  112|       |
  113|  51.3k|                    if (! IGRAPH_BIT_TEST(seen_vertices, nei)) {
  ------------------
  |  |  142|  51.3k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  51.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  51.3k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  51.3k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  51.3k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  51.3k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (113:25): [True: 30.8k, False: 20.5k]
  ------------------
  114|       |
  115|  30.8k|                        IGRAPH_CHECK(igraph_vector_int_push_back(&edges, from));
  ------------------
  |  |  656|  30.8k|    do { \
  |  |  657|  30.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  30.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  30.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 30.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  30.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 30.8k]
  |  |  ------------------
  ------------------
  116|  30.8k|                        IGRAPH_CHECK(igraph_vector_int_push_back(&edges, to));
  ------------------
  |  |  656|  30.8k|    do { \
  |  |  657|  30.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  30.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  30.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 30.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  30.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 30.8k]
  |  |  ------------------
  ------------------
  117|       |
  118|  30.8k|                        IGRAPH_BIT_SET(seen_vertices, nei);
  ------------------
  |  |  103|  30.8k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  30.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  30.8k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  30.8k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  30.8k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  30.8k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  119|  30.8k|                        IGRAPH_CHECK(igraph_dqueue_int_push(&Q, nei));
  ------------------
  |  |  656|  30.8k|    do { \
  |  |  657|  30.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  30.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  30.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 30.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  30.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 30.8k]
  |  |  ------------------
  ------------------
  120|       |
  121|  30.8k|                    } else {
  122|       |
  123|  20.5k|                        tree_vertex_count++;
  124|  20.5k|                        if (vertex_index) {
  ------------------
  |  Branch (124:29): [True: 20.5k, False: 0]
  ------------------
  125|  20.5k|                            IGRAPH_CHECK(igraph_vector_int_push_back(vertex_index, nei));
  ------------------
  |  |  656|  20.5k|    do { \
  |  |  657|  20.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  20.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  20.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  20.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 20.5k]
  |  |  ------------------
  ------------------
  126|  20.5k|                        }
  127|       |
  128|  20.5k|                        if (from == nei) {
  ------------------
  |  Branch (128:29): [True: 18.0k, False: 2.44k]
  ------------------
  129|  18.0k|                            IGRAPH_CHECK(igraph_vector_int_push_back(&edges, v_ptr++));
  ------------------
  |  |  656|  18.0k|    do { \
  |  |  657|  18.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  18.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  18.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 18.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  18.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 18.0k]
  |  |  ------------------
  ------------------
  130|  18.0k|                            IGRAPH_CHECK(igraph_vector_int_push_back(&edges, to));
  ------------------
  |  |  656|  18.0k|    do { \
  |  |  657|  18.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  18.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  18.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 18.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  18.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 18.0k]
  |  |  ------------------
  ------------------
  131|  18.0k|                        } else {
  132|  2.44k|                            IGRAPH_CHECK(igraph_vector_int_push_back(&edges, from));
  ------------------
  |  |  656|  2.44k|    do { \
  |  |  657|  2.44k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.44k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.44k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.44k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.44k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.44k]
  |  |  ------------------
  ------------------
  133|  2.44k|                            IGRAPH_CHECK(igraph_vector_int_push_back(&edges, v_ptr++));
  ------------------
  |  |  656|  2.44k|    do { \
  |  |  657|  2.44k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.44k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.44k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.44k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.44k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.44k]
  |  |  ------------------
  ------------------
  134|  2.44k|                        }
  135|  20.5k|                    }
  136|  51.3k|                }
  137|       |
  138|   102k|            } /* for i<n */
  139|       |
  140|  33.0k|        } /* ! igraph_dqueue_int_empty(&Q) */
  141|       |
  142|  2.25k|    } /* r < igraph_vector_int_size(roots) */
  143|       |
  144|  2.25k|    igraph_bitset_destroy(&seen_edges);
  145|  2.25k|    igraph_bitset_destroy(&seen_vertices);
  146|  2.25k|    igraph_vector_int_destroy(&neis);
  147|  2.25k|    igraph_dqueue_int_destroy(&Q);
  148|  2.25k|    IGRAPH_FINALLY_CLEAN(4);
  149|       |
  150|  2.25k|    IGRAPH_CHECK(igraph_create(tree, &edges, tree_vertex_count, igraph_is_directed(graph)));
  ------------------
  |  |  656|  2.25k|    do { \
  |  |  657|  2.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.25k]
  |  |  ------------------
  ------------------
  151|  2.25k|    igraph_vector_int_destroy(&edges);
  152|  2.25k|    IGRAPH_FINALLY_CLEAN(1);
  153|       |
  154|  2.25k|    return IGRAPH_SUCCESS;
  155|  2.25k|}
igraph_is_tree:
  251|    206|igraph_error_t igraph_is_tree(const igraph_t *graph, igraph_bool_t *res, igraph_int_t *root, igraph_neimode_t mode) {
  252|    206|    igraph_bool_t is_tree = false;
  253|    206|    igraph_bool_t treat_as_undirected = !igraph_is_directed(graph) || mode == IGRAPH_ALL;
  ------------------
  |  Branch (253:41): [True: 206, False: 0]
  |  Branch (253:71): [True: 0, False: 0]
  ------------------
  254|    206|    igraph_int_t iroot = 0;
  255|    206|    igraph_int_t visited_count;
  256|    206|    igraph_int_t vcount, ecount;
  257|       |
  258|    206|    vcount = igraph_vcount(graph);
  259|    206|    ecount = igraph_ecount(graph);
  260|       |
  261|    206|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED)) {
  ------------------
  |  Branch (261:9): [True: 0, False: 206]
  ------------------
  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|    206|    if (ecount != vcount - 1) {
  ------------------
  |  Branch (288:9): [True: 0, False: 206]
  ------------------
  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|    206|    if (vcount == 1) {
  ------------------
  |  Branch (294:9): [True: 0, False: 206]
  ------------------
  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|    206|    if (! igraph_is_directed(graph)) {
  ------------------
  |  Branch (304:9): [True: 206, False: 0]
  ------------------
  305|    206|        mode = IGRAPH_ALL;
  306|    206|    }
  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|    206|    is_tree = true; /* assume success */
  319|       |
  320|    206|    switch (mode) {
  321|    206|    case IGRAPH_ALL:
  ------------------
  |  Branch (321:5): [True: 206, False: 0]
  ------------------
  322|    206|        iroot = 0;
  323|    206|        break;
  324|       |
  325|      0|    case IGRAPH_IN:
  ------------------
  |  Branch (325:5): [True: 0, False: 206]
  ------------------
  326|      0|    case IGRAPH_OUT: {
  ------------------
  |  Branch (326:5): [True: 0, False: 206]
  ------------------
  327|      0|        igraph_vector_int_t degree;
  328|      0|        igraph_int_t i;
  329|       |
  330|      0|        IGRAPH_CHECK(igraph_vector_int_init(&degree, 0));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  331|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, &degree);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  332|       |
  333|      0|        IGRAPH_CHECK(igraph_degree(graph, &degree, igraph_vss_all(), IGRAPH_REVERSE_MODE(mode), IGRAPH_LOOPS));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 0, False: 0]
  |  |  |  Branch (657:40): [True: 0, False: 0]
  |  |  ------------------
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  334|       |
  335|      0|        for (i = 0; i < vcount; ++i) {
  ------------------
  |  Branch (335:21): [True: 0, False: 0]
  ------------------
  336|      0|            if (VECTOR(degree)[i] == 0) {
  ------------------
  |  |   60|      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) {
  ------------------
  |  |   60|      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: 206]
  ------------------
  365|      0|        IGRAPH_ERROR("Invalid mode.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  366|    206|    }
  367|       |
  368|       |    /* if no suitable root was found, skip visiting vertices */
  369|    206|    if (is_tree) {
  ------------------
  |  Branch (369:9): [True: 206, False: 0]
  ------------------
  370|    206|        IGRAPH_CHECK(igraph_i_is_tree_visitor(graph, iroot, mode, &visited_count));
  ------------------
  |  |  656|    206|    do { \
  |  |  657|    206|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    206|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    206|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 206]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    206|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 206]
  |  |  ------------------
  ------------------
  371|    206|        is_tree = visited_count == vcount;
  372|    206|    }
  373|       |
  374|    206|success:
  375|    206|    if (res) {
  ------------------
  |  Branch (375:9): [True: 206, False: 0]
  ------------------
  376|    206|        *res = is_tree;
  377|    206|    }
  378|       |
  379|    206|    if (root) {
  ------------------
  |  Branch (379:9): [True: 0, False: 206]
  ------------------
  380|      0|        *root = iroot;
  381|      0|    }
  382|       |
  383|    206|    if (is_tree) {
  ------------------
  |  Branch (383:9): [True: 206, 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|    206|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_FOREST, true);
  388|    206|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED, true);
  389|    206|    }
  390|       |
  391|    206|    return IGRAPH_SUCCESS;
  392|    206|}
trees.c:igraph_i_is_tree_visitor:
  160|    206|static igraph_error_t igraph_i_is_tree_visitor(const igraph_t *graph, igraph_int_t root, igraph_neimode_t mode, igraph_int_t *visited_count) {
  161|    206|    igraph_stack_int_t stack;
  162|    206|    igraph_bitset_t visited;
  163|    206|    igraph_vector_int_t neighbors;
  164|    206|    igraph_int_t i;
  165|       |
  166|    206|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neighbors, 0);
  ------------------
  |  |  119|    206|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    206|    do { \
  |  |  |  |  657|    206|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    206|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    206|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 206]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    206|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 206]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    206|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    206|    do { \
  |  |  |  |  604|    206|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    206|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    206|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    206|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 206]
  |  |  |  |  ------------------
  |  |  |  |  608|    206|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    206|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 206]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 206]
  |  |  ------------------
  ------------------
  167|       |
  168|    206|    IGRAPH_BITSET_INIT_FINALLY(&visited, igraph_vcount(graph));
  ------------------
  |  |  259|    206|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  260|    206|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|    206|    do { \
  |  |  |  |  657|    206|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    206|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    206|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 206]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    206|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 206]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  261|    206|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|    206|    do { \
  |  |  |  |  604|    206|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    206|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    206|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    206|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 206]
  |  |  |  |  ------------------
  |  |  |  |  608|    206|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    206|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 206]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (261:62): [Folded, False: 206]
  |  |  ------------------
  ------------------
  169|       |
  170|    206|    IGRAPH_CHECK(igraph_stack_int_init(&stack, 0));
  ------------------
  |  |  656|    206|    do { \
  |  |  657|    206|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    206|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    206|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 206]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    206|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 206]
  |  |  ------------------
  ------------------
  171|    206|    IGRAPH_FINALLY(igraph_stack_int_destroy, &stack);
  ------------------
  |  |  603|    206|    do { \
  |  |  604|    206|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    206|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    206|         * incorrect destructor function with the pointer */ \
  |  |  607|    206|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 206]
  |  |  ------------------
  |  |  608|    206|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    206|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 206]
  |  |  ------------------
  ------------------
  172|       |
  173|    206|    *visited_count = 0;
  174|       |
  175|       |    /* push the root into the stack */
  176|    206|    IGRAPH_CHECK(igraph_stack_int_push(&stack, root));
  ------------------
  |  |  656|    206|    do { \
  |  |  657|    206|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    206|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    206|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 206]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    206|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 206]
  |  |  ------------------
  ------------------
  177|       |
  178|  5.92k|    while (! igraph_stack_int_empty(&stack)) {
  ------------------
  |  Branch (178:12): [True: 5.71k, False: 206]
  ------------------
  179|  5.71k|        igraph_int_t u;
  180|  5.71k|        igraph_int_t ncount;
  181|       |
  182|       |        /* take a vertex from the stack, mark it as visited */
  183|  5.71k|        u = igraph_stack_int_pop(&stack);
  184|  5.71k|        if (IGRAPH_LIKELY(! IGRAPH_BIT_TEST(visited, u))) {
  ------------------
  |  |  613|  5.71k|    #define IGRAPH_LIKELY(a)   __builtin_expect(!!(a), 1)
  |  |  ------------------
  |  |  |  Branch (613:32): [True: 5.71k, False: 0]
  |  |  ------------------
  ------------------
  185|  5.71k|            IGRAPH_BIT_SET(visited, u);
  ------------------
  |  |  103|  5.71k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  5.71k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  5.71k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  5.71k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  5.71k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  5.71k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|  5.71k|            *visited_count += 1;
  187|  5.71k|        }
  188|       |
  189|       |        /* register all its yet-unvisited neighbours for future processing */
  190|  5.71k|        IGRAPH_CHECK(igraph_neighbors(graph, &neighbors, u, mode, IGRAPH_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  5.71k|    do { \
  |  |  657|  5.71k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.71k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.71k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  5.71k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.71k]
  |  |  ------------------
  ------------------
  191|  5.71k|        ncount = igraph_vector_int_size(&neighbors);
  192|  16.7k|        for (i = 0; i < ncount; ++i) {
  ------------------
  |  Branch (192:21): [True: 11.0k, False: 5.71k]
  ------------------
  193|  11.0k|            igraph_int_t v = VECTOR(neighbors)[i];
  ------------------
  |  |   60|  11.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  194|  11.0k|            if (! IGRAPH_BIT_TEST(visited, v)) {
  ------------------
  |  |  142|  11.0k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  11.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  11.0k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  11.0k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  11.0k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  11.0k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (194:17): [True: 5.51k, False: 5.51k]
  ------------------
  195|  5.51k|                IGRAPH_CHECK(igraph_stack_int_push(&stack, v));
  ------------------
  |  |  656|  5.51k|    do { \
  |  |  657|  5.51k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.51k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  5.51k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.51k]
  |  |  ------------------
  ------------------
  196|  5.51k|            }
  197|  11.0k|        }
  198|  5.71k|    }
  199|       |
  200|    206|    igraph_vector_int_destroy(&neighbors);
  201|    206|    igraph_stack_int_destroy(&stack);
  202|    206|    igraph_bitset_destroy(&visited);
  203|    206|    IGRAPH_FINALLY_CLEAN(3);
  204|       |
  205|    206|    return IGRAPH_SUCCESS;
  206|    206|}

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

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

