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

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

igraph_connected_components:
   85|  5.48k|) {
   86|  5.48k|    if (mode == IGRAPH_WEAK || !igraph_is_directed(graph)) {
  ------------------
  |  Branch (86:9): [True: 3.18k, False: 2.30k]
  |  Branch (86:32): [True: 0, False: 2.30k]
  ------------------
   87|  3.18k|        return igraph_i_connected_components_weak(graph, membership, csize, no);
   88|  3.18k|    } else if (mode == IGRAPH_STRONG) {
  ------------------
  |  Branch (88:16): [True: 2.30k, False: 0]
  ------------------
   89|  2.30k|        return igraph_i_connected_components_strong(graph, membership, csize, no);
   90|  2.30k|    }
   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_decompose:
  605|  2.30k|                     igraph_int_t maxcompno, igraph_int_t minelements) {
  606|  2.30k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (606:9): [True: 0, False: 2.30k]
  ------------------
  607|      0|        mode = IGRAPH_WEAK;
  608|      0|    }
  609|       |
  610|  2.30k|    switch (mode) {
  611|      0|    case IGRAPH_WEAK:
  ------------------
  |  Branch (611:5): [True: 0, False: 2.30k]
  ------------------
  612|      0|        return igraph_i_decompose_weak(graph, components, maxcompno, minelements);
  613|  2.30k|    case IGRAPH_STRONG:
  ------------------
  |  Branch (613:5): [True: 2.30k, False: 0]
  ------------------
  614|  2.30k|        return igraph_i_decompose_strong(graph, components, maxcompno, minelements);
  615|      0|    default:
  ------------------
  |  Branch (615:5): [True: 0, False: 2.30k]
  ------------------
  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.30k|    }
  618|  2.30k|}
igraph_subcomponent:
 1557|  2.30k|) {
 1558|       |
 1559|  2.30k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
 1560|  2.30k|    igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   56|  2.30k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
 1561|  2.30k|    igraph_bitset_t already_added;
 1562|  2.30k|    igraph_int_t i, vsize;
 1563|  2.30k|    igraph_vector_int_t tmp = IGRAPH_VECTOR_NULL;
  ------------------
  |  |   99|  2.30k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
 1564|       |
 1565|  2.30k|    if (vertex < 0 || vertex >= no_of_nodes) {
  ------------------
  |  Branch (1565:9): [True: 0, False: 2.30k]
  |  Branch (1565:23): [True: 0, False: 2.30k]
  ------------------
 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.30k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (1568:9): [True: 0, False: 2.30k]
  |  Branch (1568:31): [True: 0, False: 0]
  ------------------
 1569|      0|        mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1569:9): [True: 0, False: 0]
  ------------------
 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.30k|    igraph_vector_int_clear(res);
 1574|       |
 1575|  2.30k|    IGRAPH_BITSET_INIT_FINALLY(&already_added, no_of_nodes);
  ------------------
  |  |  259|  2.30k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  260|  2.30k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  261|  2.30k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (261:62): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
 1576|  2.30k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&tmp, 0);
  ------------------
  |  |  119|  2.30k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.30k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
 1577|  2.30k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  2.30k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.30k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
 1578|       |
 1579|  2.30k|    IGRAPH_CHECK(igraph_dqueue_int_push(&q, vertex));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
 1580|  2.30k|    IGRAPH_CHECK(igraph_vector_int_push_back(res, vertex));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
 1581|  2.30k|    IGRAPH_BIT_SET(already_added, vertex);
  ------------------
  |  |  103|  2.30k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  2.30k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  2.30k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  2.30k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  2.30k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  2.30k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1582|       |
 1583|  28.6k|    while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (1583:12): [True: 26.3k, False: 2.30k]
  ------------------
 1584|  26.3k|        igraph_int_t actnode = igraph_dqueue_int_pop(&q);
 1585|       |
 1586|  26.3k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  26.3k|    do { \
  |  |   47|  26.3k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 26.3k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  26.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 26.3k]
  |  |  ------------------
  ------------------
 1587|       |
 1588|  26.3k|        IGRAPH_CHECK(igraph_neighbors(graph, &tmp, actnode, mode, IGRAPH_NO_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  26.3k|    do { \
  |  |  657|  26.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  26.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  26.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 26.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|  26.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 26.3k]
  |  |  ------------------
  ------------------
 1589|  26.3k|        vsize = igraph_vector_int_size(&tmp);
 1590|  63.7k|        for (i = 0; i < vsize; i++) {
  ------------------
  |  Branch (1590:21): [True: 37.3k, False: 26.3k]
  ------------------
 1591|  37.3k|            igraph_int_t neighbor = VECTOR(tmp)[i];
  ------------------
  |  |   60|  37.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1592|       |
 1593|  37.3k|            if (IGRAPH_BIT_TEST(already_added, neighbor)) {
  ------------------
  |  |  142|  37.3k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  37.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  37.3k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  37.3k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  37.3k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  37.3k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (142:36): [True: 13.3k, False: 24.0k]
  |  |  ------------------
  ------------------
 1594|  13.3k|                continue;
 1595|  13.3k|            }
 1596|  24.0k|            IGRAPH_BIT_SET(already_added, neighbor);
  ------------------
  |  |  103|  24.0k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  24.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  24.0k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  24.0k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  24.0k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  24.0k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1597|  24.0k|            IGRAPH_CHECK(igraph_vector_int_push_back(res, neighbor));
  ------------------
  |  |  656|  24.0k|    do { \
  |  |  657|  24.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  24.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  24.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 24.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|  24.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 24.0k]
  |  |  ------------------
  ------------------
 1598|  24.0k|            IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  24.0k|    do { \
  |  |  657|  24.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  24.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  24.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 24.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|  24.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 24.0k]
  |  |  ------------------
  ------------------
 1599|  24.0k|        }
 1600|  26.3k|    }
 1601|       |
 1602|  2.30k|    igraph_dqueue_int_destroy(&q);
 1603|  2.30k|    igraph_vector_int_destroy(&tmp);
 1604|  2.30k|    igraph_bitset_destroy(&already_added);
 1605|  2.30k|    IGRAPH_FINALLY_CLEAN(3);
 1606|       |
 1607|  2.30k|    return IGRAPH_SUCCESS;
 1608|  2.30k|}
components.c:igraph_i_connected_components_weak:
   98|  3.18k|) {
   99|       |
  100|  3.18k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  101|  3.18k|    igraph_int_t no_of_components;
  102|  3.18k|    igraph_bitset_t already_added;
  103|  3.18k|    igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   56|  3.18k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
  104|  3.18k|    igraph_vector_int_t neis = IGRAPH_VECTOR_NULL;
  ------------------
  |  |   99|  3.18k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
  105|       |
  106|       |    /* Memory for result, csize is dynamically allocated */
  107|  3.18k|    if (membership) {
  ------------------
  |  Branch (107:9): [True: 0, False: 3.18k]
  ------------------
  108|      0|        IGRAPH_CHECK(igraph_vector_int_resize(membership, no_of_nodes));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  109|      0|    }
  110|  3.18k|    if (csize) {
  ------------------
  |  Branch (110:9): [True: 3.18k, False: 0]
  ------------------
  111|  3.18k|        igraph_vector_int_clear(csize);
  112|  3.18k|    }
  113|       |
  114|       |    /* Try to make use of cached information. */
  115|  3.18k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED) &&
  ------------------
  |  Branch (115:9): [True: 1.12k, False: 2.06k]
  ------------------
  116|  1.12k|        igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED)) {
  ------------------
  |  Branch (116:9): [True: 220, False: 903]
  ------------------
  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|    220|        if (membership) {
  ------------------
  |  Branch (121:13): [True: 0, False: 220]
  ------------------
  122|       |            /* All vertices are members of the same component,
  123|       |             * component number 0. */
  124|      0|            igraph_vector_int_null(membership);
  125|      0|        }
  126|    220|        if (csize) {
  ------------------
  |  Branch (126:13): [True: 220, False: 0]
  ------------------
  127|       |            /* The size of the single component is the same as the vertex count. */
  128|    220|            IGRAPH_CHECK(igraph_vector_int_push_back(csize, no_of_nodes));
  ------------------
  |  |  656|    220|    do { \
  |  |  657|    220|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    220|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    220|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 220]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    220|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 220]
  |  |  ------------------
  ------------------
  129|    220|        }
  130|    220|        if (no) {
  ------------------
  |  Branch (130:13): [True: 0, False: 220]
  ------------------
  131|       |            /* There is one component. */
  132|      0|            *no = 1;
  133|      0|        }
  134|    220|        return IGRAPH_SUCCESS;
  135|    220|    }
  136|       |
  137|  2.96k|    IGRAPH_BITSET_INIT_FINALLY(&already_added, no_of_nodes);
  ------------------
  |  |  259|  2.96k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  260|  2.96k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.96k|    do { \
  |  |  |  |  657|  2.96k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.96k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.96k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.96k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.96k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.96k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  261|  2.96k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.96k|    do { \
  |  |  |  |  604|  2.96k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.96k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.96k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.96k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.96k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.96k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.96k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.96k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (261:62): [Folded, False: 2.96k]
  |  |  ------------------
  ------------------
  138|  2.96k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, no_of_nodes > 100000 ? 10000 : no_of_nodes / 10);
  ------------------
  |  |   61|  2.96k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.96k|    do { \
  |  |  |  |  657|  5.93k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (657:40): [True: 0, False: 2.96k]
  |  |  |  |  ------------------
  |  |  |  |  658|  2.96k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.96k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.96k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.96k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.96k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.96k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.96k|    do { \
  |  |  |  |  604|  2.96k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.96k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.96k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.96k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.96k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.96k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.96k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.96k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.96k]
  |  |  ------------------
  ------------------
  139|  2.96k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  119|  2.96k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.96k|    do { \
  |  |  |  |  657|  2.96k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.96k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.96k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.96k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.96k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.96k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.96k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.96k|    do { \
  |  |  |  |  604|  2.96k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.96k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.96k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.96k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.96k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.96k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.96k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.96k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.96k]
  |  |  ------------------
  ------------------
  140|       |
  141|       |    /* The algorithm */
  142|       |
  143|  2.96k|    no_of_components = 0;
  144|   526k|    for (igraph_int_t first_node = 0; first_node < no_of_nodes; ++first_node) {
  ------------------
  |  Branch (144:39): [True: 523k, False: 2.96k]
  ------------------
  145|   523k|        igraph_int_t act_component_size;
  146|       |
  147|   523k|        if (IGRAPH_BIT_TEST(already_added, first_node)) {
  ------------------
  |  |  142|   523k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   523k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|   523k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   523k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|   523k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   523k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (142:36): [True: 57.2k, False: 465k]
  |  |  ------------------
  ------------------
  148|  57.2k|            continue;
  149|  57.2k|        }
  150|   465k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   465k|    do { \
  |  |   47|   465k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 465k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   465k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 465k]
  |  |  ------------------
  ------------------
  151|       |
  152|   465k|        IGRAPH_BIT_SET(already_added, first_node);
  ------------------
  |  |  103|   465k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   465k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|   465k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   465k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|   465k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   465k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  153|   465k|        act_component_size = 1;
  154|   465k|        if (membership) {
  ------------------
  |  Branch (154:13): [True: 0, False: 465k]
  ------------------
  155|      0|            VECTOR(*membership)[first_node] = no_of_components;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  156|      0|        }
  157|   465k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, first_node));
  ------------------
  |  |  656|   465k|    do { \
  |  |  657|   465k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   465k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   465k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 465k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   465k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 465k]
  |  |  ------------------
  ------------------
  158|       |
  159|   989k|        while ( !igraph_dqueue_int_empty(&q) ) {
  ------------------
  |  Branch (159:17): [True: 523k, False: 465k]
  ------------------
  160|   523k|            igraph_int_t act_node = igraph_dqueue_int_pop(&q);
  161|   523k|            IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|   523k|    do { \
  |  |  657|   523k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   523k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   523k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 523k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   523k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 523k]
  |  |  ------------------
  ------------------
  162|   523k|                graph, &neis, act_node, IGRAPH_ALL, IGRAPH_NO_LOOPS, IGRAPH_MULTIPLE
  163|   523k|            ));
  164|   523k|            igraph_int_t nei_count = igraph_vector_int_size(&neis);
  165|   685k|            for (igraph_int_t i = 0; i < nei_count; i++) {
  ------------------
  |  Branch (165:38): [True: 162k, False: 523k]
  ------------------
  166|   162k|                igraph_int_t neighbor = VECTOR(neis)[i];
  ------------------
  |  |   60|   162k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  167|   162k|                if (IGRAPH_BIT_TEST(already_added, neighbor)) {
  ------------------
  |  |  142|   162k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   162k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|   162k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   162k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|   162k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   162k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (142:36): [True: 104k, False: 57.2k]
  |  |  ------------------
  ------------------
  168|   104k|                    continue;
  169|   104k|                }
  170|  57.2k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  57.2k|    do { \
  |  |  657|  57.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  57.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  57.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 57.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|  57.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 57.2k]
  |  |  ------------------
  ------------------
  171|  57.2k|                IGRAPH_BIT_SET(already_added, neighbor);
  ------------------
  |  |  103|  57.2k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  57.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  57.2k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  57.2k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  57.2k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  57.2k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  172|  57.2k|                act_component_size++;
  173|  57.2k|                if (membership) {
  ------------------
  |  Branch (173:21): [True: 0, False: 57.2k]
  ------------------
  174|      0|                    VECTOR(*membership)[neighbor] = no_of_components;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  175|      0|                }
  176|  57.2k|            }
  177|   523k|        }
  178|       |
  179|   465k|        no_of_components++;
  180|   465k|        if (csize) {
  ------------------
  |  Branch (180:13): [True: 465k, False: 0]
  ------------------
  181|   465k|            IGRAPH_CHECK(igraph_vector_int_push_back(csize, act_component_size));
  ------------------
  |  |  656|   465k|    do { \
  |  |  657|   465k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   465k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   465k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 465k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   465k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 465k]
  |  |  ------------------
  ------------------
  182|   465k|        }
  183|   465k|    }
  184|       |
  185|       |    /* Cleaning up */
  186|       |
  187|  2.96k|    if (no) {
  ------------------
  |  Branch (187:9): [True: 0, False: 2.96k]
  ------------------
  188|      0|        *no = no_of_components;
  189|      0|    }
  190|       |
  191|       |    /* Clean up */
  192|  2.96k|    igraph_bitset_destroy(&already_added);
  193|  2.96k|    igraph_dqueue_int_destroy(&q);
  194|  2.96k|    igraph_vector_int_destroy(&neis);
  195|  2.96k|    IGRAPH_FINALLY_CLEAN(3);
  196|       |
  197|       |    /* Update cache */
  198|  2.96k|    igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED, no_of_components == 1);
  199|       |
  200|  2.96k|    return IGRAPH_SUCCESS;
  201|  2.96k|}
components.c:igraph_i_connected_components_strong:
  206|  2.30k|) {
  207|  2.30k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  208|  2.30k|    igraph_vector_int_t next_nei = IGRAPH_VECTOR_NULL;
  ------------------
  |  |   99|  2.30k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
  209|  2.30k|    igraph_int_t num_seen;
  210|  2.30k|    igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   56|  2.30k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
  211|  2.30k|    igraph_int_t no_of_components = 0;
  212|  2.30k|    igraph_vector_int_t out = IGRAPH_VECTOR_NULL;
  ------------------
  |  |   99|  2.30k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
  213|  2.30k|    igraph_adjlist_t adjlist;
  214|       |
  215|       |    /* Memory for result, csize is dynamically allocated */
  216|  2.30k|    if (membership) {
  ------------------
  |  Branch (216:9): [True: 2.30k, False: 0]
  ------------------
  217|  2.30k|        IGRAPH_CHECK(igraph_vector_int_resize(membership, no_of_nodes));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  218|  2.30k|    }
  219|  2.30k|    if (csize) {
  ------------------
  |  Branch (219:9): [True: 2.30k, False: 0]
  ------------------
  220|  2.30k|        igraph_vector_int_clear(csize);
  221|  2.30k|    }
  222|       |
  223|       |    /* Try to make use of cached information. */
  224|  2.30k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_IS_STRONGLY_CONNECTED) &&
  ------------------
  |  Branch (224:9): [True: 0, False: 2.30k]
  ------------------
  225|      0|        igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_IS_STRONGLY_CONNECTED)) {
  ------------------
  |  Branch (225:9): [True: 0, False: 0]
  ------------------
  226|       |        /* If we know that the graph is strongly connected from the cache,
  227|       |         * we can return the result right away. We keep in mind that
  228|       |         * the null graph is considered disconnected, therefore any connected
  229|       |         * graph has precisely one component. */
  230|      0|        if (membership) {
  ------------------
  |  Branch (230:13): [True: 0, False: 0]
  ------------------
  231|       |            /* All vertices are members of the same component,
  232|       |             * component number 0. */
  233|      0|            igraph_vector_int_null(membership);
  234|      0|        }
  235|      0|        if (csize) {
  ------------------
  |  Branch (235:13): [True: 0, False: 0]
  ------------------
  236|       |            /* The size of the single component is the same as the vertex count. */
  237|      0|            IGRAPH_CHECK(igraph_vector_int_push_back(csize, no_of_nodes));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  238|      0|        }
  239|      0|        if (no) {
  ------------------
  |  Branch (239:13): [True: 0, False: 0]
  ------------------
  240|       |            /* There is one component. */
  241|      0|            *no = 1;
  242|      0|        }
  243|      0|        return IGRAPH_SUCCESS;
  244|      0|    }
  245|       |
  246|       |    /* The result */
  247|       |
  248|  2.30k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&next_nei, no_of_nodes);
  ------------------
  |  |  119|  2.30k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.30k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  249|  2.30k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&out, 0);
  ------------------
  |  |  119|  2.30k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.30k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  250|  2.30k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  2.30k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.30k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  251|       |
  252|  2.30k|    IGRAPH_CHECK(igraph_vector_int_reserve(&out, no_of_nodes));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  253|       |
  254|  2.30k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, IGRAPH_OUT, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  255|  2.30k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  2.30k|    do { \
  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  ------------------
  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  256|       |
  257|  2.30k|    num_seen = 0;
  258|   392k|    for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (258:30): [True: 390k, False: 2.30k]
  ------------------
  259|   390k|        const igraph_vector_int_t *tmp;
  260|       |
  261|   390k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   390k|    do { \
  |  |   47|   390k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 390k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   390k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 390k]
  |  |  ------------------
  ------------------
  262|       |
  263|   390k|        tmp = igraph_adjlist_get(&adjlist, i);
  ------------------
  |  |   73|   390k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  264|   390k|        if (VECTOR(next_nei)[i] > igraph_vector_int_size(tmp)) {
  ------------------
  |  |   60|   390k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (264:13): [True: 34.8k, False: 355k]
  ------------------
  265|  34.8k|            continue;
  266|  34.8k|        }
  267|       |
  268|   355k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, i));
  ------------------
  |  |  656|   355k|    do { \
  |  |  657|   355k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   355k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   355k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 355k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   355k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 355k]
  |  |  ------------------
  ------------------
  269|  1.22M|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (269:16): [True: 864k, False: 355k]
  ------------------
  270|   864k|            igraph_int_t act_node = igraph_dqueue_int_back(&q);
  271|   864k|            tmp = igraph_adjlist_get(&adjlist, act_node);
  ------------------
  |  |   73|   864k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  272|   864k|            if (VECTOR(next_nei)[act_node] == 0) {
  ------------------
  |  |   60|   864k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (272:17): [True: 390k, False: 474k]
  ------------------
  273|       |                /* this is the first time we've met this vertex */
  274|   390k|                VECTOR(next_nei)[act_node]++;
  ------------------
  |  |   60|   390k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  275|   474k|            } else if (VECTOR(next_nei)[act_node] <= igraph_vector_int_size(tmp)) {
  ------------------
  |  |   60|   474k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (275:24): [True: 83.9k, False: 390k]
  ------------------
  276|       |                /* we've already met this vertex but it has more children */
  277|  83.9k|                igraph_int_t neighbor = VECTOR(*tmp)[VECTOR(next_nei)[act_node] - 1];
  ------------------
  |  |   60|  83.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_int_t neighbor = VECTOR(*tmp)[VECTOR(next_nei)[act_node] - 1];
  ------------------
  |  |   60|  83.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  278|  83.9k|                if (VECTOR(next_nei)[neighbor] == 0) {
  ------------------
  |  |   60|  83.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (278:21): [True: 34.8k, False: 49.0k]
  ------------------
  279|  34.8k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  280|  34.8k|                }
  281|  83.9k|                VECTOR(next_nei)[act_node]++;
  ------------------
  |  |   60|  83.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  282|   390k|            } else {
  283|       |                /* we've met this vertex and it has no more children */
  284|   390k|                IGRAPH_CHECK(igraph_vector_int_push_back(&out, act_node));
  ------------------
  |  |  656|   390k|    do { \
  |  |  657|   390k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   390k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   390k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 390k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   390k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 390k]
  |  |  ------------------
  ------------------
  285|   390k|                igraph_dqueue_int_pop_back(&q);
  286|   390k|                num_seen++;
  287|       |
  288|   390k|                if (num_seen % 10000 == 0) {
  ------------------
  |  Branch (288:21): [True: 0, False: 390k]
  ------------------
  289|       |                    /* time to report progress and allow the user to interrupt */
  290|      0|                    IGRAPH_PROGRESS("Strongly connected components: ",
  ------------------
  |  |  169|      0|    do { \
  |  |  170|      0|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  291|      0|                                    num_seen * 50.0 / no_of_nodes, NULL);
  292|      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]
  |  |  ------------------
  ------------------
  293|      0|                }
  294|   390k|            }
  295|   864k|        } /* while q */
  296|   355k|    }  /* for */
  297|       |
  298|  2.30k|    IGRAPH_PROGRESS("Strongly connected components: ", 50.0, NULL);
  ------------------
  |  |  169|  2.30k|    do { \
  |  |  170|  2.30k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  299|       |
  300|  2.30k|    igraph_adjlist_destroy(&adjlist);
  301|  2.30k|    IGRAPH_FINALLY_CLEAN(1);
  302|       |
  303|  2.30k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, IGRAPH_IN, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  304|  2.30k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  2.30k|    do { \
  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  ------------------
  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  305|       |
  306|       |    /* OK, we've the 'out' values for the nodes, let's use them in
  307|       |       decreasing order with the help of a heap */
  308|       |
  309|  2.30k|    igraph_vector_int_null(&next_nei);             /* mark already added vertices */
  310|  2.30k|    num_seen = 0;
  311|       |
  312|   392k|    while (!igraph_vector_int_empty(&out)) {
  ------------------
  |  Branch (312:12): [True: 390k, False: 2.30k]
  ------------------
  313|   390k|        igraph_int_t act_component_size;
  314|   390k|        igraph_int_t grandfather = igraph_vector_int_pop_back(&out);
  315|       |
  316|   390k|        if (VECTOR(next_nei)[grandfather] != 0) {
  ------------------
  |  |   60|   390k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (316:13): [True: 22.0k, False: 368k]
  ------------------
  317|  22.0k|            continue;
  318|  22.0k|        }
  319|   368k|        VECTOR(next_nei)[grandfather] = 1;
  ------------------
  |  |   60|   368k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  320|   368k|        act_component_size = 1;
  321|   368k|        if (membership) {
  ------------------
  |  Branch (321:13): [True: 368k, False: 0]
  ------------------
  322|   368k|            VECTOR(*membership)[grandfather] = no_of_components;
  ------------------
  |  |   60|   368k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  323|   368k|        }
  324|   368k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, grandfather));
  ------------------
  |  |  656|   368k|    do { \
  |  |  657|   368k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   368k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   368k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 368k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   368k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 368k]
  |  |  ------------------
  ------------------
  325|       |
  326|   368k|        num_seen++;
  327|   368k|        if (num_seen % 10000 == 0) {
  ------------------
  |  Branch (327:13): [True: 0, False: 368k]
  ------------------
  328|       |            /* time to report progress and allow the user to interrupt */
  329|      0|            IGRAPH_PROGRESS("Strongly connected components: ",
  ------------------
  |  |  169|      0|    do { \
  |  |  170|      0|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  330|      0|                            50.0 + num_seen * 50.0 / no_of_nodes, NULL);
  331|      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]
  |  |  ------------------
  ------------------
  332|      0|        }
  333|       |
  334|   758k|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (334:16): [True: 390k, False: 368k]
  ------------------
  335|   390k|            igraph_int_t act_node = igraph_dqueue_int_pop_back(&q);
  336|   390k|            const igraph_vector_int_t *tmp = igraph_adjlist_get(&adjlist, act_node);
  ------------------
  |  |   73|   390k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  337|   390k|            const igraph_int_t n = igraph_vector_int_size(tmp);
  338|   474k|            for (igraph_int_t i = 0; i < n; i++) {
  ------------------
  |  Branch (338:38): [True: 83.9k, False: 390k]
  ------------------
  339|  83.9k|                igraph_int_t neighbor = VECTOR(*tmp)[i];
  ------------------
  |  |   60|  83.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  340|  83.9k|                if (VECTOR(next_nei)[neighbor] != 0) {
  ------------------
  |  |   60|  83.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (340:21): [True: 61.8k, False: 22.0k]
  ------------------
  341|  61.8k|                    continue;
  342|  61.8k|                }
  343|  22.0k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  344|  22.0k|                VECTOR(next_nei)[neighbor] = 1;
  ------------------
  |  |   60|  22.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  345|  22.0k|                act_component_size++;
  346|  22.0k|                if (membership) {
  ------------------
  |  Branch (346:21): [True: 22.0k, False: 0]
  ------------------
  347|  22.0k|                    VECTOR(*membership)[neighbor] = no_of_components;
  ------------------
  |  |   60|  22.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  348|  22.0k|                }
  349|       |
  350|  22.0k|                num_seen++;
  351|  22.0k|                if (num_seen % 10000 == 0) {
  ------------------
  |  Branch (351:21): [True: 0, False: 22.0k]
  ------------------
  352|       |                    /* time to report progress and allow the user to interrupt */
  353|      0|                    IGRAPH_PROGRESS("Strongly connected components: ",
  ------------------
  |  |  169|      0|    do { \
  |  |  170|      0|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  354|      0|                                    50.0 + num_seen * 50.0 / no_of_nodes, NULL);
  355|      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]
  |  |  ------------------
  ------------------
  356|      0|                }
  357|  22.0k|            }
  358|   390k|        }
  359|       |
  360|   368k|        no_of_components++;
  361|   368k|        if (csize) {
  ------------------
  |  Branch (361:13): [True: 368k, False: 0]
  ------------------
  362|   368k|            IGRAPH_CHECK(igraph_vector_int_push_back(csize, act_component_size));
  ------------------
  |  |  656|   368k|    do { \
  |  |  657|   368k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   368k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   368k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 368k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   368k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 368k]
  |  |  ------------------
  ------------------
  363|   368k|        }
  364|   368k|    }
  365|       |
  366|  2.30k|    IGRAPH_PROGRESS("Strongly connected components: ", 100.0, NULL);
  ------------------
  |  |  169|  2.30k|    do { \
  |  |  170|  2.30k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  367|       |
  368|  2.30k|    if (no) {
  ------------------
  |  Branch (368:9): [True: 2.30k, False: 0]
  ------------------
  369|  2.30k|        *no = no_of_components;
  370|  2.30k|    }
  371|       |
  372|       |    /* Clean up */
  373|  2.30k|    igraph_adjlist_destroy(&adjlist);
  374|  2.30k|    igraph_vector_int_destroy(&out);
  375|  2.30k|    igraph_dqueue_int_destroy(&q);
  376|  2.30k|    igraph_vector_int_destroy(&next_nei);
  377|  2.30k|    IGRAPH_FINALLY_CLEAN(4);
  378|       |
  379|       |    /* Update cache */
  380|  2.30k|    igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_STRONGLY_CONNECTED, no_of_components == 1);
  381|  2.30k|    if (no_of_components == 1) {
  ------------------
  |  Branch (381:9): [True: 113, False: 2.18k]
  ------------------
  382|    113|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED, true);
  383|    113|    }
  384|       |
  385|  2.30k|    return IGRAPH_SUCCESS;
  386|  2.30k|}
components.c:igraph_i_decompose_strong:
  727|  2.30k|                                     igraph_int_t maxcompno, igraph_int_t minelements) {
  728|       |
  729|       |
  730|  2.30k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  731|       |
  732|       |    /* this is a heap used twice for checking what nodes have
  733|       |     * been counted already */
  734|  2.30k|    igraph_vector_int_t next_nei = IGRAPH_VECTOR_NULL;
  ------------------
  |  |   99|  2.30k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
  735|       |
  736|  2.30k|    igraph_int_t i, n, num_seen;
  737|  2.30k|    igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   56|  2.30k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
  738|       |
  739|  2.30k|    igraph_int_t no_of_components = 0;
  740|       |
  741|  2.30k|    igraph_vector_int_t out = IGRAPH_VECTOR_NULL;
  ------------------
  |  |   99|  2.30k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
  742|  2.30k|    const igraph_vector_int_t* tmp;
  743|       |
  744|  2.30k|    igraph_adjlist_t adjlist;
  745|  2.30k|    igraph_vector_int_t verts;
  746|  2.30k|    igraph_vector_int_t vids_old2new;
  747|  2.30k|    igraph_t newg;
  748|       |
  749|  2.30k|    if (maxcompno < 0) {
  ------------------
  |  Branch (749:9): [True: 0, False: 2.30k]
  ------------------
  750|      0|        maxcompno = IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  751|      0|    }
  752|       |
  753|  2.30k|    igraph_graph_list_clear(components);
  754|       |
  755|       |    /* The result */
  756|       |
  757|  2.30k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&vids_old2new, no_of_nodes);
  ------------------
  |  |  119|  2.30k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.30k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  758|  2.30k|    igraph_vector_int_fill(&vids_old2new, -1);
  759|       |
  760|  2.30k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&verts, 0);
  ------------------
  |  |  119|  2.30k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.30k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  761|  2.30k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&next_nei, no_of_nodes);
  ------------------
  |  |  119|  2.30k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.30k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  762|  2.30k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&out, 0);
  ------------------
  |  |  119|  2.30k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.30k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  763|  2.30k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  2.30k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.30k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  764|       |
  765|  2.30k|    IGRAPH_CHECK(igraph_vector_int_reserve(&out, no_of_nodes));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  766|       |
  767|  2.30k|    igraph_vector_int_null(&out);
  768|       |
  769|  2.30k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, IGRAPH_OUT, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  770|  2.30k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  2.30k|    do { \
  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  ------------------
  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  771|       |
  772|       |    /* vids_old2new would have been created internally in igraph_induced_subgraph(),
  773|       |       but it is slow if the graph is large and consists of many small components,
  774|       |       so we create it once here and then re-use it */
  775|       |
  776|       |    /* number of components seen */
  777|  2.30k|    num_seen = 0;
  778|       |    /* populate the 'out' vector by browsing a node and following up
  779|       |       all its neighbors recursively, then switching to the next
  780|       |       unassigned node */
  781|   392k|    for (i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (781:17): [True: 390k, False: 2.30k]
  ------------------
  782|   390k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   390k|    do { \
  |  |   47|   390k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 390k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   390k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 390k]
  |  |  ------------------
  ------------------
  783|       |
  784|       |        /* get all the 'out' neighbors of this node
  785|       |         * NOTE: next_nei is initialized [0, 0, ...] */
  786|   390k|        tmp = igraph_adjlist_get(&adjlist, i);
  ------------------
  |  |   73|   390k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  787|   390k|        if (VECTOR(next_nei)[i] > igraph_vector_int_size(tmp)) {
  ------------------
  |  |   60|   390k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (787:13): [True: 35.0k, False: 355k]
  ------------------
  788|  35.0k|            continue;
  789|  35.0k|        }
  790|       |
  791|       |        /* add this node to the queue for this component */
  792|   355k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, i));
  ------------------
  |  |  656|   355k|    do { \
  |  |  657|   355k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   355k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   355k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 355k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   355k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 355k]
  |  |  ------------------
  ------------------
  793|       |
  794|       |        /* consume the tree from this node ("root") recursively
  795|       |         * until there is no more */
  796|  1.21M|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (796:16): [True: 864k, False: 355k]
  ------------------
  797|       |            /* this looks up but does NOT consume the queue */
  798|   864k|            igraph_int_t act_node = igraph_dqueue_int_back(&q);
  799|       |
  800|       |            /* get all neighbors of this node */
  801|   864k|            tmp = igraph_adjlist_get(&adjlist, act_node);
  ------------------
  |  |   73|   864k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  802|   864k|            if (VECTOR(next_nei)[act_node] == 0) {
  ------------------
  |  |   60|   864k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (802:17): [True: 390k, False: 474k]
  ------------------
  803|       |                /* this is the first time we've met this vertex,
  804|       |                     * because next_nei is initialized [0, 0, ...] */
  805|   390k|                VECTOR(next_nei)[act_node]++;
  ------------------
  |  |   60|   390k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  806|       |                /* back to the queue, same vertex is up again */
  807|       |
  808|   474k|            } else if (VECTOR(next_nei)[act_node] <= igraph_vector_int_size(tmp)) {
  ------------------
  |  |   60|   474k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (808:24): [True: 83.9k, False: 390k]
  ------------------
  809|       |                /* we've already met this vertex but it has more children */
  810|  83.9k|                igraph_int_t neighbor = VECTOR(*tmp)[VECTOR(next_nei)[act_node] - 1];
  ------------------
  |  |   60|  83.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_int_t neighbor = VECTOR(*tmp)[VECTOR(next_nei)[act_node] - 1];
  ------------------
  |  |   60|  83.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  811|  83.9k|                if (VECTOR(next_nei)[neighbor] == 0) {
  ------------------
  |  |   60|  83.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (811:21): [True: 35.0k, False: 48.8k]
  ------------------
  812|       |                    /* add the root of the other children to the queue */
  813|  35.0k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  35.0k|    do { \
  |  |  657|  35.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  35.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  35.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 35.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|  35.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 35.0k]
  |  |  ------------------
  ------------------
  814|  35.0k|                }
  815|  83.9k|                VECTOR(next_nei)[act_node]++;
  ------------------
  |  |   60|  83.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  816|   390k|            } else {
  817|       |                /* we've met this vertex and it has no more children */
  818|   390k|                IGRAPH_CHECK(igraph_vector_int_push_back(&out, act_node));
  ------------------
  |  |  656|   390k|    do { \
  |  |  657|   390k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   390k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   390k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 390k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   390k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 390k]
  |  |  ------------------
  ------------------
  819|       |                /* this consumes the queue, since there's nowhere to go */
  820|   390k|                igraph_dqueue_int_pop_back(&q);
  821|   390k|                num_seen++;
  822|       |
  823|   390k|                if (num_seen % 10000 == 0) {
  ------------------
  |  Branch (823:21): [True: 0, False: 390k]
  ------------------
  824|       |                    /* time to report progress and allow the user to interrupt */
  825|      0|                    IGRAPH_PROGRESS("Strongly connected components: ",
  ------------------
  |  |  169|      0|    do { \
  |  |  170|      0|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  826|      0|                                    num_seen * 50.0 / no_of_nodes, NULL);
  827|      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]
  |  |  ------------------
  ------------------
  828|      0|                }
  829|   390k|            }
  830|   864k|        } /* while q */
  831|   355k|    }  /* for */
  832|       |
  833|  2.30k|    IGRAPH_PROGRESS("Strongly connected components: ", 50.0, NULL);
  ------------------
  |  |  169|  2.30k|    do { \
  |  |  170|  2.30k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  834|       |
  835|  2.30k|    igraph_adjlist_destroy(&adjlist);
  836|  2.30k|    IGRAPH_FINALLY_CLEAN(1);
  837|       |
  838|  2.30k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, IGRAPH_IN, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  839|  2.30k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  2.30k|    do { \
  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  ------------------
  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  840|       |
  841|       |    /* OK, we've the 'out' values for the nodes, let's use them in
  842|       |     * decreasing order with the help of the next_nei heap */
  843|       |
  844|  2.30k|    igraph_vector_int_null(&next_nei);             /* mark already added vertices */
  845|       |
  846|       |    /* number of components built */
  847|  2.30k|    num_seen = 0;
  848|   392k|    while (!igraph_vector_int_empty(&out) && no_of_components < maxcompno) {
  ------------------
  |  Branch (848:12): [True: 390k, False: 2.30k]
  |  Branch (848:46): [True: 390k, False: 0]
  ------------------
  849|       |        /* consume the vector from the last element */
  850|   390k|        igraph_int_t grandfather = igraph_vector_int_pop_back(&out);
  851|       |
  852|       |        /* been here, done that
  853|       |         * NOTE: next_nei is initialized as [0, 0, ...] */
  854|   390k|        if (VECTOR(next_nei)[grandfather] != 0) {
  ------------------
  |  |   60|   390k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (854:13): [True: 22.0k, False: 368k]
  ------------------
  855|  22.0k|            continue;
  856|  22.0k|        }
  857|       |
  858|       |        /* collect all the members of this component */
  859|   368k|        igraph_vector_int_clear(&verts);
  860|       |
  861|       |        /* this node is gone for any future components */
  862|   368k|        VECTOR(next_nei)[grandfather] = 1;
  ------------------
  |  |   60|   368k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  863|       |
  864|       |        /* add to component */
  865|   368k|        IGRAPH_CHECK(igraph_vector_int_push_back(&verts, grandfather));
  ------------------
  |  |  656|   368k|    do { \
  |  |  657|   368k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   368k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   368k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 368k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   368k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 368k]
  |  |  ------------------
  ------------------
  866|   368k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, grandfather));
  ------------------
  |  |  656|   368k|    do { \
  |  |  657|   368k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   368k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   368k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 368k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   368k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 368k]
  |  |  ------------------
  ------------------
  867|       |
  868|   368k|        num_seen++;
  869|   368k|        if (num_seen % 10000 == 0) {
  ------------------
  |  Branch (869:13): [True: 0, False: 368k]
  ------------------
  870|       |            /* time to report progress and allow the user to interrupt */
  871|      0|            IGRAPH_PROGRESS("Strongly connected components: ",
  ------------------
  |  |  169|      0|    do { \
  |  |  170|      0|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  872|      0|                            50.0 + num_seen * 50.0 / no_of_nodes, NULL);
  873|      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]
  |  |  ------------------
  ------------------
  874|      0|        }
  875|       |
  876|   758k|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (876:16): [True: 390k, False: 368k]
  ------------------
  877|       |            /* consume the queue from this node */
  878|   390k|            igraph_int_t act_node = igraph_dqueue_int_pop_back(&q);
  879|   390k|            tmp = igraph_adjlist_get(&adjlist, act_node);
  ------------------
  |  |   73|   390k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  880|   390k|            n = igraph_vector_int_size(tmp);
  881|   474k|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (881:25): [True: 83.9k, False: 390k]
  ------------------
  882|  83.9k|                igraph_int_t neighbor = VECTOR(*tmp)[i];
  ------------------
  |  |   60|  83.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  883|  83.9k|                if (VECTOR(next_nei)[neighbor] != 0) {
  ------------------
  |  |   60|  83.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (883:21): [True: 61.8k, False: 22.0k]
  ------------------
  884|  61.8k|                    continue;
  885|  61.8k|                }
  886|  22.0k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  887|  22.0k|                VECTOR(next_nei)[neighbor] = 1;
  ------------------
  |  |   60|  22.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  888|       |
  889|       |                /* add to component */
  890|  22.0k|                IGRAPH_CHECK(igraph_vector_int_push_back(&verts, neighbor));
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  891|       |
  892|  22.0k|                num_seen++;
  893|  22.0k|                if (num_seen % 10000 == 0) {
  ------------------
  |  Branch (893:21): [True: 0, False: 22.0k]
  ------------------
  894|       |                    /* time to report progress and allow the user to interrupt */
  895|      0|                    IGRAPH_PROGRESS("Strongly connected components: ",
  ------------------
  |  |  169|      0|    do { \
  |  |  170|      0|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  896|      0|                                    50.0 + num_seen * 50.0 / no_of_nodes, NULL);
  897|      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]
  |  |  ------------------
  ------------------
  898|      0|                }
  899|  22.0k|            }
  900|   390k|        }
  901|       |
  902|       |        /* ok, we have a component */
  903|   368k|        if (igraph_vector_int_size(&verts) < minelements) {
  ------------------
  |  Branch (903:13): [True: 367k, False: 686]
  ------------------
  904|   367k|            continue;
  905|   367k|        }
  906|       |
  907|    686|        IGRAPH_CHECK(igraph_i_induced_subgraph_map(
  ------------------
  |  |  656|    686|    do { \
  |  |  657|    686|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    686|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    686|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 686]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    686|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 686]
  |  |  ------------------
  ------------------
  908|    686|            graph, &newg, igraph_vss_vector(&verts),
  909|    686|            IGRAPH_SUBGRAPH_AUTO, &vids_old2new,
  910|    686|            /* invmap = */ 0, /* map_is_prepared = */ 1
  911|    686|        ));
  912|    686|        IGRAPH_FINALLY(igraph_destroy, &newg);
  ------------------
  |  |  603|    686|    do { \
  |  |  604|    686|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    686|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    686|         * incorrect destructor function with the pointer */ \
  |  |  607|    686|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 686]
  |  |  ------------------
  |  |  608|    686|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    686|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 686]
  |  |  ------------------
  ------------------
  913|    686|        IGRAPH_CHECK(igraph_graph_list_push_back(components, &newg));
  ------------------
  |  |  656|    686|    do { \
  |  |  657|    686|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    686|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    686|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 686]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    686|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 686]
  |  |  ------------------
  ------------------
  914|    686|        IGRAPH_FINALLY_CLEAN(1);  /* ownership of newg now taken by 'components' */
  915|       |
  916|       |        /* vids_old2new has to be cleaned up here because a vertex may appear
  917|       |         * in multiple strongly connected components. Simply calling
  918|       |         * igraph_vector_int_fill() would be an O(n) operation where n is the number
  919|       |         * of vertices in the large graph so we cannot do that; we have to
  920|       |         * iterate over 'verts' instead */
  921|    686|        n = igraph_vector_int_size(&verts);
  922|  22.8k|        for (i = 0; i < n; i++) {
  ------------------
  |  Branch (922:21): [True: 22.1k, False: 686]
  ------------------
  923|  22.1k|            VECTOR(vids_old2new)[VECTOR(verts)[i]] = 0;
  ------------------
  |  |   60|  22.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(vids_old2new)[VECTOR(verts)[i]] = 0;
  ------------------
  |  |   60|  22.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  924|  22.1k|        }
  925|       |
  926|    686|        no_of_components++;
  927|    686|    }
  928|       |
  929|  2.30k|    IGRAPH_PROGRESS("Strongly connected components: ", 100.0, NULL);
  ------------------
  |  |  169|  2.30k|    do { \
  |  |  170|  2.30k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  930|       |
  931|       |    /* Clean up, return */
  932|       |
  933|  2.30k|    igraph_vector_int_destroy(&vids_old2new);
  934|  2.30k|    igraph_vector_int_destroy(&verts);
  935|  2.30k|    igraph_adjlist_destroy(&adjlist);
  936|  2.30k|    igraph_vector_int_destroy(&out);
  937|  2.30k|    igraph_dqueue_int_destroy(&q);
  938|  2.30k|    igraph_vector_int_destroy(&next_nei);
  939|  2.30k|    IGRAPH_FINALLY_CLEAN(6);
  940|       |
  941|  2.30k|    return IGRAPH_SUCCESS;
  942|       |
  943|  2.30k|}

igraph_create:
   54|  23.1k|                             igraph_int_t n, igraph_bool_t directed) {
   55|  23.1k|    igraph_bool_t has_edges = igraph_vector_int_size(edges) > 0;
   56|  23.1k|    igraph_int_t max;
   57|       |
   58|  23.1k|    if (igraph_vector_int_size(edges) % 2 != 0) {
  ------------------
  |  Branch (58:9): [True: 0, False: 23.1k]
  ------------------
   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|  23.1k|    if (!igraph_vector_int_isininterval(edges, 0, IGRAPH_VCOUNT_MAX-1)) {
  ------------------
  |  |  100|  23.1k|#define IGRAPH_VCOUNT_MAX (IGRAPH_INTEGER_MAX-1)
  |  |  ------------------
  |  |  |  |   72|  23.1k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  |  |  ------------------
  ------------------
  |  Branch (61:9): [True: 0, False: 23.1k]
  ------------------
   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|  23.1k|    max = has_edges ? igraph_vector_int_max(edges) + 1 : 0;
  ------------------
  |  Branch (67:11): [True: 20.8k, False: 2.32k]
  ------------------
   68|       |
   69|  23.1k|    IGRAPH_CHECK(igraph_empty(graph, n, directed));
  ------------------
  |  |  656|  23.1k|    do { \
  |  |  657|  23.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  23.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  23.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.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|  23.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 23.1k]
  |  |  ------------------
  ------------------
   70|  23.1k|    IGRAPH_FINALLY(igraph_destroy, graph);
  ------------------
  |  |  603|  23.1k|    do { \
  |  |  604|  23.1k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  23.1k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  23.1k|         * incorrect destructor function with the pointer */ \
  |  |  607|  23.1k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 23.1k]
  |  |  ------------------
  |  |  608|  23.1k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  23.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 23.1k]
  |  |  ------------------
  ------------------
   71|  23.1k|    if (has_edges) {
  ------------------
  |  Branch (71:9): [True: 20.8k, False: 2.32k]
  ------------------
   72|  20.8k|        n = igraph_vcount(graph);
   73|  20.8k|        if (n < max) {
  ------------------
  |  Branch (73:13): [True: 1.89k, False: 18.9k]
  ------------------
   74|  1.89k|            IGRAPH_CHECK(igraph_add_vertices(graph, (max - n), 0));
  ------------------
  |  |  656|  1.89k|    do { \
  |  |  657|  1.89k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.89k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.89k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.89k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.89k]
  |  |  ------------------
  ------------------
   75|  1.89k|        }
   76|  20.8k|        IGRAPH_CHECK(igraph_add_edges(graph, edges, 0));
  ------------------
  |  |  656|  20.8k|    do { \
  |  |  657|  20.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  20.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  20.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.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|  20.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 20.8k]
  |  |  ------------------
  ------------------
   77|  20.8k|    }
   78|       |
   79|  23.1k|    IGRAPH_FINALLY_CLEAN(1);
   80|  23.1k|    return IGRAPH_SUCCESS;
   81|  23.1k|}

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

igraph_dqueue_int_init:
   75|  41.1k|igraph_error_t FUNCTION(igraph_dqueue, init)(TYPE(igraph_dqueue)* q, igraph_int_t capacity) {
   76|  41.1k|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  41.1k|    do { \
  |  |  925|  41.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  41.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 41.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  41.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 41.1k]
  |  |  ------------------
  ------------------
   77|  41.1k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  41.1k|    do { \
  |  |  925|  41.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  41.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 41.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  41.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 41.1k]
  |  |  ------------------
  ------------------
   78|       |
   79|  41.1k|    if (capacity == 0) capacity = 1;
  ------------------
  |  Branch (79:9): [True: 7.24k, False: 33.9k]
  ------------------
   80|       |
   81|  41.1k|    q->stor_begin = IGRAPH_CALLOC(capacity, BASE);
  ------------------
  |  |   33|  41.1k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  82.2k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 41.1k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 41.1k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 41.1k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   82|  41.1k|    IGRAPH_CHECK_OOM(q->stor_begin, "Cannot initialize dqueue.");
  ------------------
  |  |  709|  41.1k|    do { \
  |  |  710|  41.1k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  41.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 41.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|  41.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 41.1k]
  |  |  ------------------
  ------------------
   83|  41.1k|    q->stor_end = q->stor_begin + capacity;
   84|  41.1k|    q->begin = q->stor_begin;
   85|  41.1k|    q->end = NULL;
   86|       |
   87|  41.1k|    return IGRAPH_SUCCESS;
   88|  41.1k|}
igraph_dqueue_int_destroy:
  100|  41.1k|void FUNCTION(igraph_dqueue, destroy)(TYPE(igraph_dqueue)* q) {
  101|  41.1k|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  41.1k|    do { \
  |  |  925|  41.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  41.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 41.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  41.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 41.1k]
  |  |  ------------------
  ------------------
  102|  41.1k|    IGRAPH_FREE(q->stor_begin); /* sets to NULL */
  ------------------
  |  |   36|  41.1k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  103|  41.1k|}
igraph_dqueue_int_empty:
  117|  6.84M|igraph_bool_t FUNCTION(igraph_dqueue, empty)(const TYPE(igraph_dqueue)* q) {
  118|  6.84M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  6.84M|    do { \
  |  |  925|  6.84M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.84M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.84M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.84M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.84M]
  |  |  ------------------
  ------------------
  119|  6.84M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  6.84M|    do { \
  |  |  925|  6.84M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.84M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.84M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.84M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.84M]
  |  |  ------------------
  ------------------
  120|  6.84M|    return q->end == NULL;
  121|  6.84M|}
igraph_dqueue_int_head:
  196|  34.8k|BASE FUNCTION(igraph_dqueue, head)(const TYPE(igraph_dqueue)* q) {
  197|  34.8k|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  198|  34.8k|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  199|  34.8k|    IGRAPH_ASSERT(q->stor_end != NULL); /* queue is not empty */
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  200|  34.8k|    return *(q->begin);
  201|  34.8k|}
igraph_dqueue_int_back:
  216|  1.72M|BASE FUNCTION(igraph_dqueue, back)(const TYPE(igraph_dqueue)* q) {
  217|  1.72M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  1.72M|    do { \
  |  |  925|  1.72M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.72M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.72M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.72M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.72M]
  |  |  ------------------
  ------------------
  218|  1.72M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  1.72M|    do { \
  |  |  925|  1.72M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.72M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.72M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.72M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.72M]
  |  |  ------------------
  ------------------
  219|  1.72M|    IGRAPH_ASSERT(q->stor_end != NULL); /* queue is not empty */
  ------------------
  |  |  924|  1.72M|    do { \
  |  |  925|  1.72M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.72M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.72M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.72M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.72M]
  |  |  ------------------
  ------------------
  220|  1.72M|    if (q->end == q->stor_begin) {
  ------------------
  |  Branch (220:9): [True: 687, False: 1.72M]
  ------------------
  221|    687|        return *(q->stor_end - 1);
  222|    687|    }
  223|  1.72M|    return *(q->end - 1);
  224|  1.72M|}
igraph_dqueue_int_pop:
  240|  2.26M|BASE FUNCTION(igraph_dqueue, pop)(TYPE(igraph_dqueue)* q) {
  241|  2.26M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  2.26M|    do { \
  |  |  925|  2.26M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.26M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.26M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.26M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.26M]
  |  |  ------------------
  ------------------
  242|  2.26M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  2.26M|    do { \
  |  |  925|  2.26M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.26M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.26M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.26M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.26M]
  |  |  ------------------
  ------------------
  243|  2.26M|    IGRAPH_ASSERT(q->stor_end != NULL); /* queue is not empty */
  ------------------
  |  |  924|  2.26M|    do { \
  |  |  925|  2.26M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.26M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.26M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.26M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.26M]
  |  |  ------------------
  ------------------
  244|  2.26M|    BASE tmp = *(q->begin);
  ------------------
  |  |   66|  2.26M|    #define BASE igraph_int_t
  ------------------
  245|  2.26M|    (q->begin)++;
  246|  2.26M|    if (q->begin == q->stor_end) {
  ------------------
  |  Branch (246:9): [True: 50.1k, False: 2.20M]
  ------------------
  247|  50.1k|        q->begin = q->stor_begin;
  248|  50.1k|    }
  249|  2.26M|    if (q->begin == q->end) {
  ------------------
  |  Branch (249:9): [True: 987k, False: 1.27M]
  ------------------
  250|   987k|        q->end = NULL;
  251|   987k|    }
  252|       |
  253|  2.26M|    return tmp;
  254|  2.26M|}
igraph_dqueue_int_pop_back:
  270|  1.56M|BASE FUNCTION(igraph_dqueue, pop_back)(TYPE(igraph_dqueue)* q) {
  271|  1.56M|    BASE tmp;
  ------------------
  |  |   66|  1.56M|    #define BASE igraph_int_t
  ------------------
  272|  1.56M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  1.56M|    do { \
  |  |  925|  1.56M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.56M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.56M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.56M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.56M]
  |  |  ------------------
  ------------------
  273|  1.56M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  1.56M|    do { \
  |  |  925|  1.56M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.56M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.56M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.56M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.56M]
  |  |  ------------------
  ------------------
  274|  1.56M|    IGRAPH_ASSERT(q->stor_end != NULL); /* queue is not empty */
  ------------------
  |  |  924|  1.56M|    do { \
  |  |  925|  1.56M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.56M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.56M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.56M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.56M]
  |  |  ------------------
  ------------------
  275|  1.56M|    if (q->end != q->stor_begin) {
  ------------------
  |  Branch (275:9): [True: 1.56M, False: 101]
  ------------------
  276|  1.56M|        tmp = *((q->end) - 1);
  277|  1.56M|        q->end = (q->end) - 1;
  278|  1.56M|    } else {
  279|    101|        tmp = *((q->stor_end) - 1);
  280|    101|        q->end = (q->stor_end) - 1;
  281|    101|    }
  282|  1.56M|    if (q->begin == q->end) {
  ------------------
  |  Branch (282:9): [True: 1.46M, False: 97.9k]
  ------------------
  283|  1.46M|        q->end = NULL;
  284|  1.46M|    }
  285|       |
  286|  1.56M|    return tmp;
  287|  1.56M|}
igraph_dqueue_int_push:
  307|  3.82M|igraph_error_t FUNCTION(igraph_dqueue, push)(TYPE(igraph_dqueue)* q, BASE elem) {
  308|  3.82M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  3.82M|    do { \
  |  |  925|  3.82M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.82M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.82M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.82M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.82M]
  |  |  ------------------
  ------------------
  309|  3.82M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  3.82M|    do { \
  |  |  925|  3.82M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.82M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.82M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.82M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.82M]
  |  |  ------------------
  ------------------
  310|  3.82M|    if (q->begin != q->end) {
  ------------------
  |  Branch (310:9): [True: 3.79M, False: 22.2k]
  ------------------
  311|       |        /* not full */
  312|  3.79M|        if (q->end == NULL) {
  ------------------
  |  Branch (312:13): [True: 2.45M, False: 1.34M]
  ------------------
  313|  2.45M|            q->end = q->begin;
  314|  2.45M|        }
  315|  3.79M|        *(q->end) = elem;
  316|  3.79M|        (q->end)++;
  317|  3.79M|        if (q->end == q->stor_end) {
  ------------------
  |  Branch (317:13): [True: 68.2k, False: 3.73M]
  ------------------
  318|  68.2k|            q->end = q->stor_begin;
  319|  68.2k|        }
  320|  3.79M|    } else {
  321|       |        /* full, allocate more storage */
  322|       |
  323|  22.2k|        BASE *bigger = NULL, *old = q->stor_begin;
  ------------------
  |  |   66|  22.2k|    #define BASE igraph_int_t
  ------------------
  324|  22.2k|        igraph_int_t old_size = q->stor_end - q->stor_begin;
  325|  22.2k|        igraph_int_t new_capacity = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|  22.2k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_capacity = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|  22.2k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (325:37): [True: 22.2k, False: 0]
  ------------------
  326|       |
  327|  22.2k|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   72|  22.2k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (327:13): [True: 0, False: 22.2k]
  ------------------
  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|  22.2k|        if (new_capacity == 0) {
  ------------------
  |  Branch (330:13): [True: 0, False: 22.2k]
  ------------------
  331|      0|            new_capacity = 1;
  332|      0|        }
  333|       |
  334|  22.2k|        bigger = IGRAPH_CALLOC(new_capacity, BASE);
  ------------------
  |  |   33|  22.2k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  44.5k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 22.2k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 22.2k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 22.2k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  335|  22.2k|        IGRAPH_CHECK_OOM(bigger, "Cannot push to dqueue.");
  ------------------
  |  |  709|  22.2k|    do { \
  |  |  710|  22.2k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  22.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 22.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|  22.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 22.2k]
  |  |  ------------------
  ------------------
  336|       |
  337|  22.2k|        if (q->stor_end - q->begin > 0) {
  ------------------
  |  Branch (337:13): [True: 22.2k, False: 0]
  ------------------
  338|  22.2k|            memcpy(bigger, q->begin,
  339|  22.2k|                   (size_t)(q->stor_end - q->begin) * sizeof(BASE));
  340|  22.2k|        }
  341|  22.2k|        if (q->end - q->stor_begin > 0) {
  ------------------
  |  Branch (341:13): [True: 898, False: 21.3k]
  ------------------
  342|    898|            memcpy(bigger + (q->stor_end - q->begin), q->stor_begin,
  343|    898|                   (size_t)(q->end - q->stor_begin) * sizeof(BASE));
  344|    898|        }
  345|       |
  346|  22.2k|        q->end        = bigger + old_size;
  347|  22.2k|        q->stor_end   = bigger + new_capacity;
  348|  22.2k|        q->stor_begin = bigger;
  349|  22.2k|        q->begin      = bigger;
  350|       |
  351|  22.2k|        *(q->end) = elem;
  352|  22.2k|        (q->end)++;
  353|  22.2k|        if (q->end == q->stor_end) {
  ------------------
  |  Branch (353:13): [True: 4.30k, False: 17.9k]
  ------------------
  354|  4.30k|            q->end = q->stor_begin;
  355|  4.30k|        }
  356|       |
  357|  22.2k|        IGRAPH_FREE(old);
  ------------------
  |  |   36|  22.2k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  358|  22.2k|    }
  359|       |
  360|  3.82M|    return IGRAPH_SUCCESS;
  361|  3.82M|}

igraph_error:
  210|  5.57k|                            igraph_error_t igraph_errno) {
  211|       |
  212|  5.57k|    if (igraph_i_error_handler) {
  ------------------
  |  Branch (212:9): [True: 5.57k, False: 0]
  ------------------
  213|  5.57k|        igraph_i_error_handler(reason, file, line, igraph_errno);
  214|  5.57k|#ifndef USING_R
  215|  5.57k|    }  else {
  216|      0|        igraph_error_handler_abort(reason, file, line, igraph_errno);
  217|      0|#endif
  218|      0|    }
  219|  5.57k|    return igraph_errno;
  220|  5.57k|}
igraph_errorf:
  240|  1.51k|                             igraph_error_t igraph_errno, ...) {
  241|  1.51k|    va_list ap;
  242|  1.51k|    va_start(ap, igraph_errno);
  243|  1.51k|    vsnprintf(igraph_i_errormsg_buffer,
  244|  1.51k|              sizeof(igraph_i_errormsg_buffer) / sizeof(char), reason, ap);
  245|       |    va_end(ap);
  246|  1.51k|    return igraph_error(igraph_i_errormsg_buffer, file, line, igraph_errno);
  247|  1.51k|}
igraph_error_handler_ignore:
  266|  5.57k|                                 int line, igraph_error_t igraph_errno) {
  267|  5.57k|    IGRAPH_UNUSED(reason);
  ------------------
  |  |   30|  5.57k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  268|  5.57k|    IGRAPH_UNUSED(file);
  ------------------
  |  |   30|  5.57k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  269|  5.57k|    IGRAPH_UNUSED(line);
  ------------------
  |  |   30|  5.57k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  270|  5.57k|    IGRAPH_UNUSED(igraph_errno);
  ------------------
  |  |   30|  5.57k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  271|       |
  272|  5.57k|    IGRAPH_FINALLY_FREE();
  273|  5.57k|}
igraph_set_error_handler:
  298|  7.09k|igraph_error_handler_t *igraph_set_error_handler(igraph_error_handler_t *new_handler) {
  299|  7.09k|    igraph_error_handler_t *previous_handler = igraph_i_error_handler;
  300|  7.09k|    igraph_i_error_handler = new_handler;
  301|  7.09k|    return previous_handler;
  302|  7.09k|}
IGRAPH_FINALLY_REAL:
  320|   932k|void IGRAPH_FINALLY_REAL(void (*func)(void*), void* ptr) {
  321|   932k|    int no = igraph_i_finally_stack_size;
  322|   932k|    if (no < 0) {
  ------------------
  |  Branch (322:9): [True: 0, False: 932k]
  ------------------
  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|   932k|    if (no >= (int) (sizeof(igraph_i_finally_stack) / sizeof(igraph_i_finally_stack[0]))) {
  ------------------
  |  Branch (327:9): [True: 0, False: 932k]
  ------------------
  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|   932k|    igraph_i_finally_stack[no].ptr = ptr;
  333|   932k|    igraph_i_finally_stack[no].func = func;
  334|   932k|    igraph_i_finally_stack[no].level = igraph_i_finally_stack_level;
  335|   932k|    igraph_i_finally_stack_size++;
  336|   932k|}
IGRAPH_FINALLY_CLEAN:
  338|   413k|void IGRAPH_FINALLY_CLEAN(int minus) {
  339|   413k|    igraph_i_finally_stack_size -= minus;
  340|   413k|    if (igraph_i_finally_stack_size < 0) {
  ------------------
  |  Branch (340:9): [True: 0, False: 413k]
  ------------------
  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|   413k|}
IGRAPH_FINALLY_FREE:
  348|  5.57k|void IGRAPH_FINALLY_FREE(void) {
  349|  9.12k|    for (; igraph_i_finally_stack_size > 0; igraph_i_finally_stack_size--) {
  ------------------
  |  Branch (349:12): [True: 3.54k, False: 5.57k]
  ------------------
  350|  3.54k|        int p = igraph_i_finally_stack_size - 1;
  351|       |        /* Call destructors only up to the current level */
  352|  3.54k|        if (igraph_i_finally_stack[p].level < igraph_i_finally_stack_level) {
  ------------------
  |  Branch (352:13): [True: 0, False: 3.54k]
  ------------------
  353|      0|            break;
  354|      0|        }
  355|  3.54k|        igraph_i_finally_stack[p].func(igraph_i_finally_stack[p].ptr);
  356|  3.54k|    }
  357|  5.57k|}
IGRAPH_FINALLY_STACK_SIZE:
  359|  2.30k|int IGRAPH_FINALLY_STACK_SIZE(void) {
  360|  2.30k|    return igraph_i_finally_stack_size;
  361|  2.30k|}
IGRAPH_FINALLY_ENTER:
  377|  25.5k|void IGRAPH_FINALLY_ENTER(void) {
  378|  25.5k|    int no = igraph_i_finally_stack_size;
  379|       |    /* Level indices must always be in increasing order in the finally stack */
  380|  25.5k|    if (no > 0 && igraph_i_finally_stack[no-1].level > igraph_i_finally_stack_level) {
  ------------------
  |  Branch (380:9): [True: 25.5k, False: 0]
  |  Branch (380:19): [True: 0, False: 25.5k]
  ------------------
  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|  25.5k|    igraph_i_finally_stack_level++;
  386|  25.5k|}
IGRAPH_FINALLY_EXIT:
  399|  25.5k|void IGRAPH_FINALLY_EXIT(void) {
  400|  25.5k|    igraph_i_finally_stack_level--;
  401|  25.5k|    if (igraph_i_finally_stack_level < 0) {
  ------------------
  |  Branch (401:9): [True: 0, False: 25.5k]
  ------------------
  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|  25.5k|}
igraph_warning_handler_ignore:
  424|  2.12k|void igraph_warning_handler_ignore(const char *reason, const char *file, int line) {
  425|  2.12k|    IGRAPH_UNUSED(reason);
  ------------------
  |  |   30|  2.12k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  426|  2.12k|    IGRAPH_UNUSED(file);
  ------------------
  |  |   30|  2.12k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  427|  2.12k|    IGRAPH_UNUSED(line);
  ------------------
  |  |   30|  2.12k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  428|  2.12k|}
igraph_warning:
  463|  2.12k|void igraph_warning(const char *reason, const char *file, int line) {
  464|       |
  465|  2.12k|    if (igraph_i_warning_handler) {
  ------------------
  |  Branch (465:9): [True: 2.12k, False: 0]
  ------------------
  466|  2.12k|        igraph_i_warning_handler(reason, file, line);
  467|  2.12k|#ifndef USING_R
  468|  2.12k|    }  else {
  469|      0|        igraph_warning_handler_print(reason, file, line);
  470|      0|#endif
  471|      0|    }
  472|  2.12k|}
igraph_set_warning_handler:
  514|  2.31k|igraph_warning_handler_t *igraph_set_warning_handler(igraph_warning_handler_t *new_handler) {
  515|  2.31k|    igraph_warning_handler_t *previous_handler = igraph_i_warning_handler;
  516|  2.31k|    igraph_i_warning_handler = new_handler;
  517|  2.31k|    return previous_handler;
  518|  2.31k|}

igraph_matrix_init:
   64|  2.30k|        TYPE(igraph_matrix) *m, igraph_int_t nrow, igraph_int_t ncol) {
   65|  2.30k|    igraph_int_t size;
   66|  2.30k|    IGRAPH_ASSERT(nrow >= 0 && ncol >= 0);
  ------------------
  |  |  924|  2.30k|    do { \
  |  |  925|  2.30k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.60k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.30k]
  |  |  |  |  |  Branch (612:52): [True: 2.30k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 2.30k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
   67|  2.30k|    IGRAPH_SAFE_MULT(nrow, ncol, &size);
  ------------------
  |  |   57|  2.30k|    do { \
  |  |   58|  2.30k|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   59|  2.30k|        igraph_int_t _safe_prod; \
  |  |   60|  2.30k|        if (__builtin_mul_overflow(_safe_a, _safe_b, &_safe_prod)) { \
  |  |  ------------------
  |  |  |  Branch (60:13): [True: 0, False: 2.30k]
  |  |  ------------------
  |  |   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.30k|        *(res) = _safe_prod; \
  |  |   64|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (64:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
   68|  2.30k|    IGRAPH_CHECK(FUNCTION(igraph_vector, init)(&m->data, size));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
   69|  2.30k|    m->nrow = nrow;
   70|  2.30k|    m->ncol = ncol;
   71|  2.30k|    return IGRAPH_SUCCESS;
   72|  2.30k|}
igraph_matrix_destroy:
  176|  2.30k|void FUNCTION(igraph_matrix, destroy)(TYPE(igraph_matrix) *m) {
  177|  2.30k|    FUNCTION(igraph_vector, destroy)(&m->data);
  ------------------
  |  |  170|  2.30k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  2.30k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  2.30k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  178|  2.30k|}
igraph_matrix_resize:
  229|  2.30k|igraph_error_t FUNCTION(igraph_matrix, resize)(TYPE(igraph_matrix) *m, igraph_int_t nrow, igraph_int_t ncol) {
  230|  2.30k|    igraph_int_t size;
  231|  2.30k|    IGRAPH_ASSERT(nrow >= 0 && ncol >= 0);
  ------------------
  |  |  924|  2.30k|    do { \
  |  |  925|  2.30k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.60k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.30k]
  |  |  |  |  |  Branch (612:52): [True: 2.30k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 2.30k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  232|  2.30k|    IGRAPH_SAFE_MULT(nrow, ncol, &size);
  ------------------
  |  |   57|  2.30k|    do { \
  |  |   58|  2.30k|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   59|  2.30k|        igraph_int_t _safe_prod; \
  |  |   60|  2.30k|        if (__builtin_mul_overflow(_safe_a, _safe_b, &_safe_prod)) { \
  |  |  ------------------
  |  |  |  Branch (60:13): [True: 0, False: 2.30k]
  |  |  ------------------
  |  |   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.30k|        *(res) = _safe_prod; \
  |  |   64|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (64:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  233|  2.30k|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(&m->data, size));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  234|  2.30k|    m->nrow = nrow;
  235|  2.30k|    m->ncol = ncol;
  236|  2.30k|    return IGRAPH_SUCCESS;
  237|  2.30k|}
igraph_matrix_fill:
  967|  2.30k|void FUNCTION(igraph_matrix, fill)(TYPE(igraph_matrix) *m, BASE e) {
  968|  2.30k|    FUNCTION(igraph_vector, fill)(&m->data, e);
  ------------------
  |  |  170|  2.30k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  2.30k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  2.30k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  969|  2.30k|}

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

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

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

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

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

igraph_vector_init:
  134|  16.1k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  16.1k|    igraph_int_t alloc_size;
  136|  16.1k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  16.1k|    do { \
  |  |  925|  16.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  16.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 16.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  16.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 16.1k]
  |  |  ------------------
  ------------------
  137|  16.1k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 13.8k, False: 2.30k]
  ------------------
  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|  16.1k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  16.1k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  32.2k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 16.1k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 16.1k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 16.1k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  16.1k|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  16.1k|    do { \
  |  |  710|  16.1k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  16.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 16.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|  16.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 16.1k]
  |  |  ------------------
  ------------------
  145|  16.1k|    v->stor_end = v->stor_begin + alloc_size;
  146|  16.1k|    v->end = v->stor_begin + size;
  147|       |
  148|  16.1k|    return IGRAPH_SUCCESS;
  149|  16.1k|}
igraph_vector_destroy:
  408|  16.1k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  16.1k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  16.1k|    do { \
  |  |  925|  16.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  16.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 16.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  16.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 16.1k]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  16.1k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 16.1k, False: 0]
  ------------------
  413|  16.1k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  16.1k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  16.1k|    }
  416|  16.1k|}
igraph_vector_capacity:
  436|  17.4k|igraph_int_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  437|  17.4k|    return v->stor_end - v->stor_begin;
  438|  17.4k|}
igraph_vector_reserve:
  468|  17.4k|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_int_t capacity) {
  469|  17.4k|    igraph_int_t current_capacity;
  470|  17.4k|    BASE *tmp;
  ------------------
  |  |   29|  17.4k|    #define BASE igraph_real_t
  ------------------
  471|       |
  472|  17.4k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  17.4k|    do { \
  |  |  925|  17.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  17.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 17.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  17.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 17.4k]
  |  |  ------------------
  ------------------
  473|  17.4k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  17.4k|    do { \
  |  |  925|  17.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  17.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 17.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  17.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 17.4k]
  |  |  ------------------
  ------------------
  474|  17.4k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  17.4k|    do { \
  |  |  925|  17.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  17.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 17.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  17.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 17.4k]
  |  |  ------------------
  ------------------
  475|       |
  476|  17.4k|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  170|  17.4k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  17.4k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  17.4k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|       |
  478|  17.4k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (478:9): [True: 15.1k, False: 2.27k]
  ------------------
  479|  15.1k|        return IGRAPH_SUCCESS;
  480|  15.1k|    }
  481|       |
  482|  2.27k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   35|  2.27k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|  4.55k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.27k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.27k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.27k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|  2.27k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  709|  2.27k|    do { \
  |  |  710|  2.27k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.27k]
  |  |  ------------------
  ------------------
  484|       |
  485|  2.27k|    v->end = tmp + (v->end - v->stor_begin);
  486|  2.27k|    v->stor_begin = tmp;
  487|  2.27k|    v->stor_end = v->stor_begin + capacity;
  488|       |
  489|  2.27k|    return IGRAPH_SUCCESS;
  490|  2.27k|}
igraph_vector_size:
  522|  4.60k|igraph_int_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  523|  4.60k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  4.60k|    do { \
  |  |  925|  4.60k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.60k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.60k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.60k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.60k]
  |  |  ------------------
  ------------------
  524|  4.60k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  4.60k|    do { \
  |  |  925|  4.60k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.60k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.60k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.60k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.60k]
  |  |  ------------------
  ------------------
  525|  4.60k|    return v->end - v->stor_begin;
  526|  4.60k|}
igraph_vector_fill:
  745|  12.8k|void FUNCTION(igraph_vector, fill)(TYPE(igraph_vector) *v, BASE e) {
  746|  12.8k|    BASE *ptr;
  ------------------
  |  |   29|  12.8k|    #define BASE igraph_real_t
  ------------------
  747|  12.8k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  12.8k|    do { \
  |  |  925|  12.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  12.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  12.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 12.8k]
  |  |  ------------------
  ------------------
  748|  12.8k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  12.8k|    do { \
  |  |  925|  12.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  12.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  12.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 12.8k]
  |  |  ------------------
  ------------------
  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|   413k|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (766:31): [True: 400k, False: 12.8k]
  ------------------
  767|   400k|        *ptr = e;
  768|   400k|    }
  769|  12.8k|}
igraph_vector_resize:
 1264|  17.4k|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_int_t new_size) {
 1265|  17.4k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  17.4k|    do { \
  |  |  925|  17.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  17.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 17.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  17.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 17.4k]
  |  |  ------------------
  ------------------
 1266|  17.4k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  17.4k|    do { \
  |  |  925|  17.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  17.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 17.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  17.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 17.4k]
  |  |  ------------------
  ------------------
 1267|  17.4k|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  17.4k|    do { \
  |  |  657|  17.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  17.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  17.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 17.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|  17.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 17.4k]
  |  |  ------------------
  ------------------
 1268|  17.4k|    v->end = v->stor_begin + new_size;
 1269|  17.4k|    return IGRAPH_SUCCESS;
 1270|  17.4k|}
igraph_vector_char_init:
  134|  2.17k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  2.17k|    igraph_int_t alloc_size;
  136|  2.17k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  2.17k|    do { \
  |  |  925|  2.17k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.17k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.17k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.17k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.17k]
  |  |  ------------------
  ------------------
  137|  2.17k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 2.17k, 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.17k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  2.17k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.35k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.17k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.17k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.17k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  2.17k|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  2.17k|    do { \
  |  |  710|  2.17k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.17k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.17k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.17k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.17k]
  |  |  ------------------
  ------------------
  145|  2.17k|    v->stor_end = v->stor_begin + alloc_size;
  146|  2.17k|    v->end = v->stor_begin + size;
  147|       |
  148|  2.17k|    return IGRAPH_SUCCESS;
  149|  2.17k|}
igraph_vector_char_destroy:
  408|  2.17k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  2.17k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  2.17k|    do { \
  |  |  925|  2.17k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.17k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.17k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.17k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.17k]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  2.17k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 2.17k, False: 0]
  ------------------
  413|  2.17k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  2.17k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  2.17k|    }
  416|  2.17k|}
igraph_vector_bool_init:
  134|  2.30k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  2.30k|    igraph_int_t alloc_size;
  136|  2.30k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  2.30k|    do { \
  |  |  925|  2.30k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  137|  2.30k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 0, False: 2.30k]
  ------------------
  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.30k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  2.30k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.60k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.30k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.30k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.30k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  2.30k|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  2.30k|    do { \
  |  |  710|  2.30k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  145|  2.30k|    v->stor_end = v->stor_begin + alloc_size;
  146|  2.30k|    v->end = v->stor_begin + size;
  147|       |
  148|  2.30k|    return IGRAPH_SUCCESS;
  149|  2.30k|}
igraph_vector_bool_destroy:
  408|  2.30k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  2.30k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  2.30k|    do { \
  |  |  925|  2.30k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  2.30k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 2.30k, False: 0]
  ------------------
  413|  2.30k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  2.30k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  2.30k|    }
  416|  2.30k|}
igraph_vector_bool_capacity:
  436|  6.90k|igraph_int_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  437|  6.90k|    return v->stor_end - v->stor_begin;
  438|  6.90k|}
igraph_vector_bool_reserve:
  468|  6.90k|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_int_t capacity) {
  469|  6.90k|    igraph_int_t current_capacity;
  470|  6.90k|    BASE *tmp;
  ------------------
  |  |   53|  6.90k|    #define BASE igraph_bool_t
  ------------------
  471|       |
  472|  6.90k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  6.90k|    do { \
  |  |  925|  6.90k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.90k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.90k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.90k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.90k]
  |  |  ------------------
  ------------------
  473|  6.90k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  6.90k|    do { \
  |  |  925|  6.90k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.90k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.90k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.90k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.90k]
  |  |  ------------------
  ------------------
  474|  6.90k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  6.90k|    do { \
  |  |  925|  6.90k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.90k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.90k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.90k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.90k]
  |  |  ------------------
  ------------------
  475|       |
  476|  6.90k|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  175|  6.90k|        #define FUNCTION(a,c) CONCAT3x(a,bool,c)
  |  |  ------------------
  |  |  |  |   21|  6.90k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  ------------------
  ------------------
  477|       |
  478|  6.90k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (478:9): [True: 4.85k, False: 2.05k]
  ------------------
  479|  4.85k|        return IGRAPH_SUCCESS;
  480|  4.85k|    }
  481|       |
  482|  2.05k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   35|  2.05k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|  4.10k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.05k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.05k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.05k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|  2.05k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  709|  2.05k|    do { \
  |  |  710|  2.05k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.05k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.05k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.05k]
  |  |  ------------------
  ------------------
  484|       |
  485|  2.05k|    v->end = tmp + (v->end - v->stor_begin);
  486|  2.05k|    v->stor_begin = tmp;
  487|  2.05k|    v->stor_end = v->stor_begin + capacity;
  488|       |
  489|  2.05k|    return IGRAPH_SUCCESS;
  490|  2.05k|}
igraph_vector_bool_resize:
 1264|  6.90k|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_int_t new_size) {
 1265|  6.90k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  6.90k|    do { \
  |  |  925|  6.90k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.90k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.90k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.90k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.90k]
  |  |  ------------------
  ------------------
 1266|  6.90k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  6.90k|    do { \
  |  |  925|  6.90k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.90k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.90k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.90k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.90k]
  |  |  ------------------
  ------------------
 1267|  6.90k|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  6.90k|    do { \
  |  |  657|  6.90k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  6.90k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  6.90k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.90k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.90k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 6.90k]
  |  |  ------------------
  ------------------
 1268|  6.90k|    v->end = v->stor_begin + new_size;
 1269|  6.90k|    return IGRAPH_SUCCESS;
 1270|  6.90k|}
igraph_vector_int_init:
  134|  10.3M|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  10.3M|    igraph_int_t alloc_size;
  136|  10.3M|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  10.3M|    do { \
  |  |  925|  10.3M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  10.3M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 10.3M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  10.3M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 10.3M]
  |  |  ------------------
  ------------------
  137|  10.3M|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 675k, False: 9.62M]
  ------------------
  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|  10.3M|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  10.3M|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  20.6M|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 10.3M, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 10.3M, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 10.3M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  10.3M|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  10.3M|    do { \
  |  |  710|  10.3M|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  10.3M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 10.3M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|  10.3M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 10.3M]
  |  |  ------------------
  ------------------
  145|  10.3M|    v->stor_end = v->stor_begin + alloc_size;
  146|  10.3M|    v->end = v->stor_begin + size;
  147|       |
  148|  10.3M|    return IGRAPH_SUCCESS;
  149|  10.3M|}
igraph_vector_int_destroy:
  408|  10.3M|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  10.3M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  10.3M|    do { \
  |  |  925|  10.3M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  10.3M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 10.3M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  10.3M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 10.3M]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  10.3M|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 10.3M, False: 0]
  ------------------
  413|  10.3M|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  10.3M|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  10.3M|    }
  416|  10.3M|}
igraph_vector_int_capacity:
  436|  24.0M|igraph_int_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  437|  24.0M|    return v->stor_end - v->stor_begin;
  438|  24.0M|}
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.18M]
  ------------------
  479|  17.2M|        return IGRAPH_SUCCESS;
  480|  17.2M|    }
  481|       |
  482|  5.18M|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   35|  5.18M|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|  10.3M|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 5.18M, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 5.18M, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 5.18M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|  5.18M|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  709|  5.18M|    do { \
  |  |  710|  5.18M|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  5.18M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.18M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.18M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 5.18M]
  |  |  ------------------
  ------------------
  484|       |
  485|  5.18M|    v->end = tmp + (v->end - v->stor_begin);
  486|  5.18M|    v->stor_begin = tmp;
  487|  5.18M|    v->stor_end = v->stor_begin + capacity;
  488|       |
  489|  5.18M|    return IGRAPH_SUCCESS;
  490|  5.18M|}
igraph_vector_int_empty:
  503|   852k|igraph_bool_t FUNCTION(igraph_vector, empty)(const TYPE(igraph_vector) *v) {
  504|   852k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   852k|    do { \
  |  |  925|   852k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   852k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 852k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   852k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 852k]
  |  |  ------------------
  ------------------
  505|   852k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   852k|    do { \
  |  |  925|   852k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   852k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 852k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   852k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 852k]
  |  |  ------------------
  ------------------
  506|   852k|    return v->stor_begin == v->end;
  507|   852k|}
igraph_vector_int_size:
  522|  20.9M|igraph_int_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  523|  20.9M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  20.9M|    do { \
  |  |  925|  20.9M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  20.9M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.9M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  20.9M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 20.9M]
  |  |  ------------------
  ------------------
  524|  20.9M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  20.9M|    do { \
  |  |  925|  20.9M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  20.9M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.9M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  20.9M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 20.9M]
  |  |  ------------------
  ------------------
  525|  20.9M|    return v->end - v->stor_begin;
  526|  20.9M|}
igraph_vector_int_clear:
  542|  1.18M|void FUNCTION(igraph_vector, clear)(TYPE(igraph_vector)* v) {
  543|  1.18M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.18M|    do { \
  |  |  925|  1.18M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.18M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.18M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.18M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.18M]
  |  |  ------------------
  ------------------
  544|  1.18M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  1.18M|    do { \
  |  |  925|  1.18M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.18M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.18M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.18M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.18M]
  |  |  ------------------
  ------------------
  545|  1.18M|    v->end = v->stor_begin;
  546|  1.18M|}
igraph_vector_int_push_back:
  573|  8.26M|igraph_error_t FUNCTION(igraph_vector, push_back)(TYPE(igraph_vector) *v, BASE e) {
  574|  8.26M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  8.26M|    do { \
  |  |  925|  8.26M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  8.26M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.26M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  8.26M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 8.26M]
  |  |  ------------------
  ------------------
  575|  8.26M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  8.26M|    do { \
  |  |  925|  8.26M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  8.26M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.26M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  8.26M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 8.26M]
  |  |  ------------------
  ------------------
  576|       |
  577|  8.26M|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (577:9): [True: 2.48M, False: 5.77M]
  ------------------
  578|       |        /* full, allocate more storage */
  579|  2.48M|        igraph_int_t old_size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  178|  2.48M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  2.48M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  2.48M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  580|  2.48M|        igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|  2.48M|#  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.48M|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (580:33): [True: 2.48M, False: 0]
  ------------------
  581|  2.48M|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   72|  2.48M|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (581:13): [True: 0, False: 2.48M]
  ------------------
  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.48M|        if (new_size == 0) {
  ------------------
  |  Branch (584:13): [True: 0, False: 2.48M]
  ------------------
  585|      0|            new_size = 1;
  586|      0|        }
  587|  2.48M|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  2.48M|    do { \
  |  |  657|  2.48M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.48M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.48M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.48M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.48M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.48M]
  |  |  ------------------
  ------------------
  588|  2.48M|    }
  589|       |
  590|  8.26M|    *(v->end) = e;
  591|  8.26M|    v->end += 1;
  592|       |
  593|  8.26M|    return IGRAPH_SUCCESS;
  594|  8.26M|}
igraph_vector_int_insert:
  611|  64.9k|        TYPE(igraph_vector) *v, igraph_int_t pos, BASE value) {
  612|  64.9k|    igraph_int_t size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  178|  64.9k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  64.9k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  64.9k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  613|  64.9k|    IGRAPH_ASSERT(0 <= pos && pos <= size);
  ------------------
  |  |  924|  64.9k|    do { \
  |  |  925|  64.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   129k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 64.9k]
  |  |  |  |  |  Branch (612:52): [True: 64.9k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 64.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  64.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 64.9k]
  |  |  ------------------
  ------------------
  614|  64.9k|    if (size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   72|  64.9k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (614:9): [True: 0, False: 64.9k]
  ------------------
  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|  64.9k|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(v, size + 1));
  ------------------
  |  |  656|  64.9k|    do { \
  |  |  657|  64.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  64.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  64.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 64.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|  64.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 64.9k]
  |  |  ------------------
  ------------------
  618|  64.9k|    if (pos < size) {
  ------------------
  |  Branch (618:9): [True: 9.10k, False: 55.8k]
  ------------------
  619|  9.10k|        memmove(v->stor_begin + pos + 1, v->stor_begin + pos,
  620|  9.10k|                sizeof(BASE) * (size - pos));
  621|  9.10k|    }
  622|  64.9k|    v->stor_begin[pos] = value;
  623|  64.9k|    return IGRAPH_SUCCESS;
  624|  64.9k|}
igraph_vector_int_get_ptr:
  682|   475k|BASE* FUNCTION(igraph_vector, get_ptr)(const TYPE(igraph_vector) *v, igraph_int_t pos) {
  683|   475k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   475k|    do { \
  |  |  925|   475k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   475k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 475k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   475k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 475k]
  |  |  ------------------
  ------------------
  684|   475k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   475k|    do { \
  |  |  925|   475k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   475k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 475k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   475k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 475k]
  |  |  ------------------
  ------------------
  685|   475k|    return v->stor_begin + pos;
  686|   475k|}
igraph_vector_int_null:
  725|   193k|void FUNCTION(igraph_vector, null)(TYPE(igraph_vector) *v) {
  726|   193k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   193k|    do { \
  |  |  925|   193k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   193k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 193k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   193k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 193k]
  |  |  ------------------
  ------------------
  727|   193k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   193k|    do { \
  |  |  925|   193k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   193k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 193k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   193k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 193k]
  |  |  ------------------
  ------------------
  728|   193k|    if (FUNCTION(igraph_vector, size)(v) > 0) {
  ------------------
  |  |  178|   193k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   193k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   193k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (728:9): [True: 186k, False: 7.40k]
  ------------------
  729|   186k|        memset(v->stor_begin, 0, sizeof(BASE) * FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  178|   186k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   186k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   186k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  730|   186k|    }
  731|   193k|}
igraph_vector_int_fill:
  745|  32.2k|void FUNCTION(igraph_vector, fill)(TYPE(igraph_vector) *v, BASE e) {
  746|  32.2k|    BASE *ptr;
  ------------------
  |  |   66|  32.2k|    #define BASE igraph_int_t
  ------------------
  747|  32.2k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  32.2k|    do { \
  |  |  925|  32.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  32.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 32.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  32.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 32.2k]
  |  |  ------------------
  ------------------
  748|  32.2k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  32.2k|    do { \
  |  |  925|  32.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  32.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 32.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  32.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 32.2k]
  |  |  ------------------
  ------------------
  749|       |
  750|       |    /* Optimize the commonly used integer case when filling with 0
  751|       |     * or -1, which are an all-0 and all-1 bit pattern that the
  752|       |     * compiler can generate higher efficiency code for. */
  753|  32.2k|#if defined(BASE_INT)
  754|  32.2k|    if (e == 0) {
  ------------------
  |  Branch (754:9): [True: 0, False: 32.2k]
  ------------------
  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|  32.2k|    if (e == -1) {
  ------------------
  |  Branch (758:9): [True: 18.4k, False: 13.8k]
  ------------------
  759|  3.14M|        for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (759:35): [True: 3.12M, False: 18.4k]
  ------------------
  760|  3.12M|            *ptr = -1;
  761|  3.12M|        }
  762|  18.4k|        return;
  763|  18.4k|    }
  764|  13.8k|#endif
  765|       |
  766|  2.35M|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (766:31): [True: 2.34M, False: 13.8k]
  ------------------
  767|  2.34M|        *ptr = e;
  768|  2.34M|    }
  769|  13.8k|}
igraph_vector_int_range:
  791|  2.30k|igraph_error_t FUNCTION(igraph_vector, range)(TYPE(igraph_vector) *v, BASE start, BASE end) {
  792|  2.30k|    BASE *p;
  ------------------
  |  |   66|  2.30k|    #define BASE igraph_int_t
  ------------------
  793|  2.30k|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(v, (end - start)));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  794|       |
  795|   392k|    for (p = v->stor_begin; p < v->end; p++) {
  ------------------
  |  Branch (795:29): [True: 390k, False: 2.30k]
  ------------------
  796|   390k|        *p = start;
  797|   390k|        start = start + ONE;
  ------------------
  |  |   72|   390k|    #define ONE 1
  ------------------
  798|   390k|    }
  799|       |
  800|  2.30k|    return IGRAPH_SUCCESS;
  801|  2.30k|}
igraph_vector_int_pop_back:
  838|  1.13M|BASE FUNCTION(igraph_vector, pop_back)(TYPE(igraph_vector) *v) {
  839|  1.13M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.13M|    do { \
  |  |  925|  1.13M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.13M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.13M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.13M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.13M]
  |  |  ------------------
  ------------------
  840|  1.13M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  1.13M|    do { \
  |  |  925|  1.13M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.13M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.13M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.13M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.13M]
  |  |  ------------------
  ------------------
  841|  1.13M|    IGRAPH_ASSERT(v->end != NULL);
  ------------------
  |  |  924|  1.13M|    do { \
  |  |  925|  1.13M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.13M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.13M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.13M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.13M]
  |  |  ------------------
  ------------------
  842|  1.13M|    IGRAPH_ASSERT(v->end != v->stor_begin);
  ------------------
  |  |  924|  1.13M|    do { \
  |  |  925|  1.13M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.13M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.13M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.13M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.13M]
  |  |  ------------------
  ------------------
  843|       |
  844|  1.13M|    (v->end)--;
  845|       |
  846|  1.13M|    return *(v->end);
  847|  1.13M|}
igraph_vector_int_sort:
  958|    626|void FUNCTION(igraph_vector, sort)(TYPE(igraph_vector) *v) {
  959|    626|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|    626|    do { \
  |  |  925|    626|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    626|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 626]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    626|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 626]
  |  |  ------------------
  ------------------
  960|    626|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|    626|    do { \
  |  |  925|    626|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    626|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 626]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    626|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 626]
  |  |  ------------------
  ------------------
  961|    626|    igraph_qsort(v->stor_begin, FUNCTION(igraph_vector, size)(v),
  ------------------
  |  |  178|    626|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|    626|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|    626|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  962|    626|                 sizeof(BASE), FUNCTION(igraph_vector, sort_cmp));
  ------------------
  |  |  178|    626|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|    626|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|    626|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  963|    626|}
igraph_vector_int_resize:
 1264|  19.7M|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_int_t new_size) {
 1265|  19.7M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  19.7M|    do { \
  |  |  925|  19.7M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  19.7M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 19.7M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  19.7M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 19.7M]
  |  |  ------------------
  ------------------
 1266|  19.7M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  19.7M|    do { \
  |  |  925|  19.7M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  19.7M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 19.7M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  19.7M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 19.7M]
  |  |  ------------------
  ------------------
 1267|  19.7M|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  19.7M|    do { \
  |  |  657|  19.7M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  19.7M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  19.7M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 19.7M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.7M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 19.7M]
  |  |  ------------------
  ------------------
 1268|  19.7M|    v->end = v->stor_begin + new_size;
 1269|  19.7M|    return IGRAPH_SUCCESS;
 1270|  19.7M|}
igraph_vector_int_max:
 1327|  25.4k|BASE FUNCTION(igraph_vector, max)(const TYPE(igraph_vector) *v) {
 1328|  25.4k|    BASE max;
  ------------------
  |  |   66|  25.4k|    #define BASE igraph_int_t
  ------------------
 1329|  25.4k|    BASE *ptr;
  ------------------
  |  |   66|  25.4k|    #define BASE igraph_int_t
  ------------------
 1330|  25.4k|    IGRAPH_ASSERT(!FUNCTION(igraph_vector, empty)(v));
  ------------------
  |  |  924|  25.4k|    do { \
  |  |  925|  25.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  25.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 25.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  25.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 25.4k]
  |  |  ------------------
  ------------------
 1331|  25.4k|    max = *(v->stor_begin);
 1332|       |#if defined(BASE_IGRAPH_REAL)
 1333|       |    if (isnan(max)) { return max; }; /* Result is NaN */
 1334|       |#endif
 1335|  25.4k|    ptr = v->stor_begin + 1;
 1336|  2.31M|    while (ptr < v->end) {
  ------------------
  |  Branch (1336:12): [True: 2.28M, False: 25.4k]
  ------------------
 1337|  2.28M|        if ((*ptr) > max) {
  ------------------
  |  Branch (1337:13): [True: 145k, False: 2.14M]
  ------------------
 1338|   145k|            max = *ptr;
 1339|   145k|        }
 1340|       |#if defined(BASE_IGRAPH_REAL)
 1341|       |        else if (isnan(*ptr))
 1342|       |            return *ptr; /* Result is NaN */
 1343|       |#endif
 1344|  2.28M|        ptr++;
 1345|  2.28M|    }
 1346|  25.4k|    return max;
 1347|  25.4k|}
igraph_vector_int_min:
 1401|  41.4k|BASE FUNCTION(igraph_vector, min)(const TYPE(igraph_vector) *v) {
 1402|  41.4k|    BASE min;
  ------------------
  |  |   66|  41.4k|    #define BASE igraph_int_t
  ------------------
 1403|  41.4k|    BASE *ptr;
  ------------------
  |  |   66|  41.4k|    #define BASE igraph_int_t
  ------------------
 1404|  41.4k|    IGRAPH_ASSERT(!FUNCTION(igraph_vector, empty)(v));
  ------------------
  |  |  924|  41.4k|    do { \
  |  |  925|  41.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  41.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 41.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  41.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 41.4k]
  |  |  ------------------
  ------------------
 1405|  41.4k|    min = *(v->stor_begin);
 1406|       |#if defined(BASE_IGRAPH_REAL)
 1407|       |    if (isnan(min)) { return min; }; /* Result is NaN */
 1408|       |#endif
 1409|  41.4k|    ptr = v->stor_begin + 1;
 1410|  7.02M|    while (ptr < v->end) {
  ------------------
  |  Branch (1410:12): [True: 6.98M, False: 41.4k]
  ------------------
 1411|  6.98M|        if ((*ptr) < min) {
  ------------------
  |  Branch (1411:13): [True: 27.9k, False: 6.95M]
  ------------------
 1412|  27.9k|            min = *ptr;
 1413|  27.9k|        }
 1414|       |#if defined(BASE_IGRAPH_REAL)
 1415|       |        else if (isnan(*ptr)) {
 1416|       |            return *ptr; /* Result is NaN */
 1417|       |        }
 1418|       |#endif
 1419|  6.98M|        ptr++;
 1420|  6.98M|    }
 1421|  41.4k|    return min;
 1422|  41.4k|}
igraph_vector_int_init_copy:
 1538|    360|) {
 1539|    360|    igraph_int_t from_size;
 1540|       |
 1541|    360|    IGRAPH_ASSERT(from != NULL);
  ------------------
  |  |  924|    360|    do { \
  |  |  925|    360|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    360|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 360]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    360|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 360]
  |  |  ------------------
  ------------------
 1542|    360|    IGRAPH_ASSERT(from->stor_begin != NULL);
  ------------------
  |  |  924|    360|    do { \
  |  |  925|    360|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    360|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 360]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    360|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 360]
  |  |  ------------------
  ------------------
 1543|       |
 1544|    360|    from_size = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  178|    360|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|    360|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|    360|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1545|    360|    IGRAPH_CHECK(FUNCTION(igraph_vector, init)(to, from_size));
  ------------------
  |  |  656|    360|    do { \
  |  |  657|    360|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    360|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    360|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 360]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    360|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 360]
  |  |  ------------------
  ------------------
 1546|       |
 1547|    360|    memcpy(to->stor_begin, from->stor_begin, from_size * sizeof(BASE));
 1548|       |
 1549|    360|    return IGRAPH_SUCCESS;
 1550|    360|}
igraph_vector_int_init_range:
 1686|  2.30k|igraph_error_t FUNCTION(igraph_vector, init_range)(TYPE(igraph_vector) *v, BASE start, BASE end) {
 1687|  2.30k|    BASE *p;
  ------------------
  |  |   66|  2.30k|    #define BASE igraph_int_t
  ------------------
 1688|  2.30k|    IGRAPH_CHECK(FUNCTION(igraph_vector, init)(v, (end - start)));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
 1689|       |
 1690|   392k|    for (p = v->stor_begin; p < v->end; p++) {
  ------------------
  |  Branch (1690:29): [True: 390k, False: 2.30k]
  ------------------
 1691|   390k|        *p = start;
 1692|   390k|        start = start + ONE;
  ------------------
  |  |   72|   390k|    #define ONE 1
  ------------------
 1693|   390k|    }
 1694|       |
 1695|  2.30k|    return IGRAPH_SUCCESS;
 1696|  2.30k|}
igraph_vector_int_remove_section:
 1716|  64.9k|        TYPE(igraph_vector) *v, igraph_int_t from, igraph_int_t to) {
 1717|  64.9k|    igraph_int_t size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  178|  64.9k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  64.9k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  64.9k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1718|       |
 1719|  64.9k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  64.9k|    do { \
  |  |  925|  64.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  64.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 64.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  64.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 64.9k]
  |  |  ------------------
  ------------------
 1720|  64.9k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  64.9k|    do { \
  |  |  925|  64.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  64.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 64.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  64.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 64.9k]
  |  |  ------------------
  ------------------
 1721|       |
 1722|  64.9k|    if (from < 0) {
  ------------------
  |  Branch (1722:9): [True: 0, False: 64.9k]
  ------------------
 1723|      0|        from = 0;
 1724|      0|    }
 1725|       |
 1726|  64.9k|    if (to > size) {
  ------------------
  |  Branch (1726:9): [True: 0, False: 64.9k]
  ------------------
 1727|      0|        to = size;
 1728|      0|    }
 1729|       |
 1730|  64.9k|    if (to > from) {
  ------------------
  |  Branch (1730:9): [True: 64.9k, False: 0]
  ------------------
 1731|  64.9k|        memmove(v->stor_begin + from, v->stor_begin + to,
 1732|  64.9k|                sizeof(BASE) * (v->end - v->stor_begin - to));
 1733|  64.9k|        v->end -= (to - from);
 1734|  64.9k|    }
 1735|  64.9k|}
igraph_vector_int_remove:
 1751|  64.9k|void FUNCTION(igraph_vector, remove)(TYPE(igraph_vector) *v, igraph_int_t elem) {
 1752|  64.9k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  64.9k|    do { \
  |  |  925|  64.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  64.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 64.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  64.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 64.9k]
  |  |  ------------------
  ------------------
 1753|  64.9k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  64.9k|    do { \
  |  |  925|  64.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  64.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 64.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  64.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 64.9k]
  |  |  ------------------
  ------------------
 1754|  64.9k|    FUNCTION(igraph_vector, remove_section)(v, elem, elem + 1);
  ------------------
  |  |  178|  64.9k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  64.9k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  64.9k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1755|  64.9k|}
igraph_vector_int_isininterval:
 1832|  55.9k|        BASE high) {
 1833|  55.9k|    BASE *ptr;
  ------------------
  |  |   66|  55.9k|    #define BASE igraph_int_t
  ------------------
 1834|  55.9k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  55.9k|    do { \
  |  |  925|  55.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  55.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 55.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  55.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 55.9k]
  |  |  ------------------
  ------------------
 1835|  55.9k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  55.9k|    do { \
  |  |  925|  55.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  55.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 55.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  55.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 55.9k]
  |  |  ------------------
  ------------------
 1836|  3.43M|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (1836:31): [True: 3.38M, False: 55.9k]
  ------------------
 1837|       |        /* Note that the following is not equivalent to *ptr < low || *ptr > high
 1838|       |         * when *ptr is NaN! */
 1839|  3.38M|        if (!(*ptr >= low && *ptr <= high)) {
  ------------------
  |  Branch (1839:15): [True: 3.38M, False: 0]
  |  Branch (1839:30): [True: 3.38M, False: 0]
  ------------------
 1840|      0|            return 0;
 1841|      0|        }
 1842|  3.38M|    }
 1843|  55.9k|    return 1;
 1844|  55.9k|}
igraph_vector_int_binsearch:
 2130|   129k|        BASE what, igraph_int_t *pos) {
 2131|   129k|    return FUNCTION(igraph_i_vector, binsearch_slice)(v, what, pos,
  ------------------
  |  |  178|   129k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   129k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   129k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2132|   129k|            0, FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  178|   129k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   129k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   129k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2133|   129k|}
igraph_vector_int_contains_sorted:
 2224|   137k|igraph_bool_t FUNCTION(igraph_vector, contains_sorted)(const TYPE(igraph_vector) *v, BASE what) {
 2225|   137k|    igraph_int_t left = 0;
 2226|   137k|    igraph_int_t right = FUNCTION(igraph_vector, size)(v) - 1;
  ------------------
  |  |  178|   137k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   137k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   137k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2227|       |
 2228|   293k|    while (left <= right) {
  ------------------
  |  Branch (2228:12): [True: 168k, False: 124k]
  ------------------
 2229|       |        /* (right + left) / 2 could theoretically overflow for long vectors */
 2230|   168k|        igraph_int_t middle = left + ((right - left) >> 1);
 2231|   168k|        if (what < VECTOR(*v)[middle]) {
  ------------------
  |  |   60|   168k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2231:13): [True: 71.8k, False: 97.0k]
  ------------------
 2232|  71.8k|            right = middle - 1;
 2233|  97.0k|        } else if (what > VECTOR(*v)[middle]) {
  ------------------
  |  |   60|  97.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2233:20): [True: 84.0k, False: 12.9k]
  ------------------
 2234|  84.0k|            left = middle + 1;
 2235|  84.0k|        } else {
 2236|  12.9k|            return true;
 2237|  12.9k|        }
 2238|   168k|    }
 2239|       |
 2240|   124k|    return false;
 2241|   137k|}
igraph_vector_int_append:
 2427|  1.66M|                                               const TYPE(igraph_vector) *from) {
 2428|  1.66M|    IGRAPH_ASSERT(to != NULL);
  ------------------
  |  |  924|  1.66M|    do { \
  |  |  925|  1.66M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.66M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.66M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.66M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.66M]
  |  |  ------------------
  ------------------
 2429|  1.66M|    IGRAPH_ASSERT(to->stor_begin != NULL);
  ------------------
  |  |  924|  1.66M|    do { \
  |  |  925|  1.66M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.66M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.66M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.66M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.66M]
  |  |  ------------------
  ------------------
 2430|       |
 2431|  1.66M|    const igraph_int_t to_size = FUNCTION(igraph_vector, size)(to);
  ------------------
  |  |  178|  1.66M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  1.66M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  1.66M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2432|  1.66M|    const igraph_int_t from_size = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  178|  1.66M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  1.66M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  1.66M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2433|  1.66M|    const igraph_int_t to_capacity = FUNCTION(igraph_vector, capacity)(to);
  ------------------
  |  |  178|  1.66M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  1.66M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  1.66M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2434|  1.66M|    igraph_int_t new_to_size;
 2435|       |
 2436|  1.66M|    IGRAPH_SAFE_ADD(to_size, from_size, &new_to_size);
  ------------------
  |  |   47|  1.66M|    do { \
  |  |   48|  1.66M|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  1.66M|        igraph_int_t _safe_sum; \
  |  |   50|  1.66M|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 1.66M]
  |  |  ------------------
  |  |   51|      0|            IGRAPH_ERRORF("Overflow when adding %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  464|      0|    do { \
  |  |  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  467|      0|        return igraph_errno; \
  |  |  |  |  468|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|        } \
  |  |   53|  1.66M|        *(res) = _safe_sum; \
  |  |   54|  1.66M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded, False: 1.66M]
  |  |  ------------------
  ------------------
 2437|       |
 2438|  1.66M|    if (to_capacity < new_to_size) {
  ------------------
  |  Branch (2438:9): [True: 0, False: 1.66M]
  ------------------
 2439|      0|        igraph_int_t new_to_capacity = to_capacity < IGRAPH_INTEGER_MAX/2 ? to_capacity * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_to_capacity = to_capacity < IGRAPH_INTEGER_MAX/2 ? to_capacity * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (2439:40): [True: 0, False: 0]
  ------------------
 2440|      0|        if (new_to_capacity < new_to_size) {
  ------------------
  |  Branch (2440:13): [True: 0, False: 0]
  ------------------
 2441|      0|            new_to_capacity = new_to_size;
 2442|      0|        }
 2443|      0|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(to, new_to_capacity));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2444|      0|    }
 2445|       |
 2446|  1.66M|    memcpy(to->stor_begin + to_size, from->stor_begin,
 2447|  1.66M|           sizeof(BASE) * from_size);
 2448|  1.66M|    to->end = to->stor_begin + new_to_size;
 2449|       |
 2450|  1.66M|    return IGRAPH_SUCCESS;
 2451|  1.66M|}
igraph_vector_int_update:
 2524|  2.42M|                                    const TYPE(igraph_vector) *from) {
 2525|  2.42M|    igraph_int_t n = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  178|  2.42M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  2.42M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  2.42M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2526|  2.42M|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(to, n));
  ------------------
  |  |  656|  2.42M|    do { \
  |  |  657|  2.42M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.42M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.42M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.42M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.42M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.42M]
  |  |  ------------------
  ------------------
 2527|  2.42M|    memcpy(to->stor_begin, from->stor_begin, sizeof(BASE)*n);
 2528|  2.42M|    return IGRAPH_SUCCESS;
 2529|  2.42M|}
igraph_vector_int_swap:
 2541|  2.44M|void FUNCTION(igraph_vector, swap)(TYPE(igraph_vector) *v1, TYPE(igraph_vector) *v2) {
 2542|       |
 2543|  2.44M|    TYPE(igraph_vector) tmp;
  ------------------
  |  |  179|  2.44M|        #define TYPE(a) CONCAT3(a,SHORT,t)
  |  |  ------------------
  |  |  |  |   22|  2.44M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  2.44M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2544|       |
 2545|  2.44M|    tmp = *v1;
 2546|  2.44M|    *v1 = *v2;
 2547|  2.44M|    *v2 = tmp;
 2548|  2.44M|}
vector.c:igraph_vector_int_sort_cmp:
  924|   120k|static int FUNCTION(igraph_vector, sort_cmp)(const void *a, const void *b) {
  925|   120k|    const BASE *da = (const BASE *) a;
  926|   120k|    const BASE *db = (const BASE *) b;
  927|       |
  928|   120k|    return (*da > *db) - (*da < *db);
  929|   120k|}
vector.c:igraph_i_vector_int_binsearch_slice:
 2183|   129k|        BASE what, igraph_int_t *pos, igraph_int_t start, igraph_int_t end) {
 2184|   129k|    igraph_int_t left  = start;
 2185|   129k|    igraph_int_t right = end - 1;
 2186|       |
 2187|   227k|    while (left <= right) {
  ------------------
  |  Branch (2187:12): [True: 162k, False: 64.9k]
  ------------------
 2188|       |        /* (right + left) / 2 could theoretically overflow for long vectors */
 2189|   162k|        igraph_int_t middle = left + ((right - left) >> 1);
 2190|   162k|        if (VECTOR(*v)[middle] > what) {
  ------------------
  |  |   60|   162k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2190:13): [True: 44.2k, False: 118k]
  ------------------
 2191|  44.2k|            right = middle - 1;
 2192|   118k|        } else if (VECTOR(*v)[middle] < what) {
  ------------------
  |  |   60|   118k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2192:20): [True: 53.6k, False: 64.9k]
  ------------------
 2193|  53.6k|            left = middle + 1;
 2194|  64.9k|        } else {
 2195|  64.9k|            if (pos != 0) {
  ------------------
  |  Branch (2195:17): [True: 64.9k, False: 0]
  ------------------
 2196|  64.9k|                *pos = middle;
 2197|  64.9k|            }
 2198|  64.9k|            return true;
 2199|  64.9k|        }
 2200|   162k|    }
 2201|       |
 2202|       |    /* if we are here, the element was not found */
 2203|  64.9k|    if (pos != 0) {
  ------------------
  |  Branch (2203:9): [True: 64.9k, False: 0]
  ------------------
 2204|  64.9k|        *pos = left;
 2205|  64.9k|    }
 2206|       |
 2207|       |    return false;
 2208|   129k|}

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

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

igraph_adjlist_init:
  155|  16.9k|                        igraph_bool_t multiple) {
  156|       |
  157|  16.9k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  158|  16.9k|    igraph_vector_int_t degrees;
  159|  16.9k|    int iter = 0;
  160|       |
  161|  16.9k|    multiple = !!multiple; /* normalize Boolean value to enable == comparisons below */
  162|       |
  163|  16.9k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (163:9): [True: 9.99k, False: 6.90k]
  |  Branch (163:30): [True: 0, False: 9.99k]
  |  Branch (163:52): [True: 0, False: 0]
  ------------------
  164|      0|        IGRAPH_ERROR("Cannot create adjacency list view.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  165|      0|    }
  166|       |
  167|  16.9k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (167:9): [True: 0, False: 16.9k]
  ------------------
  168|      0|        mode = IGRAPH_ALL;
  169|      0|    }
  170|       |
  171|  16.9k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  119|  16.9k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  16.9k|    do { \
  |  |  |  |  657|  16.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  16.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  16.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 16.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|  16.9k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 16.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  16.9k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  16.9k|    do { \
  |  |  |  |  604|  16.9k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  16.9k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  16.9k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  16.9k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 16.9k]
  |  |  |  |  ------------------
  |  |  |  |  608|  16.9k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  16.9k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 16.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 16.9k]
  |  |  ------------------
  ------------------
  172|       |    /* igraph_degree() is fast when loops=true */
  173|  16.9k|    IGRAPH_CHECK(igraph_degree(graph, &degrees, igraph_vss_all(), mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  16.9k|    do { \
  |  |  657|  16.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  16.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  16.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 16.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|  16.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 16.9k]
  |  |  ------------------
  ------------------
  174|       |
  175|  16.9k|    al->length = no_of_nodes;
  176|  16.9k|    al->adjs = IGRAPH_CALLOC(al->length, igraph_vector_int_t);
  ------------------
  |  |   33|  16.9k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  33.8k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 16.9k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 16.9k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 16.8k, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  177|  16.9k|    IGRAPH_CHECK_OOM(al->adjs, "Insufficient memory for creating adjacency list view.");
  ------------------
  |  |  709|  16.9k|    do { \
  |  |  710|  16.9k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  16.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 16.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|  16.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 16.9k]
  |  |  ------------------
  ------------------
  178|  16.9k|    IGRAPH_FINALLY(igraph_adjlist_destroy, al);
  ------------------
  |  |  603|  16.9k|    do { \
  |  |  604|  16.9k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  16.9k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  16.9k|         * incorrect destructor function with the pointer */ \
  |  |  607|  16.9k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 16.9k]
  |  |  ------------------
  |  |  608|  16.9k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  16.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 16.9k]
  |  |  ------------------
  ------------------
  179|       |
  180|       |    /* if we already know there are no multi-edges, they don't need to be removed */
  181|  16.9k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MULTI) &&
  ------------------
  |  Branch (181:9): [True: 11.5k, False: 5.39k]
  ------------------
  182|  11.5k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_MULTI)) {
  ------------------
  |  Branch (182:9): [True: 7.83k, False: 3.67k]
  ------------------
  183|       |
  184|       |        /* special case: if the graph is directed, but we are ignoring edge directions,
  185|       |         * mutual edges also act as multi-edges */
  186|  7.83k|        if (igraph_is_directed(graph) && mode == IGRAPH_ALL) {
  ------------------
  |  Branch (186:13): [True: 7.83k, False: 0]
  |  Branch (186:42): [True: 0, False: 7.83k]
  ------------------
  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|  7.83k|        } else {
  192|  7.83k|            multiple = IGRAPH_MULTIPLE;
  193|  7.83k|        }
  194|  7.83k|    }
  195|       |
  196|       |    /* if we already know there are no loops, they don't need to be removed */
  197|  16.9k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (197:9): [True: 11.5k, False: 5.39k]
  ------------------
  198|  11.5k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (198:9): [True: 7.69k, False: 3.81k]
  ------------------
  199|  7.69k|        if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (199:13): [True: 0, False: 7.69k]
  ------------------
  200|      0|            loops = IGRAPH_LOOPS_TWICE;
  201|  7.69k|        } else {
  202|  7.69k|            loops = IGRAPH_LOOPS_ONCE;
  203|  7.69k|        }
  204|  7.69k|    }
  205|       |
  206|  16.9k|    igraph_bool_t has_loops = false;
  207|  16.9k|    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|  2.93M|    for (igraph_int_t i = 0; i < al->length; i++) {
  ------------------
  |  Branch (215:30): [True: 2.92M, False: 16.9k]
  ------------------
  216|  2.92M|        IGRAPH_ALLOW_INTERRUPTION_LIMITED(iter, 1000);
  ------------------
  |  |   71|  2.92M|    do { \
  |  |   72|  2.92M|        if (++iter >= skips) { \
  |  |  ------------------
  |  |  |  Branch (72:13): [True: 0, False: 2.92M]
  |  |  ------------------
  |  |   73|      0|            IGRAPH_ALLOW_INTERRUPTION(); \
  |  |  ------------------
  |  |  |  |   46|      0|    do { \
  |  |  |  |   47|      0|        if (igraph_i_interruption_handler) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (47:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |  |  |   50|      0|            } \
  |  |  |  |   51|      0|        } \
  |  |  |  |   52|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   74|      0|            iter = 0; \
  |  |   75|      0|        } \
  |  |   76|  2.92M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (76:14): [Folded, False: 2.92M]
  |  |  ------------------
  ------------------
  217|       |
  218|  2.92M|        IGRAPH_CHECK(igraph_vector_int_init(&al->adjs[i], VECTOR(degrees)[i]));
  ------------------
  |  |  656|  2.92M|    do { \
  |  |  657|  2.92M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.92M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.92M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.92M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.92M]
  |  |  ------------------
  ------------------
  219|  2.92M|        IGRAPH_CHECK(igraph_neighbors(graph, &al->adjs[i], i, mode, IGRAPH_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.92M|    do { \
  |  |  657|  2.92M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.92M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.92M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.92M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.92M]
  |  |  ------------------
  ------------------
  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|  2.92M|        IGRAPH_CHECK(igraph_i_simplify_sorted_int_adjacency_vector_in_place(
  ------------------
  |  |  656|  2.92M|    do { \
  |  |  657|  2.92M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.92M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.92M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.92M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.92M]
  |  |  ------------------
  ------------------
  224|  2.92M|            &al->adjs[i], i, mode, loops, multiple, &has_loops, &has_multiple
  225|  2.92M|        ));
  226|  2.92M|    }
  227|  16.9k|    if (has_loops) {
  ------------------
  |  Branch (227:9): [True: 0, False: 16.9k]
  ------------------
  228|       |        /* If we have found at least one loop above, set the cache to true. */
  229|      0|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, true);
  230|  16.9k|    } else if (loops == IGRAPH_NO_LOOPS) {
  ------------------
  |  Branch (230:16): [True: 0, False: 16.9k]
  ------------------
  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|      0|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, false);
  236|      0|    }
  237|  16.9k|    if (has_multiple) {
  ------------------
  |  Branch (237:9): [True: 0, False: 16.9k]
  ------------------
  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|      0|        if (! igraph_is_directed(graph) || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (241:13): [True: 0, False: 0]
  |  Branch (241:44): [True: 0, False: 0]
  ------------------
  242|      0|            igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_MULTI, true);
  243|      0|        }
  244|  16.9k|    } else if (multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (244:16): [True: 0, False: 16.9k]
  ------------------
  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|      0|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_MULTI, false);
  250|      0|    }
  251|       |
  252|  16.9k|    igraph_vector_int_destroy(&degrees);
  253|  16.9k|    IGRAPH_FINALLY_CLEAN(2); /* + igraph_adjlist_destroy */
  254|       |
  255|  16.9k|    return IGRAPH_SUCCESS;
  256|  16.9k|}
igraph_adjlist_destroy:
  475|  16.9k|void igraph_adjlist_destroy(igraph_adjlist_t *al) {
  476|  2.93M|    for (igraph_int_t i = 0; i < al->length; i++) {
  ------------------
  |  Branch (476:30): [True: 2.92M, False: 16.9k]
  ------------------
  477|       |        /* This works if some igraph_vector_int_t's contain NULL,
  478|       |           because igraph_vector_int_destroy can handle this. */
  479|  2.92M|        igraph_vector_int_destroy(&al->adjs[i]);
  480|  2.92M|    }
  481|       |    IGRAPH_FREE(al->adjs);
  ------------------
  |  |   36|  16.9k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  482|  16.9k|}
igraph_adjlist_has_edge:
  626|  67.5k|        igraph_bool_t directed) {
  627|       |
  628|  67.5k|    const igraph_vector_int_t *fromvec;
  629|  67.5k|    ADJLIST_CANON_EDGE(from, to, directed);
  ------------------
  |  |  603|  67.5k|    do {                     \
  |  |  604|  67.5k|        igraph_int_t temp;         \
  |  |  605|  67.5k|        if ((!directed) && from < to) {     \
  |  |  ------------------
  |  |  |  Branch (605:13): [True: 0, False: 67.5k]
  |  |  |  Branch (605:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  606|      0|            temp = to;               \
  |  |  607|      0|            to = from;               \
  |  |  608|      0|            from = temp;             \
  |  |  609|      0|        }                      \
  |  |  610|  67.5k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (610:14): [Folded, False: 67.5k]
  |  |  ------------------
  ------------------
  630|  67.5k|    fromvec = igraph_adjlist_get(al, from);
  ------------------
  |  |   73|  67.5k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  631|  67.5k|    return igraph_vector_int_contains_sorted(fromvec, to);
  632|  67.5k|}
igraph_adjlist_replace_edge:
  637|  64.9k|        igraph_bool_t directed) {
  638|       |
  639|  64.9k|    igraph_vector_int_t *oldfromvec, *newfromvec;
  640|  64.9k|    igraph_bool_t found_old, found_new;
  641|  64.9k|    igraph_int_t oldpos, newpos;
  642|  64.9k|    igraph_int_t oldfrom = from, newfrom = from;
  643|       |
  644|  64.9k|    ADJLIST_CANON_EDGE(oldfrom, oldto, directed);
  ------------------
  |  |  603|  64.9k|    do {                     \
  |  |  604|  64.9k|        igraph_int_t temp;         \
  |  |  605|  64.9k|        if ((!directed) && from < to) {     \
  |  |  ------------------
  |  |  |  Branch (605:13): [True: 0, False: 64.9k]
  |  |  |  Branch (605:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  606|      0|            temp = to;               \
  |  |  607|      0|            to = from;               \
  |  |  608|      0|            from = temp;             \
  |  |  609|      0|        }                      \
  |  |  610|  64.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (610:14): [Folded, False: 64.9k]
  |  |  ------------------
  ------------------
  645|  64.9k|    ADJLIST_CANON_EDGE(newfrom, newto, directed);
  ------------------
  |  |  603|  64.9k|    do {                     \
  |  |  604|  64.9k|        igraph_int_t temp;         \
  |  |  605|  64.9k|        if ((!directed) && from < to) {     \
  |  |  ------------------
  |  |  |  Branch (605:13): [True: 0, False: 64.9k]
  |  |  |  Branch (605:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  606|      0|            temp = to;               \
  |  |  607|      0|            to = from;               \
  |  |  608|      0|            from = temp;             \
  |  |  609|      0|        }                      \
  |  |  610|  64.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (610:14): [Folded, False: 64.9k]
  |  |  ------------------
  ------------------
  646|       |
  647|  64.9k|    oldfromvec = igraph_adjlist_get(al, oldfrom);
  ------------------
  |  |   73|  64.9k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  648|  64.9k|    newfromvec = igraph_adjlist_get(al, newfrom);
  ------------------
  |  |   73|  64.9k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  649|       |
  650|       |    /* oldfrom -> oldto should exist; newfrom -> newto should not. */
  651|  64.9k|    found_old = igraph_vector_int_binsearch(oldfromvec, oldto, &oldpos);
  652|  64.9k|    if (! found_old) {
  ------------------
  |  Branch (652:9): [True: 0, False: 64.9k]
  ------------------
  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|  64.9k|    found_new = igraph_vector_int_binsearch(newfromvec, newto, &newpos);
  656|  64.9k|    if (found_new) {
  ------------------
  |  Branch (656:9): [True: 0, False: 64.9k]
  ------------------
  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|  64.9k|    if (oldfromvec != newfromvec) {
  ------------------
  |  Branch (660:9): [True: 0, False: 64.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|      0|        IGRAPH_CHECK(igraph_vector_int_insert(newfromvec, newpos, newto));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  665|      0|        igraph_vector_int_remove(oldfromvec, oldpos);
  666|  64.9k|    } 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|  64.9k|        igraph_vector_int_remove(oldfromvec, oldpos);
  670|  64.9k|        if (oldpos < newpos) {
  ------------------
  |  Branch (670:13): [True: 32.4k, False: 32.4k]
  ------------------
  671|  32.4k|            --newpos;
  672|  32.4k|        }
  673|  64.9k|        IGRAPH_CHECK(igraph_vector_int_insert(newfromvec, newpos, newto));
  ------------------
  |  |  656|  64.9k|    do { \
  |  |  657|  64.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  64.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  64.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 64.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|  64.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 64.9k]
  |  |  ------------------
  ------------------
  674|  64.9k|    }
  675|       |
  676|  64.9k|    return IGRAPH_SUCCESS;
  677|       |
  678|  64.9k|}
igraph_inclist_init:
  746|  1.08k|                        igraph_loops_t loops) {
  747|  1.08k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  748|  1.08k|    igraph_vector_int_t degrees;
  749|  1.08k|    int iter = 0;
  750|       |
  751|  1.08k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (751:9): [True: 1.08k, False: 0]
  |  Branch (751:30): [True: 0, False: 1.08k]
  |  Branch (751:52): [True: 0, False: 0]
  ------------------
  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|  1.08k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (755:9): [True: 0, False: 1.08k]
  ------------------
  756|      0|        mode = IGRAPH_ALL;
  757|      0|    }
  758|       |
  759|  1.08k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  119|  1.08k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.08k|    do { \
  |  |  |  |  657|  1.08k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.08k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.08k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, 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.08k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.08k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.08k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.08k|    do { \
  |  |  |  |  604|  1.08k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.08k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.08k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.08k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.08k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.08k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.08k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.08k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.08k]
  |  |  ------------------
  ------------------
  760|       |    /* igraph_degrees() is fast when loops=true */
  761|  1.08k|    IGRAPH_CHECK(igraph_degree(graph, &degrees, igraph_vss_all(), mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  1.08k|    do { \
  |  |  657|  1.08k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.08k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.08k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.08k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.08k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.08k]
  |  |  ------------------
  ------------------
  762|       |
  763|  1.08k|    il->length = no_of_nodes;
  764|  1.08k|    il->incs = IGRAPH_CALLOC(il->length, igraph_vector_int_t);
  ------------------
  |  |   33|  1.08k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  2.16k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.08k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.08k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.08k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  765|  1.08k|    if (il->incs == 0) {
  ------------------
  |  Branch (765:9): [True: 0, False: 1.08k]
  ------------------
  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|  1.08k|    IGRAPH_FINALLY(igraph_inclist_destroy, il);
  ------------------
  |  |  603|  1.08k|    do { \
  |  |  604|  1.08k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.08k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.08k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.08k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.08k]
  |  |  ------------------
  |  |  608|  1.08k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.08k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.08k]
  |  |  ------------------
  ------------------
  770|   150k|    for (igraph_int_t i = 0; i < il->length; i++) {
  ------------------
  |  Branch (770:30): [True: 149k, False: 1.08k]
  ------------------
  771|   149k|        IGRAPH_ALLOW_INTERRUPTION_LIMITED(iter, 1000);
  ------------------
  |  |   71|   149k|    do { \
  |  |   72|   149k|        if (++iter >= skips) { \
  |  |  ------------------
  |  |  |  Branch (72:13): [True: 0, False: 149k]
  |  |  ------------------
  |  |   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|   149k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (76:14): [Folded, False: 149k]
  |  |  ------------------
  ------------------
  772|       |
  773|   149k|        IGRAPH_CHECK(igraph_vector_int_init(&il->incs[i], VECTOR(degrees)[i]));
  ------------------
  |  |  656|   149k|    do { \
  |  |  657|   149k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   149k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   149k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 149k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   149k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 149k]
  |  |  ------------------
  ------------------
  774|   149k|        IGRAPH_CHECK(igraph_incident(graph, &il->incs[i], i, mode, loops));
  ------------------
  |  |  656|   149k|    do { \
  |  |  657|   149k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   149k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   149k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 149k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   149k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 149k]
  |  |  ------------------
  ------------------
  775|   149k|    }
  776|       |
  777|  1.08k|    igraph_vector_int_destroy(&degrees);
  778|  1.08k|    IGRAPH_FINALLY_CLEAN(2); /* + igraph_inclist_destroy */
  779|       |
  780|  1.08k|    return IGRAPH_SUCCESS;
  781|  1.08k|}
igraph_inclist_destroy:
  825|  1.08k|void igraph_inclist_destroy(igraph_inclist_t *il) {
  826|   150k|    for (igraph_int_t i = 0; i < il->length; i++) {
  ------------------
  |  Branch (826:30): [True: 149k, False: 1.08k]
  ------------------
  827|       |        /* This works if some igraph_vector_int_t's contain NULL,
  828|       |           because igraph_vector_int_destroy can handle this. */
  829|   149k|        igraph_vector_int_destroy(&il->incs[i]);
  830|   149k|    }
  831|       |    IGRAPH_FREE(il->incs);
  ------------------
  |  |   36|  1.08k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  832|  1.08k|}
igraph_lazy_adjlist_init:
 1070|  16.1k|                             igraph_bool_t multiple) {
 1071|  16.1k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1071:9): [True: 13.8k, False: 2.30k]
  |  Branch (1071:30): [True: 0, False: 13.8k]
  |  Branch (1071:52): [True: 0, False: 0]
  ------------------
 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|  16.1k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1075:9): [True: 0, False: 16.1k]
  ------------------
 1076|      0|        mode = IGRAPH_ALL;
 1077|      0|    }
 1078|       |
 1079|       |    /* if we already know there are no multi-edges, they don't need to be removed */
 1080|  16.1k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MULTI) &&
  ------------------
  |  Branch (1080:9): [True: 11.5k, False: 4.60k]
  ------------------
 1081|  11.5k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_MULTI)) {
  ------------------
  |  Branch (1081:9): [True: 7.83k, False: 3.67k]
  ------------------
 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.83k|        if (igraph_is_directed(graph) && mode == IGRAPH_ALL) {
  ------------------
  |  Branch (1085:13): [True: 7.83k, False: 0]
  |  Branch (1085:42): [True: 0, False: 7.83k]
  ------------------
 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.83k|        } else {
 1091|  7.83k|            multiple = IGRAPH_MULTIPLE;
 1092|  7.83k|        }
 1093|  7.83k|    }
 1094|       |
 1095|       |    /* if we already know there are no loops, they don't need to be removed */
 1096|  16.1k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (1096:9): [True: 12.2k, False: 3.84k]
  ------------------
 1097|  12.2k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (1097:9): [True: 7.69k, False: 4.57k]
  ------------------
 1098|  7.69k|        if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (1098:13): [True: 0, False: 7.69k]
  ------------------
 1099|      0|            loops = IGRAPH_LOOPS_TWICE;
 1100|  7.69k|        } else {
 1101|  7.69k|            loops = IGRAPH_LOOPS_ONCE;
 1102|  7.69k|        }
 1103|  7.69k|    }
 1104|       |
 1105|  16.1k|    al->mode = mode;
 1106|  16.1k|    al->loops = loops;
 1107|  16.1k|    al->multiple = multiple;
 1108|  16.1k|    al->graph = graph;
 1109|       |
 1110|  16.1k|    al->length = igraph_vcount(graph);
 1111|  16.1k|    al->adjs = IGRAPH_CALLOC(al->length, igraph_vector_int_t*);
  ------------------
  |  |   33|  16.1k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  32.2k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 16.1k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 16.1k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 16.1k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1112|  16.1k|    IGRAPH_CHECK_OOM(al->adjs, "Insufficient memory for creating lazy adjacency list view.");
  ------------------
  |  |  709|  16.1k|    do { \
  |  |  710|  16.1k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  16.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 16.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|  16.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 16.1k]
  |  |  ------------------
  ------------------
 1113|       |
 1114|  16.1k|    return IGRAPH_SUCCESS;
 1115|  16.1k|}
igraph_lazy_adjlist_destroy:
 1127|  16.1k|void igraph_lazy_adjlist_destroy(igraph_lazy_adjlist_t *al) {
 1128|  16.1k|    igraph_lazy_adjlist_clear(al);
 1129|       |    IGRAPH_FREE(al->adjs);
  ------------------
  |  |   36|  16.1k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1130|  16.1k|}
igraph_lazy_adjlist_clear:
 1140|  16.1k|void igraph_lazy_adjlist_clear(igraph_lazy_adjlist_t *al) {
 1141|  16.1k|    igraph_int_t i, n = al->length;
 1142|  2.74M|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (1142:17): [True: 2.73M, False: 16.1k]
  ------------------
 1143|  2.73M|        if (al->adjs[i] != 0) {
  ------------------
  |  Branch (1143:13): [True: 954k, False: 1.77M]
  ------------------
 1144|   954k|            igraph_vector_int_destroy(al->adjs[i]);
 1145|       |            IGRAPH_FREE(al->adjs[i]);
  ------------------
  |  |   36|   954k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1146|   954k|        }
 1147|  2.73M|    }
 1148|  16.1k|}
igraph_i_lazy_adjlist_get_real:
 1163|   954k|igraph_vector_int_t *igraph_i_lazy_adjlist_get_real(igraph_lazy_adjlist_t *al, igraph_int_t no) {
 1164|   954k|    igraph_error_t ret;
 1165|       |
 1166|   954k|    if (al->adjs[no] == NULL) {
  ------------------
  |  Branch (1166:9): [True: 954k, False: 0]
  ------------------
 1167|   954k|        al->adjs[no] = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   33|   954k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  1.90M|    (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: 954k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1168|   954k|        if (al->adjs[no] == NULL) {
  ------------------
  |  Branch (1168:13): [True: 0, False: 954k]
  ------------------
 1169|      0|            return NULL;
 1170|      0|        }
 1171|       |
 1172|   954k|        ret = igraph_vector_int_init(al->adjs[no], 0);
 1173|   954k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1173:13): [True: 0, False: 954k]
  ------------------
 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|   954k|        ret = igraph_neighbors(al->graph, al->adjs[no], no, al->mode, al->loops, al->multiple);
 1179|   954k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1179:13): [True: 0, False: 954k]
  ------------------
 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|   954k|    }
 1185|       |
 1186|   954k|    return al->adjs[no];
 1187|   954k|}
igraph_lazy_inclist_init:
 1232|  2.30k|                             igraph_loops_t loops) {
 1233|       |
 1234|  2.30k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1234:9): [True: 2.30k, False: 0]
  |  Branch (1234:30): [True: 0, False: 2.30k]
  |  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.30k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1238:9): [True: 0, False: 2.30k]
  ------------------
 1239|      0|        mode = IGRAPH_ALL;
 1240|      0|    }
 1241|       |
 1242|  2.30k|    il->graph = graph;
 1243|  2.30k|    il->loops = loops;
 1244|  2.30k|    il->mode = mode;
 1245|       |
 1246|  2.30k|    il->length = igraph_vcount(graph);
 1247|  2.30k|    il->incs = IGRAPH_CALLOC(il->length, igraph_vector_int_t*);
  ------------------
  |  |   33|  2.30k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.60k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.30k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.30k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.30k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1248|  2.30k|    if (il->incs == 0) {
  ------------------
  |  Branch (1248:9): [True: 0, False: 2.30k]
  ------------------
 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.30k|    return IGRAPH_SUCCESS;
 1253|       |
 1254|  2.30k|}
igraph_lazy_inclist_destroy:
 1267|  2.30k|void igraph_lazy_inclist_destroy(igraph_lazy_inclist_t *il) {
 1268|  2.30k|    igraph_lazy_inclist_clear(il);
 1269|       |    IGRAPH_FREE(il->incs);
  ------------------
  |  |   36|  2.30k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1270|  2.30k|}
igraph_lazy_inclist_clear:
 1281|  2.30k|void igraph_lazy_inclist_clear(igraph_lazy_inclist_t *il) {
 1282|  2.30k|    igraph_int_t i, n = il->length;
 1283|   392k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (1283:17): [True: 390k, False: 2.30k]
  ------------------
 1284|   390k|        if (il->incs[i] != 0) {
  ------------------
  |  Branch (1284:13): [True: 43.2k, False: 347k]
  ------------------
 1285|  43.2k|            igraph_vector_int_destroy(il->incs[i]);
 1286|       |            IGRAPH_FREE(il->incs[i]);
  ------------------
  |  |   36|  43.2k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1287|  43.2k|        }
 1288|   390k|    }
 1289|  2.30k|}
igraph_i_lazy_inclist_get_real:
 1304|  43.2k|igraph_vector_int_t *igraph_i_lazy_inclist_get_real(igraph_lazy_inclist_t *il, igraph_int_t no) {
 1305|  43.2k|    igraph_error_t ret;
 1306|       |
 1307|  43.2k|    if (il->incs[no] == NULL) {
  ------------------
  |  Branch (1307:9): [True: 43.2k, False: 0]
  ------------------
 1308|  43.2k|        il->incs[no] = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   33|  43.2k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  86.4k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 43.2k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1309|  43.2k|        if (il->incs[no] == NULL) {
  ------------------
  |  Branch (1309:13): [True: 0, False: 43.2k]
  ------------------
 1310|      0|            return NULL;
 1311|      0|        }
 1312|       |
 1313|  43.2k|        ret = igraph_vector_int_init(il->incs[no], 0);
 1314|  43.2k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1314:13): [True: 0, False: 43.2k]
  ------------------
 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|  43.2k|        ret = igraph_incident(il->graph, il->incs[no], no, il->mode, il->loops);
 1320|  43.2k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1320:13): [True: 0, False: 43.2k]
  ------------------
 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|  43.2k|    }
 1326|       |
 1327|  43.2k|    return il->incs[no];
 1328|  43.2k|}
adjlist.c:igraph_i_simplify_sorted_int_adjacency_vector_in_place:
  871|  2.92M|) {
  872|  2.92M|    igraph_bool_t dummy1 = true, dummy2 = true; /* set dummies to avoid uninitialized read */
  873|  2.92M|    if (has_loops == NULL) {
  ------------------
  |  Branch (873:9): [True: 0, False: 2.92M]
  ------------------
  874|      0|        has_loops = &dummy1;
  875|      0|    }
  876|  2.92M|    if (has_multiple == NULL) {
  ------------------
  |  Branch (876:9): [True: 0, False: 2.92M]
  ------------------
  877|      0|        has_multiple = &dummy2;
  878|      0|    }
  879|       |
  880|  2.92M|    igraph_int_t i, p = 0;
  881|  2.92M|    igraph_int_t n = igraph_vector_int_size(v);
  882|       |
  883|  2.92M|    multiple = !!multiple; /* normalize Boolean value to enable == comparisons below */
  884|       |
  885|  2.92M|    if (
  886|  2.92M|        multiple == IGRAPH_MULTIPLE &&
  ------------------
  |  Branch (886:9): [True: 2.92M, False: 0]
  ------------------
  887|  2.92M|        (
  888|  2.92M|            loops == IGRAPH_LOOPS_TWICE ||
  ------------------
  |  Branch (888:13): [True: 108k, False: 2.81M]
  ------------------
  889|  2.81M|            (loops == IGRAPH_LOOPS_ONCE && (mode == IGRAPH_IN || mode == IGRAPH_OUT))
  ------------------
  |  Branch (889:14): [True: 2.81M, False: 0]
  |  Branch (889:45): [True: 1.17M, False: 1.64M]
  |  Branch (889:66): [True: 1.64M, False: 0]
  ------------------
  890|  2.92M|        )
  891|  2.92M|    ) {
  892|       |        /* nothing to simplify */
  893|  2.92M|        return IGRAPH_SUCCESS;
  894|  2.92M|    }
  895|       |
  896|      0|    if (loops == IGRAPH_NO_LOOPS) {
  ------------------
  |  Branch (896:9): [True: 0, False: 0]
  ------------------
  897|      0|        if (multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (897:13): [True: 0, False: 0]
  ------------------
  898|       |            /* We need to get rid of loops and multiple edges completely */
  899|      0|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (899:25): [True: 0, False: 0]
  ------------------
  900|      0|                if (VECTOR(*v)[i] != index &&
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (900:21): [True: 0, False: 0]
  ------------------
  901|      0|                    (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i])) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i])) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (901:22): [True: 0, False: 0]
  |  Branch (901:36): [True: 0, False: 0]
  ------------------
  902|      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)
  ------------------
  903|      0|                    p++;
  904|      0|                } else {
  905|      0|                    if (VECTOR(*v)[i] == index) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (905:25): [True: 0, False: 0]
  ------------------
  906|      0|                        *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|      0|                        if (! *has_multiple) {
  ------------------
  |  Branch (909:29): [True: 0, False: 0]
  ------------------
  910|      0|                            if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (910:33): [True: 0, False: 0]
  ------------------
  911|       |                                /* Undirected loops appear twice in the neighbour list,
  912|       |                                 * so we check two following items instead of one. */
  913|      0|                                if (i < n - 2 &&
  ------------------
  |  Branch (913:37): [True: 0, False: 0]
  ------------------
  914|      0|                                    VECTOR(*v)[i + 1] == VECTOR(*v)[i] &&
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                                  VECTOR(*v)[i + 1] == VECTOR(*v)[i] &&
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (914:37): [True: 0, False: 0]
  ------------------
  915|      0|                                    VECTOR(*v)[i + 2] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                                  VECTOR(*v)[i + 2] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (915:37): [True: 0, False: 0]
  ------------------
  916|      0|                                    *has_multiple = true;
  917|      0|                                }
  918|      0|                            } 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|      0|                        }
  924|      0|                    } else if (i != n - 1 && VECTOR(*v)[i + 1] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  } else if (i != n - 1 && VECTOR(*v)[i + 1] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (924:32): [True: 0, False: 0]
  |  Branch (924:46): [True: 0, False: 0]
  ------------------
  925|      0|                        *has_multiple = true;
  926|      0|                    }
  927|      0|                }
  928|      0|            }
  929|      0|        } else {
  930|       |            /* We need to get rid of loops but keep multiple edges */
  931|      0|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (931:25): [True: 0, False: 0]
  ------------------
  932|      0|                if (VECTOR(*v)[i] != index) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (932:21): [True: 0, False: 0]
  ------------------
  933|      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)
  ------------------
  934|      0|                    p++;
  935|      0|                } else {
  936|      0|                    *has_loops = true;
  937|      0|                }
  938|      0|            }
  939|      0|        }
  940|      0|    } else if (loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (940:16): [True: 0, False: 0]
  ------------------
  941|      0|        if (multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (941:13): [True: 0, False: 0]
  ------------------
  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|      0|        } 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|      0|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (970:25): [True: 0, False: 0]
  ------------------
  971|      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)
  ------------------
  972|      0|                if (VECTOR(*v)[i] == index) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (972:21): [True: 0, False: 0]
  ------------------
  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|      0|                p++;
  981|      0|            }
  982|      0|        }
  983|      0|    } else if (loops == IGRAPH_LOOPS_TWICE && multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (983:16): [True: 0, False: 0]
  |  Branch (983:47): [True: 0, 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|      0|        for (i = 0; i < n; i++) {
  ------------------
  |  Branch (986:21): [True: 0, False: 0]
  ------------------
  987|      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 (987:17): [True: 0, False: 0]
  |  Branch (987:31): [True: 0, False: 0]
  ------------------
  988|      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)
  ------------------
  989|      0|                p++;
  990|      0|            } else {
  991|      0|                *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|      0|                if (VECTOR(*v)[i] == index) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (996:21): [True: 0, False: 0]
  ------------------
  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|      0|            }
 1010|      0|        }
 1011|      0|    } 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|      0|    igraph_vector_int_resize(v, p);
 1018|       |
 1019|      0|    return IGRAPH_SUCCESS;
 1020|      0|}

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

igraph_are_adjacent:
   50|  3.39k|                         igraph_bool_t *res) {
   51|       |
   52|  3.39k|    igraph_int_t nov = igraph_vcount(graph);
   53|  3.39k|    igraph_int_t eid = -1;
   54|       |
   55|  3.39k|    if (v1 < 0 || v2 < 0 || v1 > nov - 1 || v2 > nov - 1) {
  ------------------
  |  Branch (55:9): [True: 0, False: 3.39k]
  |  Branch (55:19): [True: 0, False: 3.39k]
  |  Branch (55:29): [True: 0, False: 3.39k]
  |  Branch (55:45): [True: 0, False: 3.39k]
  ------------------
   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.39k|    igraph_get_eid(graph, &eid, v1, v2, IGRAPH_DIRECTED, /*error=*/ false);
   60|  3.39k|    *res = (eid >= 0);
   61|       |
   62|  3.39k|    return IGRAPH_SUCCESS;
   63|  3.39k|}

igraph_i_property_cache_init:
   32|  25.4k|igraph_error_t igraph_i_property_cache_init(igraph_i_property_cache_t *cache) {
   33|  25.4k|    IGRAPH_STATIC_ASSERT(IGRAPH_PROP_I_SIZE <= 32);
  ------------------
  |  |   68|  25.4k|#define IGRAPH_STATIC_ASSERT(condition) ((void)sizeof(char[1 - 2*!(condition)]))
  ------------------
   34|       |
   35|  25.4k|    memset(cache->value, 0, sizeof(cache->value));
   36|  25.4k|    cache->known = 0;
   37|  25.4k|    return IGRAPH_SUCCESS;
   38|  25.4k|}
igraph_i_property_cache_copy:
   45|     60|        const igraph_i_property_cache_t *other_cache) {
   46|     60|    *cache = *other_cache;
   47|     60|    return IGRAPH_SUCCESS;
   48|     60|}
igraph_i_property_cache_destroy:
   53|  25.5k|void igraph_i_property_cache_destroy(igraph_i_property_cache_t *cache) {
   54|  25.5k|    IGRAPH_UNUSED(cache);
  ------------------
  |  |   30|  25.5k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
   55|       |    /* Nothing to do */
   56|  25.5k|}
igraph_i_property_cache_get_bool:
   72|  69.0k|igraph_bool_t igraph_i_property_cache_get_bool(const igraph_t *graph, igraph_cached_property_t prop) {
   73|  69.0k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  69.0k|    do { \
  |  |  925|  69.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   138k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 69.0k]
  |  |  |  |  |  Branch (612:52): [True: 69.0k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 69.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  69.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 69.0k]
  |  |  ------------------
  ------------------
   74|  69.0k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (74:5): [True: 0, False: 69.0k]
  |  Branch (74:5): [True: 69.0k, False: 0]
  ------------------
   75|  69.0k|    return graph->cache->value[prop];
   76|  69.0k|}
igraph_i_property_cache_has:
   84|  98.0k|igraph_bool_t igraph_i_property_cache_has(const igraph_t *graph, igraph_cached_property_t prop) {
   85|  98.0k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  98.0k|    do { \
  |  |  925|  98.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   196k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 98.0k]
  |  |  |  |  |  Branch (612:52): [True: 98.0k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 98.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  98.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 98.0k]
  |  |  ------------------
  ------------------
   86|  98.0k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (86:5): [True: 0, False: 98.0k]
  |  Branch (86:5): [True: 98.0k, False: 0]
  ------------------
   87|  98.0k|    return graph->cache->known & (1 << prop);
   88|  98.0k|}
igraph_i_property_cache_set_bool:
   97|  13.3k|void igraph_i_property_cache_set_bool(const igraph_t *graph, igraph_cached_property_t prop, igraph_bool_t value) {
   98|  13.3k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  13.3k|    do { \
  |  |  925|  13.3k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  26.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 13.3k]
  |  |  |  |  |  Branch (612:52): [True: 13.3k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 13.3k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
   99|  13.3k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (99:5): [True: 0, False: 13.3k]
  |  Branch (99:5): [True: 13.3k, 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|  13.3k|    graph->cache->value[prop] = value;
  104|  13.3k|    graph->cache->known |= (1 << prop);
  105|  13.3k|}
igraph_i_property_cache_set_bool_checked:
  123|  15.0k|void igraph_i_property_cache_set_bool_checked(const igraph_t *graph, igraph_cached_property_t prop, igraph_bool_t value) {
  124|  15.0k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  15.0k|    do { \
  |  |  925|  15.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  30.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.0k]
  |  |  |  |  |  Branch (612:52): [True: 15.0k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 15.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  15.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 15.0k]
  |  |  ------------------
  ------------------
  125|  15.0k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (125:5): [True: 0, False: 15.0k]
  |  Branch (125:5): [True: 15.0k, 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|  15.0k|    if (graph->cache->known & (1 << prop)) {
  ------------------
  |  Branch (129:9): [True: 1.66k, False: 13.3k]
  ------------------
  130|  1.66k|        IGRAPH_ASSERT(graph->cache->value[prop] == value);
  ------------------
  |  |  924|  1.66k|    do { \
  |  |  925|  1.66k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.66k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.66k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.66k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.66k]
  |  |  ------------------
  ------------------
  131|  13.3k|    } else {
  132|  13.3k|        igraph_i_property_cache_set_bool(graph, prop, value);
  133|  13.3k|    }
  134|  15.0k|}
igraph_i_property_cache_invalidate_conditionally:
  182|  60.2k|) {
  183|  60.2k|    uint32_t invalidate = ~keep_always;
  184|  60.2k|    uint32_t mask;
  185|  60.2k|    uint32_t maybe_keep;
  186|  60.2k|    igraph_bool_t cached_value;
  187|       |
  188|  60.2k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (188:5): [True: 0, False: 60.2k]
  |  Branch (188:5): [True: 60.2k, 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|  60.2k|    maybe_keep = graph->cache->known & invalidate & (keep_when_false | keep_when_true);
  197|       |
  198|  60.2k|    if (maybe_keep) {
  ------------------
  |  Branch (198:9): [True: 1.85k, False: 58.3k]
  ------------------
  199|  14.8k|        for (igraph_cached_property_t prop = (igraph_cached_property_t ) 0; prop < IGRAPH_PROP_I_SIZE; ++prop) {
  ------------------
  |  Branch (199:77): [True: 13.0k, False: 1.85k]
  ------------------
  200|  13.0k|            mask = 1 << prop;
  201|  13.0k|            if (maybe_keep & mask) {
  ------------------
  |  Branch (201:17): [True: 4.50k, False: 8.50k]
  ------------------
  202|       |                /* if we get here, we know that the property is cached; we have
  203|       |                 * masked maybe_keep with graph->cache->known */
  204|  4.50k|                cached_value = igraph_i_property_cache_get_bool(graph, prop);
  205|  4.50k|                if (
  206|  4.50k|                    ((keep_when_false & mask) && !cached_value) ||
  ------------------
  |  Branch (206:22): [True: 4.21k, False: 295]
  |  Branch (206:50): [True: 3.79k, False: 415]
  ------------------
  207|    710|                    ((keep_when_true & mask) && cached_value)
  ------------------
  |  Branch (207:22): [True: 295, False: 415]
  |  Branch (207:49): [True: 0, False: 295]
  ------------------
  208|  4.50k|                ) {
  209|  3.79k|                    invalidate &= ~mask;
  210|  3.79k|                }
  211|  4.50k|            }
  212|  13.0k|        }
  213|  1.85k|    }
  214|       |
  215|  60.2k|    graph->cache->known &= ~invalidate;
  216|  60.2k|}

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

igraph_vss_all:
  115|  54.4k|igraph_vs_t igraph_vss_all(void) {
  116|  54.4k|    igraph_vs_t allvs;
  117|  54.4k|    allvs.type = IGRAPH_VS_ALL;
  118|  54.4k|    return allvs;
  119|  54.4k|}
igraph_vss_1:
  292|  15.1k|igraph_vs_t igraph_vss_1(igraph_int_t vid) {
  293|  15.1k|    igraph_vs_t onevs;
  294|  15.1k|    onevs.type = IGRAPH_VS_1;
  295|  15.1k|    onevs.data.vid = vid;
  296|  15.1k|    return onevs;
  297|  15.1k|}
igraph_vss_vector:
  344|    746|igraph_vs_t igraph_vss_vector(const igraph_vector_int_t *v) {
  345|    746|    igraph_vs_t vecvs;
  346|    746|    vecvs.type = IGRAPH_VS_VECTORPTR;
  347|    746|    vecvs.data.vecptr = v;
  348|    746|    return vecvs;
  349|    746|}
igraph_vs_is_all:
  544|  5.45k|igraph_bool_t igraph_vs_is_all(const igraph_vs_t *vs) {
  545|  5.45k|    return vs->type == IGRAPH_VS_ALL;
  546|  5.45k|}
igraph_vs_size:
  611|    686|                   igraph_int_t *result) {
  612|    686|    igraph_vector_int_t vec;
  613|    686|    igraph_bool_t *seen;
  614|    686|    igraph_int_t i;
  615|    686|    igraph_int_t vec_len;
  616|       |
  617|    686|    switch (vs->type) {
  ------------------
  |  Branch (617:13): [True: 686, False: 0]
  ------------------
  618|      0|    case IGRAPH_VS_NONE:
  ------------------
  |  Branch (618:5): [True: 0, False: 686]
  ------------------
  619|      0|        *result = 0; return IGRAPH_SUCCESS;
  620|       |
  621|      0|    case IGRAPH_VS_1:
  ------------------
  |  Branch (621:5): [True: 0, False: 686]
  ------------------
  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: 686]
  ------------------
  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: 686]
  ------------------
  633|      0|        *result = igraph_vcount(graph); return IGRAPH_SUCCESS;
  634|       |
  635|      0|    case IGRAPH_VS_ADJ:
  ------------------
  |  Branch (635:5): [True: 0, False: 686]
  ------------------
  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: 686]
  ------------------
  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: 686]
  ------------------
  669|    686|    case IGRAPH_VS_VECTORPTR:
  ------------------
  |  Branch (669:5): [True: 686, False: 0]
  ------------------
  670|    686|        *result = igraph_vector_int_size(vs->data.vecptr);
  671|    686|        return IGRAPH_SUCCESS;
  672|    686|    }
  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|  68.0k|igraph_error_t igraph_vit_create(const igraph_t *graph, igraph_vs_t vs, igraph_vit_t *vit) {
  713|  68.0k|    igraph_vector_int_t vec;
  714|  68.0k|    igraph_vector_int_t *vec_int;
  715|  68.0k|    igraph_bool_t *seen;
  716|  68.0k|    igraph_int_t i, j, n;
  717|  68.0k|    igraph_int_t vec_len;
  718|       |
  719|  68.0k|    switch (vs.type) {
  720|  52.1k|    case IGRAPH_VS_ALL:
  ------------------
  |  Branch (720:5): [True: 52.1k, False: 15.9k]
  ------------------
  721|  52.1k|        vit->type = IGRAPH_VIT_RANGE;
  722|  52.1k|        vit->pos = 0;
  723|  52.1k|        vit->start = 0;
  724|  52.1k|        vit->end = igraph_vcount(graph);
  725|  52.1k|        break;
  726|      0|    case IGRAPH_VS_ADJ:
  ------------------
  |  Branch (726:5): [True: 0, False: 68.0k]
  ------------------
  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: 68.0k]
  ------------------
  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: 68.0k]
  ------------------
  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|  15.1k|    case IGRAPH_VS_1:
  ------------------
  |  Branch (796:5): [True: 15.1k, False: 52.9k]
  ------------------
  797|  15.1k|        vit->type = IGRAPH_VIT_RANGE;
  798|  15.1k|        vit->pos = vs.data.vid;
  799|  15.1k|        vit->start = vs.data.vid;
  800|  15.1k|        vit->end = vs.data.vid + 1;
  801|  15.1k|        if (vit->pos >= igraph_vcount(graph)) {
  ------------------
  |  Branch (801:13): [True: 0, False: 15.1k]
  ------------------
  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|  15.1k|        break;
  805|  15.1k|    case IGRAPH_VS_VECTORPTR:
  ------------------
  |  Branch (805:5): [True: 746, False: 67.3k]
  ------------------
  806|    746|    case IGRAPH_VS_VECTOR:
  ------------------
  |  Branch (806:5): [True: 0, False: 68.0k]
  ------------------
  807|    746|        vit->type = IGRAPH_VIT_VECTORPTR;
  808|    746|        vit->pos = 0;
  809|    746|        vit->start = 0;
  810|    746|        vit->vec = vs.data.vecptr;
  811|    746|        vit->end = igraph_vector_int_size(vit->vec);
  812|    746|        if (!igraph_vector_int_isininterval(vit->vec, 0, igraph_vcount(graph) - 1)) {
  ------------------
  |  Branch (812:13): [True: 0, False: 746]
  ------------------
  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|    746|        break;
  816|    746|    case IGRAPH_VS_RANGE:
  ------------------
  |  Branch (816:5): [True: 0, False: 68.0k]
  ------------------
  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: 68.0k]
  ------------------
  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|  68.0k|    }
  837|  68.0k|    return IGRAPH_SUCCESS;
  838|  68.0k|}
igraph_vit_destroy:
  853|  68.0k|void igraph_vit_destroy(const igraph_vit_t *vit) {
  854|  68.0k|    switch (vit->type) {
  855|  67.3k|    case IGRAPH_VIT_RANGE:
  ------------------
  |  Branch (855:5): [True: 67.3k, False: 746]
  ------------------
  856|  68.0k|    case IGRAPH_VIT_VECTORPTR:
  ------------------
  |  Branch (856:5): [True: 746, False: 67.3k]
  ------------------
  857|  68.0k|        break;
  858|      0|    case IGRAPH_VIT_VECTOR:
  ------------------
  |  Branch (858:5): [True: 0, False: 68.0k]
  ------------------
  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: 68.0k]
  ------------------
  863|       |        /*     IGRAPH_ERROR("Cannot destroy iterator, unknown type", IGRAPH_EINVAL); */
  864|      0|        break;
  865|  68.0k|    }
  866|  68.0k|}
igraph_vit_as_vector:
  868|    626|igraph_error_t igraph_vit_as_vector(const igraph_vit_t *vit, igraph_vector_int_t *v) {
  869|    626|    igraph_int_t i;
  870|       |
  871|    626|    IGRAPH_CHECK(igraph_vector_int_resize(v, IGRAPH_VIT_SIZE(*vit)));
  ------------------
  |  |  656|    626|    do { \
  |  |  657|    626|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    626|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    626|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 626]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    626|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 626]
  |  |  ------------------
  ------------------
  872|       |
  873|    626|    switch (vit->type) {
  874|      0|    case IGRAPH_VIT_RANGE:
  ------------------
  |  Branch (874:5): [True: 0, False: 626]
  ------------------
  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: 626]
  ------------------
  880|    626|    case IGRAPH_VIT_VECTORPTR:
  ------------------
  |  Branch (880:5): [True: 626, False: 0]
  ------------------
  881|  21.4k|        for (i = 0; i < IGRAPH_VIT_SIZE(*vit); i++) {
  ------------------
  |  |  190|  21.4k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  |  Branch (881:21): [True: 20.8k, False: 626]
  ------------------
  882|  20.8k|            VECTOR(*v)[i] = VECTOR(*vit->vec)[i];
  ------------------
  |  |   60|  20.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*v)[i] = VECTOR(*vit->vec)[i];
  ------------------
  |  |   60|  20.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  883|  20.8k|        }
  884|    626|        break;
  885|      0|    default:
  ------------------
  |  Branch (885:5): [True: 0, False: 626]
  ------------------
  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|    626|    }
  890|       |
  891|    626|    return IGRAPH_SUCCESS;
  892|    626|}
igraph_es_all:
  921|  16.3k|                  igraph_edgeorder_type_t order) {
  922|  16.3k|    switch (order) {
  923|  6.48k|    case IGRAPH_EDGEORDER_ID:
  ------------------
  |  Branch (923:5): [True: 6.48k, False: 9.91k]
  ------------------
  924|  6.48k|        es->type = IGRAPH_ES_ALL;
  925|  6.48k|        break;
  926|  5.31k|    case IGRAPH_EDGEORDER_FROM:
  ------------------
  |  Branch (926:5): [True: 5.31k, False: 11.0k]
  ------------------
  927|  5.31k|        es->type = IGRAPH_ES_ALLFROM;
  928|  5.31k|        break;
  929|  4.60k|    case IGRAPH_EDGEORDER_TO:
  ------------------
  |  Branch (929:5): [True: 4.60k, False: 11.7k]
  ------------------
  930|  4.60k|        es->type = IGRAPH_ES_ALLTO;
  931|  4.60k|        break;
  932|      0|    default:
  ------------------
  |  Branch (932:5): [True: 0, False: 16.3k]
  ------------------
  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|  16.3k|    }
  936|  16.3k|    return IGRAPH_SUCCESS;
  937|  16.3k|}
igraph_ess_all:
  953|  15.3k|igraph_es_t igraph_ess_all(igraph_edgeorder_type_t order) {
  954|  15.3k|    igraph_es_t es;
  955|  15.3k|    igraph_es_all(&es, order); /* cannot fail */
  956|  15.3k|    return es;
  957|  15.3k|}
igraph_ess_1:
 1058|  2.30k|igraph_es_t igraph_ess_1(igraph_int_t eid) {
 1059|  2.30k|    igraph_es_t es;
 1060|  2.30k|    es.type = IGRAPH_ES_1;
 1061|  2.30k|    es.data.eid = eid;
 1062|  2.30k|    return es;
 1063|  2.30k|}
igraph_ess_vector:
 1139|    840|igraph_es_t igraph_ess_vector(const igraph_vector_int_t *v) {
 1140|    840|    igraph_es_t es;
 1141|    840|    es.type = IGRAPH_ES_VECTORPTR;
 1142|    840|    es.data.vecptr = v;
 1143|    840|    return es;
 1144|    840|}
igraph_es_destroy:
 1408|  1.03k|void igraph_es_destroy(igraph_es_t *es) {
 1409|  1.03k|    switch (es->type) {
 1410|    295|    case IGRAPH_ES_ALL:
  ------------------
  |  Branch (1410:5): [True: 295, False: 735]
  ------------------
 1411|  1.03k|    case IGRAPH_ES_ALLFROM:
  ------------------
  |  Branch (1411:5): [True: 735, False: 295]
  ------------------
 1412|  1.03k|    case IGRAPH_ES_ALLTO:
  ------------------
  |  Branch (1412:5): [True: 0, False: 1.03k]
  ------------------
 1413|  1.03k|    case IGRAPH_ES_INCIDENT:
  ------------------
  |  Branch (1413:5): [True: 0, False: 1.03k]
  ------------------
 1414|  1.03k|    case IGRAPH_ES_NONE:
  ------------------
  |  Branch (1414:5): [True: 0, False: 1.03k]
  ------------------
 1415|  1.03k|    case IGRAPH_ES_1:
  ------------------
  |  Branch (1415:5): [True: 0, False: 1.03k]
  ------------------
 1416|  1.03k|    case IGRAPH_ES_VECTORPTR:
  ------------------
  |  Branch (1416:5): [True: 0, False: 1.03k]
  ------------------
 1417|  1.03k|    case IGRAPH_ES_RANGE:
  ------------------
  |  Branch (1417:5): [True: 0, False: 1.03k]
  ------------------
 1418|  1.03k|    case IGRAPH_ES_ALL_BETWEEN:
  ------------------
  |  Branch (1418:5): [True: 0, False: 1.03k]
  ------------------
 1419|  1.03k|        break;
 1420|      0|    case IGRAPH_ES_VECTOR:
  ------------------
  |  Branch (1420:5): [True: 0, False: 1.03k]
  ------------------
 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.03k]
  ------------------
 1425|      0|    case IGRAPH_ES_PATH:
  ------------------
  |  Branch (1425:5): [True: 0, False: 1.03k]
  ------------------
 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.03k]
  ------------------
 1430|      0|        break;
 1431|  1.03k|    }
 1432|  1.03k|}
igraph_es_is_all:
 1445|  3.84k|igraph_bool_t igraph_es_is_all(const igraph_es_t *es) {
 1446|  3.84k|    return es->type == IGRAPH_ES_ALL;
 1447|  3.84k|}
igraph_eit_create:
 1922|  18.3k|igraph_error_t igraph_eit_create(const igraph_t *graph, igraph_es_t es, igraph_eit_t *eit) {
 1923|  18.3k|    switch (es.type) {
 1924|  4.17k|    case IGRAPH_ES_ALL:
  ------------------
  |  Branch (1924:5): [True: 4.17k, False: 14.1k]
  ------------------
 1925|  4.17k|        eit->type = IGRAPH_EIT_RANGE;
 1926|  4.17k|        eit->pos = 0;
 1927|  4.17k|        eit->start = 0;
 1928|  4.17k|        eit->end = igraph_ecount(graph);
 1929|  4.17k|        break;
 1930|  5.31k|    case IGRAPH_ES_ALLFROM:
  ------------------
  |  Branch (1930:5): [True: 5.31k, False: 13.0k]
  ------------------
 1931|  5.31k|        IGRAPH_CHECK(igraph_i_eit_create_allfromto(graph, eit, IGRAPH_OUT));
  ------------------
  |  |  656|  5.31k|    do { \
  |  |  657|  5.31k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.31k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.31k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.31k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.31k]
  |  |  ------------------
  ------------------
 1932|  5.31k|        break;
 1933|  5.31k|    case IGRAPH_ES_ALLTO:
  ------------------
  |  Branch (1933:5): [True: 4.60k, False: 13.7k]
  ------------------
 1934|  4.60k|        IGRAPH_CHECK(igraph_i_eit_create_allfromto(graph, eit, IGRAPH_IN));
  ------------------
  |  |  656|  4.60k|    do { \
  |  |  657|  4.60k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.60k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.60k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.60k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.60k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.60k]
  |  |  ------------------
  ------------------
 1935|  4.60k|        break;
 1936|  4.60k|    case IGRAPH_ES_INCIDENT:
  ------------------
  |  Branch (1936:5): [True: 0, False: 18.3k]
  ------------------
 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: 18.3k]
  ------------------
 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.30k|    case IGRAPH_ES_1:
  ------------------
  |  Branch (1945:5): [True: 2.30k, False: 16.0k]
  ------------------
 1946|  2.30k|        eit->type = IGRAPH_EIT_RANGE;
 1947|  2.30k|        eit->pos = es.data.eid;
 1948|  2.30k|        eit->start = es.data.eid;
 1949|  2.30k|        eit->end = es.data.eid + 1;
 1950|  2.30k|        if (eit->pos >= igraph_ecount(graph)) {
  ------------------
  |  Branch (1950:13): [True: 0, False: 2.30k]
  ------------------
 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.30k|        break;
 1954|  2.30k|    case IGRAPH_ES_VECTOR:
  ------------------
  |  Branch (1954:5): [True: 0, False: 18.3k]
  ------------------
 1955|  1.92k|    case IGRAPH_ES_VECTORPTR:
  ------------------
  |  Branch (1955:5): [True: 1.92k, False: 16.3k]
  ------------------
 1956|  1.92k|        eit->type = IGRAPH_EIT_VECTORPTR;
 1957|  1.92k|        eit->pos = 0;
 1958|  1.92k|        eit->start = 0;
 1959|  1.92k|        eit->vec = es.data.vecptr;
 1960|  1.92k|        eit->end = igraph_vector_int_size(eit->vec);
 1961|  1.92k|        if (!igraph_vector_int_isininterval(eit->vec, 0, igraph_ecount(graph) - 1)) {
  ------------------
  |  Branch (1961:13): [True: 0, False: 1.92k]
  ------------------
 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|  1.92k|        break;
 1965|  1.92k|    case IGRAPH_ES_RANGE:
  ------------------
  |  Branch (1965:5): [True: 0, False: 18.3k]
  ------------------
 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: 18.3k]
  ------------------
 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: 18.3k]
  ------------------
 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: 18.3k]
  ------------------
 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: 18.3k]
  ------------------
 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|  18.3k|    }
 1995|  18.3k|    return IGRAPH_SUCCESS;
 1996|  18.3k|}
igraph_eit_destroy:
 2008|  18.3k|void igraph_eit_destroy(const igraph_eit_t *eit) {
 2009|  18.3k|    switch (eit->type) {
 2010|  6.48k|    case IGRAPH_EIT_RANGE:
  ------------------
  |  Branch (2010:5): [True: 6.48k, False: 11.8k]
  ------------------
 2011|  8.40k|    case IGRAPH_EIT_VECTORPTR:
  ------------------
  |  Branch (2011:5): [True: 1.92k, False: 16.3k]
  ------------------
 2012|  8.40k|        break;
 2013|  9.91k|    case IGRAPH_EIT_VECTOR:
  ------------------
  |  Branch (2013:5): [True: 9.91k, False: 8.40k]
  ------------------
 2014|  9.91k|        igraph_vector_int_destroy((igraph_vector_int_t*)eit->vec);
 2015|  9.91k|        igraph_free((igraph_vector_int_t*)eit->vec);
 2016|  9.91k|        break;
 2017|      0|    default:
  ------------------
  |  Branch (2017:5): [True: 0, False: 18.3k]
  ------------------
 2018|       |        /*     IGRAPH_ERROR("Cannot destroy iterator, unknown type", IGRAPH_EINVAL); */
 2019|      0|        break;
 2020|  18.3k|    }
 2021|  18.3k|}
iterators.c:igraph_i_eit_create_allfromto:
 1696|  9.91k|                                         igraph_neimode_t mode) {
 1697|  9.91k|    igraph_vector_int_t *vec;
 1698|  9.91k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
 1699|  9.91k|    igraph_int_t no_of_edges = igraph_ecount(graph);
 1700|       |
 1701|  9.91k|    vec = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   33|  9.91k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  19.8k|    (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: 9.91k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|  9.91k|    IGRAPH_CHECK_OOM(vec, "Cannot create edge iterator.");
  ------------------
  |  |  709|  9.91k|    do { \
  |  |  710|  9.91k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  9.91k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.91k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.91k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 9.91k]
  |  |  ------------------
  ------------------
 1703|  9.91k|    IGRAPH_FINALLY(igraph_free, vec);
  ------------------
  |  |  603|  9.91k|    do { \
  |  |  604|  9.91k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  9.91k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  9.91k|         * incorrect destructor function with the pointer */ \
  |  |  607|  9.91k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 9.91k]
  |  |  ------------------
  |  |  608|  9.91k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  9.91k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 9.91k]
  |  |  ------------------
  ------------------
 1704|       |
 1705|  9.91k|    IGRAPH_VECTOR_INT_INIT_FINALLY(vec, 0);
  ------------------
  |  |  119|  9.91k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  9.91k|    do { \
  |  |  |  |  657|  9.91k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  9.91k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  9.91k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.91k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  9.91k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 9.91k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  9.91k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  9.91k|    do { \
  |  |  |  |  604|  9.91k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  9.91k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  9.91k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  9.91k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 9.91k]
  |  |  |  |  ------------------
  |  |  |  |  608|  9.91k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  9.91k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 9.91k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 9.91k]
  |  |  ------------------
  ------------------
 1706|  9.91k|    IGRAPH_CHECK(igraph_vector_int_reserve(vec, no_of_edges));
  ------------------
  |  |  656|  9.91k|    do { \
  |  |  657|  9.91k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  9.91k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  9.91k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.91k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  9.91k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 9.91k]
  |  |  ------------------
  ------------------
 1707|       |
 1708|  9.91k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (1708:9): [True: 9.91k, False: 0]
  ------------------
 1709|  9.91k|        igraph_vector_int_t adj;
 1710|  9.91k|        IGRAPH_VECTOR_INT_INIT_FINALLY(&adj, 0);
  ------------------
  |  |  119|  9.91k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  9.91k|    do { \
  |  |  |  |  657|  9.91k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  9.91k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  9.91k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.91k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  9.91k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 9.91k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  9.91k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  9.91k|    do { \
  |  |  |  |  604|  9.91k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  9.91k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  9.91k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  9.91k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 9.91k]
  |  |  |  |  ------------------
  |  |  |  |  608|  9.91k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  9.91k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 9.91k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 9.91k]
  |  |  ------------------
  ------------------
 1711|  1.67M|        for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (1711:34): [True: 1.66M, False: 9.91k]
  ------------------
 1712|  1.66M|            IGRAPH_CHECK(igraph_incident(graph, &adj, i, mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  1.66M|    do { \
  |  |  657|  1.66M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.66M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.66M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.66M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.66M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.66M]
  |  |  ------------------
  ------------------
 1713|  1.66M|            igraph_vector_int_append(vec, &adj);  /* reserved */
 1714|  1.66M|        }
 1715|  9.91k|        igraph_vector_int_destroy(&adj);
 1716|  9.91k|        IGRAPH_FINALLY_CLEAN(1);
 1717|  9.91k|    } else {
 1718|      0|        igraph_vector_int_t adj;
 1719|      0|        igraph_bool_t *added;
 1720|      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]
  |  |  ------------------
  ------------------
 1721|      0|        added = IGRAPH_CALLOC(no_of_edges, igraph_bool_t);
  ------------------
  |  |   33|      0|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|      0|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 0, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1722|      0|        IGRAPH_CHECK_OOM(added, "Cannot create edge iterator.");
  ------------------
  |  |  709|      0|    do { \
  |  |  710|      0|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1723|      0|        IGRAPH_FINALLY(igraph_free, added);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1724|      0|        for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (1724:34): [True: 0, False: 0]
  ------------------
 1725|      0|            IGRAPH_CHECK(igraph_incident(graph, &adj, i, IGRAPH_ALL, IGRAPH_LOOPS));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1726|      0|            const igraph_int_t length = igraph_vector_int_size(&adj);
 1727|      0|            for (igraph_int_t j = 0; j < length; j++) {
  ------------------
  |  Branch (1727:38): [True: 0, False: 0]
  ------------------
 1728|      0|                if (!added[ VECTOR(adj)[j] ]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1728:21): [True: 0, False: 0]
  ------------------
 1729|      0|                    igraph_vector_int_push_back(vec, VECTOR(adj)[j]);  /* reserved */
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1730|      0|                    added[ VECTOR(adj)[j] ] = true;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1731|      0|                }
 1732|      0|            }
 1733|      0|        }
 1734|      0|        igraph_vector_int_destroy(&adj);
 1735|      0|        IGRAPH_FREE(added);
  ------------------
  |  |   36|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1736|      0|        IGRAPH_FINALLY_CLEAN(2);
 1737|      0|    }
 1738|       |
 1739|  9.91k|    eit->type = IGRAPH_EIT_VECTOR;
 1740|  9.91k|    eit->pos = 0;
 1741|  9.91k|    eit->start = 0;
 1742|  9.91k|    eit->vec = vec;
 1743|  9.91k|    eit->end = igraph_vector_int_size(eit->vec);
 1744|       |
 1745|  9.91k|    IGRAPH_FINALLY_CLEAN(2);
 1746|  9.91k|    return IGRAPH_SUCCESS;
 1747|  9.91k|}

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

igraph_empty_attrs:
  102|  23.1k|) {
  103|       |
  104|  23.1k|    if (n < 0) {
  ------------------
  |  Branch (104:9): [True: 0, False: 23.1k]
  ------------------
  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|  23.1k|    memset(graph, 0, sizeof(igraph_t));
  109|       |
  110|  23.1k|    graph->n = 0;
  111|  23.1k|    graph->directed = directed;
  112|  23.1k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->from, 0);
  ------------------
  |  |  119|  23.1k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  23.1k|    do { \
  |  |  |  |  657|  23.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  23.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  23.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.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|  23.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 23.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  23.1k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  23.1k|    do { \
  |  |  |  |  604|  23.1k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  23.1k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  23.1k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  23.1k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 23.1k]
  |  |  |  |  ------------------
  |  |  |  |  608|  23.1k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  23.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 23.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 23.1k]
  |  |  ------------------
  ------------------
  113|  23.1k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->to, 0);
  ------------------
  |  |  119|  23.1k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  23.1k|    do { \
  |  |  |  |  657|  23.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  23.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  23.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.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|  23.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 23.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  23.1k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  23.1k|    do { \
  |  |  |  |  604|  23.1k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  23.1k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  23.1k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  23.1k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 23.1k]
  |  |  |  |  ------------------
  |  |  |  |  608|  23.1k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  23.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 23.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 23.1k]
  |  |  ------------------
  ------------------
  114|  23.1k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->oi, 0);
  ------------------
  |  |  119|  23.1k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  23.1k|    do { \
  |  |  |  |  657|  23.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  23.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  23.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.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|  23.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 23.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  23.1k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  23.1k|    do { \
  |  |  |  |  604|  23.1k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  23.1k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  23.1k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  23.1k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 23.1k]
  |  |  |  |  ------------------
  |  |  |  |  608|  23.1k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  23.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 23.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 23.1k]
  |  |  ------------------
  ------------------
  115|  23.1k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->ii, 0);
  ------------------
  |  |  119|  23.1k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  23.1k|    do { \
  |  |  |  |  657|  23.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  23.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  23.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.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|  23.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 23.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  23.1k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  23.1k|    do { \
  |  |  |  |  604|  23.1k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  23.1k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  23.1k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  23.1k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 23.1k]
  |  |  |  |  ------------------
  |  |  |  |  608|  23.1k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  23.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 23.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 23.1k]
  |  |  ------------------
  ------------------
  116|  23.1k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->os, 1);
  ------------------
  |  |  119|  23.1k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  23.1k|    do { \
  |  |  |  |  657|  23.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  23.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  23.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.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|  23.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 23.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  23.1k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  23.1k|    do { \
  |  |  |  |  604|  23.1k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  23.1k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  23.1k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  23.1k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 23.1k]
  |  |  |  |  ------------------
  |  |  |  |  608|  23.1k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  23.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 23.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 23.1k]
  |  |  ------------------
  ------------------
  117|  23.1k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->is, 1);
  ------------------
  |  |  119|  23.1k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  23.1k|    do { \
  |  |  |  |  657|  23.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  23.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  23.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.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|  23.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 23.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  23.1k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  23.1k|    do { \
  |  |  |  |  604|  23.1k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  23.1k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  23.1k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  23.1k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 23.1k]
  |  |  |  |  ------------------
  |  |  |  |  608|  23.1k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  23.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 23.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 23.1k]
  |  |  ------------------
  ------------------
  118|       |
  119|       |    /* init cache */
  120|  23.1k|    graph->cache = IGRAPH_CALLOC(1, igraph_i_property_cache_t);
  ------------------
  |  |   33|  23.1k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  46.2k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 23.1k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  121|  23.1k|    IGRAPH_CHECK_OOM(graph->cache, "Cannot create graph.");
  ------------------
  |  |  709|  23.1k|    do { \
  |  |  710|  23.1k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  23.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.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|  23.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 23.1k]
  |  |  ------------------
  ------------------
  122|  23.1k|    IGRAPH_FINALLY(igraph_free, graph->cache);
  ------------------
  |  |  603|  23.1k|    do { \
  |  |  604|  23.1k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  23.1k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  23.1k|         * incorrect destructor function with the pointer */ \
  |  |  607|  23.1k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 23.1k]
  |  |  ------------------
  |  |  608|  23.1k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  23.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 23.1k]
  |  |  ------------------
  ------------------
  123|  23.1k|    IGRAPH_CHECK(igraph_i_property_cache_init(graph->cache));
  ------------------
  |  |  656|  23.1k|    do { \
  |  |  657|  23.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  23.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  23.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.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|  23.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 23.1k]
  |  |  ------------------
  ------------------
  124|  23.1k|    IGRAPH_FINALLY(igraph_i_property_cache_destroy, graph->cache);
  ------------------
  |  |  603|  23.1k|    do { \
  |  |  604|  23.1k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  23.1k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  23.1k|         * incorrect destructor function with the pointer */ \
  |  |  607|  23.1k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 23.1k]
  |  |  ------------------
  |  |  608|  23.1k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  23.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 23.1k]
  |  |  ------------------
  ------------------
  125|       |
  126|  23.1k|    VECTOR(graph->os)[0] = 0;
  ------------------
  |  |   60|  23.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  127|  23.1k|    VECTOR(graph->is)[0] = 0;
  ------------------
  |  |   60|  23.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  128|       |
  129|       |    /* init attributes */
  130|  23.1k|    IGRAPH_CHECK(igraph_i_attribute_init(graph, attr));
  ------------------
  |  |  656|  23.1k|    do { \
  |  |  657|  23.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  23.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  23.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.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|  23.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 23.1k]
  |  |  ------------------
  ------------------
  131|       |
  132|       |    /* add the vertices */
  133|  23.1k|    IGRAPH_CHECK(igraph_add_vertices(graph, n, 0));
  ------------------
  |  |  656|  23.1k|    do { \
  |  |  657|  23.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  23.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  23.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.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|  23.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 23.1k]
  |  |  ------------------
  ------------------
  134|       |
  135|  23.1k|    IGRAPH_FINALLY_CLEAN(8);
  136|  23.1k|    return IGRAPH_SUCCESS;
  137|  23.1k|}
igraph_destroy:
  155|  25.5k|void igraph_destroy(igraph_t *graph) {
  156|  25.5k|    igraph_i_attribute_destroy(graph);
  157|       |
  158|  25.5k|    igraph_i_property_cache_destroy(graph->cache);
  159|  25.5k|    IGRAPH_FREE(graph->cache);
  ------------------
  |  |   36|  25.5k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  160|       |
  161|  25.5k|    igraph_vector_int_destroy(&graph->from);
  162|  25.5k|    igraph_vector_int_destroy(&graph->to);
  163|  25.5k|    igraph_vector_int_destroy(&graph->oi);
  164|  25.5k|    igraph_vector_int_destroy(&graph->ii);
  165|  25.5k|    igraph_vector_int_destroy(&graph->os);
  166|  25.5k|    igraph_vector_int_destroy(&graph->is);
  167|  25.5k|}
igraph_copy:
  195|     60|igraph_error_t igraph_copy(igraph_t *to, const igraph_t *from) {
  196|     60|    memset(to, 0, sizeof(igraph_t));
  197|       |
  198|     60|    to->n = from->n;
  199|     60|    to->directed = from->directed;
  200|     60|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->from, &from->from));
  ------------------
  |  |  656|     60|    do { \
  |  |  657|     60|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     60|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     60|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 60]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
  201|     60|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->from);
  ------------------
  |  |  603|     60|    do { \
  |  |  604|     60|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     60|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     60|         * incorrect destructor function with the pointer */ \
  |  |  607|     60|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 60]
  |  |  ------------------
  |  |  608|     60|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     60|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
  202|     60|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->to, &from->to));
  ------------------
  |  |  656|     60|    do { \
  |  |  657|     60|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     60|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     60|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 60]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
  203|     60|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->to);
  ------------------
  |  |  603|     60|    do { \
  |  |  604|     60|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     60|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     60|         * incorrect destructor function with the pointer */ \
  |  |  607|     60|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 60]
  |  |  ------------------
  |  |  608|     60|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     60|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
  204|     60|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->oi, &from->oi));
  ------------------
  |  |  656|     60|    do { \
  |  |  657|     60|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     60|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     60|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 60]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
  205|     60|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->oi);
  ------------------
  |  |  603|     60|    do { \
  |  |  604|     60|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     60|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     60|         * incorrect destructor function with the pointer */ \
  |  |  607|     60|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 60]
  |  |  ------------------
  |  |  608|     60|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     60|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
  206|     60|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->ii, &from->ii));
  ------------------
  |  |  656|     60|    do { \
  |  |  657|     60|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     60|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     60|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 60]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
  207|     60|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->ii);
  ------------------
  |  |  603|     60|    do { \
  |  |  604|     60|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     60|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     60|         * incorrect destructor function with the pointer */ \
  |  |  607|     60|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 60]
  |  |  ------------------
  |  |  608|     60|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     60|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
  208|     60|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->os, &from->os));
  ------------------
  |  |  656|     60|    do { \
  |  |  657|     60|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     60|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     60|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 60]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
  209|     60|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->os);
  ------------------
  |  |  603|     60|    do { \
  |  |  604|     60|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     60|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     60|         * incorrect destructor function with the pointer */ \
  |  |  607|     60|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 60]
  |  |  ------------------
  |  |  608|     60|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     60|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
  210|     60|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->is, &from->is));
  ------------------
  |  |  656|     60|    do { \
  |  |  657|     60|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     60|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     60|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 60]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
  211|     60|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->is);
  ------------------
  |  |  603|     60|    do { \
  |  |  604|     60|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     60|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     60|         * incorrect destructor function with the pointer */ \
  |  |  607|     60|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 60]
  |  |  ------------------
  |  |  608|     60|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     60|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
  212|       |
  213|     60|    to->cache = IGRAPH_CALLOC(1, igraph_i_property_cache_t);
  ------------------
  |  |   33|     60|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|    120|    (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: 60, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  214|     60|    IGRAPH_CHECK_OOM(to->cache, "Cannot copy graph.");
  ------------------
  |  |  709|     60|    do { \
  |  |  710|     60|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|     60|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 60]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|     60|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
  215|     60|    IGRAPH_FINALLY(igraph_free, to->cache);
  ------------------
  |  |  603|     60|    do { \
  |  |  604|     60|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     60|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     60|         * incorrect destructor function with the pointer */ \
  |  |  607|     60|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 60]
  |  |  ------------------
  |  |  608|     60|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     60|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
  216|     60|    IGRAPH_CHECK(igraph_i_property_cache_copy(to->cache, from->cache));
  ------------------
  |  |  656|     60|    do { \
  |  |  657|     60|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     60|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     60|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 60]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
  217|     60|    IGRAPH_FINALLY(igraph_i_property_cache_destroy, to->cache);
  ------------------
  |  |  603|     60|    do { \
  |  |  604|     60|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     60|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     60|         * incorrect destructor function with the pointer */ \
  |  |  607|     60|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 60]
  |  |  ------------------
  |  |  608|     60|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     60|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
  218|       |
  219|     60|    IGRAPH_CHECK(igraph_i_attribute_copy(to, from, true, true, true));
  ------------------
  |  |  656|     60|    do { \
  |  |  657|     60|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     60|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     60|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 60]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
  220|       |
  221|     60|    IGRAPH_FINALLY_CLEAN(8);
  222|     60|    return IGRAPH_SUCCESS;
  223|     60|}
igraph_add_edges:
  257|  25.5k|) {
  258|  25.5k|    igraph_int_t no_of_edges = igraph_vector_int_size(&graph->from);
  259|  25.5k|    igraph_int_t edges_to_add = igraph_vector_int_size(edges) / 2;
  260|  25.5k|    igraph_int_t new_no_of_edges;
  261|  25.5k|    igraph_int_t i = 0;
  262|  25.5k|    igraph_vector_int_t newoi, newii;
  263|  25.5k|    igraph_bool_t directed = igraph_is_directed(graph);
  264|       |
  265|  25.5k|    if (igraph_vector_int_size(edges) % 2 != 0) {
  ------------------
  |  Branch (265:9): [True: 0, False: 25.5k]
  ------------------
  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|  25.5k|    if (!igraph_vector_int_isininterval(edges, 0, igraph_vcount(graph) - 1)) {
  ------------------
  |  Branch (268:9): [True: 0, False: 25.5k]
  ------------------
  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|  25.5k|    IGRAPH_SAFE_ADD(no_of_edges, edges_to_add, &new_no_of_edges);
  ------------------
  |  |   47|  25.5k|    do { \
  |  |   48|  25.5k|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  25.5k|        igraph_int_t _safe_sum; \
  |  |   50|  25.5k|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 25.5k]
  |  |  ------------------
  |  |   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|  25.5k|        *(res) = _safe_sum; \
  |  |   54|  25.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded, False: 25.5k]
  |  |  ------------------
  ------------------
  274|  25.5k|    if (new_no_of_edges > IGRAPH_ECOUNT_MAX) {
  ------------------
  |  |  118|  25.5k|#define IGRAPH_ECOUNT_MAX (IGRAPH_INTEGER_MAX/2)
  |  |  ------------------
  |  |  |  |   72|  25.5k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  |  |  ------------------
  ------------------
  |  Branch (274:9): [True: 0, False: 25.5k]
  ------------------
  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|  25.5k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->from, no_of_edges + edges_to_add));
  ------------------
  |  |  656|  25.5k|    do { \
  |  |  657|  25.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  25.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  25.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 25.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|  25.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 25.5k]
  |  |  ------------------
  ------------------
  279|  25.5k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->to, no_of_edges + edges_to_add));
  ------------------
  |  |  656|  25.5k|    do { \
  |  |  657|  25.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  25.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  25.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 25.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|  25.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 25.5k]
  |  |  ------------------
  ------------------
  280|       |
  281|   846k|    while (i < edges_to_add * 2) {
  ------------------
  |  Branch (281:12): [True: 821k, False: 25.5k]
  ------------------
  282|   821k|        if (directed || VECTOR(*edges)[i] > VECTOR(*edges)[i + 1]) {
  ------------------
  |  |   60|   422k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (directed || VECTOR(*edges)[i] > VECTOR(*edges)[i + 1]) {
  ------------------
  |  |   60|   422k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (282:13): [True: 398k, False: 422k]
  |  Branch (282:25): [True: 63.8k, False: 358k]
  ------------------
  283|   462k|            igraph_vector_int_push_back(&graph->from, VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|   462k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  284|   462k|            igraph_vector_int_push_back(&graph->to,   VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|   462k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  285|   462k|        } else {
  286|   358k|            igraph_vector_int_push_back(&graph->to,   VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|   358k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  287|   358k|            igraph_vector_int_push_back(&graph->from, VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|   358k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  288|   358k|        }
  289|   821k|    }
  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|  25.5k|#define CHECK_ERR(expr) \
  299|  25.5k|    do { \
  300|  25.5k|        igraph_error_t err = (expr); \
  301|  25.5k|        if (err != IGRAPH_SUCCESS) { \
  302|  25.5k|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  303|  25.5k|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  304|  25.5k|            IGRAPH_FINALLY_EXIT(); \
  305|  25.5k|            IGRAPH_ERROR("Cannot add edges.", err); \
  306|  25.5k|        } \
  307|  25.5k|    } while (0)
  308|       |
  309|       |    /* oi & ii */
  310|  25.5k|    IGRAPH_FINALLY_ENTER();
  311|  25.5k|    {
  312|  25.5k|        CHECK_ERR(igraph_vector_int_init(&newoi, no_of_edges));
  ------------------
  |  |  299|  25.5k|    do { \
  |  |  300|  25.5k|        igraph_error_t err = (expr); \
  |  |  301|  25.5k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (301:13): [True: 0, False: 25.5k]
  |  |  ------------------
  |  |  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|  25.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (307:14): [Folded, False: 25.5k]
  |  |  ------------------
  ------------------
  313|  25.5k|        IGRAPH_FINALLY(igraph_vector_int_destroy, &newoi);
  ------------------
  |  |  603|  25.5k|    do { \
  |  |  604|  25.5k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  25.5k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  25.5k|         * incorrect destructor function with the pointer */ \
  |  |  607|  25.5k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 25.5k]
  |  |  ------------------
  |  |  608|  25.5k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  25.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 25.5k]
  |  |  ------------------
  ------------------
  314|  25.5k|        CHECK_ERR(igraph_vector_int_init(&newii, no_of_edges));
  ------------------
  |  |  299|  25.5k|    do { \
  |  |  300|  25.5k|        igraph_error_t err = (expr); \
  |  |  301|  25.5k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (301:13): [True: 0, False: 25.5k]
  |  |  ------------------
  |  |  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|  25.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (307:14): [Folded, False: 25.5k]
  |  |  ------------------
  ------------------
  315|  25.5k|        IGRAPH_FINALLY(igraph_vector_int_destroy, &newii);
  ------------------
  |  |  603|  25.5k|    do { \
  |  |  604|  25.5k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  25.5k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  25.5k|         * incorrect destructor function with the pointer */ \
  |  |  607|  25.5k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 25.5k]
  |  |  ------------------
  |  |  608|  25.5k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  25.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 25.5k]
  |  |  ------------------
  ------------------
  316|  25.5k|        CHECK_ERR(igraph_vector_int_pair_order(&graph->from, &graph->to, &newoi, graph->n));
  ------------------
  |  |  299|  25.5k|    do { \
  |  |  300|  25.5k|        igraph_error_t err = (expr); \
  |  |  301|  25.5k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (301:13): [True: 0, False: 25.5k]
  |  |  ------------------
  |  |  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|  25.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (307:14): [Folded, False: 25.5k]
  |  |  ------------------
  ------------------
  317|  25.5k|        CHECK_ERR(igraph_vector_int_pair_order(&graph->to, &graph->from, &newii, graph->n));
  ------------------
  |  |  299|  25.5k|    do { \
  |  |  300|  25.5k|        igraph_error_t err = (expr); \
  |  |  301|  25.5k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (301:13): [True: 0, False: 25.5k]
  |  |  ------------------
  |  |  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|  25.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (307:14): [Folded, False: 25.5k]
  |  |  ------------------
  ------------------
  318|       |
  319|       |        /* Attributes */
  320|  25.5k|        if (graph->attr) {
  ------------------
  |  Branch (320:13): [True: 0, False: 25.5k]
  ------------------
  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|  25.5k|        igraph_i_create_start_vectors(&graph->os, &graph->from, &newoi, graph->n);
  327|  25.5k|        igraph_i_create_start_vectors(&graph->is, &graph->to, &newii, graph->n);
  328|       |
  329|       |        /* everything went fine */
  330|  25.5k|        igraph_vector_int_destroy(&graph->oi);
  331|  25.5k|        igraph_vector_int_destroy(&graph->ii);
  332|  25.5k|        IGRAPH_FINALLY_CLEAN(2);
  333|       |
  334|  25.5k|        graph->oi = newoi;
  335|  25.5k|        graph->ii = newii;
  336|  25.5k|    }
  337|      0|    IGRAPH_FINALLY_EXIT();
  338|       |
  339|  25.5k|#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|  25.5k|    igraph_i_property_cache_invalidate_conditionally(
  354|  25.5k|        graph,
  355|  25.5k|        /* keep_always = */ 0,
  356|       |        /* keep_when_false = */
  357|  25.5k|        (1 << IGRAPH_PROP_IS_DAG) | (1 << IGRAPH_PROP_IS_FOREST),
  358|       |        /* keep_when_true = */
  359|  25.5k|        (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED) |
  360|  25.5k|        (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  361|  25.5k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  362|  25.5k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  363|  25.5k|        (1 << IGRAPH_PROP_HAS_MUTUAL)
  364|  25.5k|    );
  365|       |
  366|  25.5k|    return IGRAPH_SUCCESS;
  367|  25.5k|}
igraph_add_vertices:
  391|  27.3k|) {
  392|  27.3k|    igraph_int_t ec = igraph_ecount(graph);
  393|  27.3k|    igraph_int_t vc = igraph_vcount(graph);
  394|  27.3k|    igraph_int_t new_vc;
  395|  27.3k|    igraph_int_t i;
  396|       |
  397|  27.3k|    if (nv < 0) {
  ------------------
  |  Branch (397:9): [True: 0, False: 27.3k]
  ------------------
  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|  27.3k|    IGRAPH_SAFE_ADD(graph->n, nv, &new_vc);
  ------------------
  |  |   47|  27.3k|    do { \
  |  |   48|  27.3k|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  27.3k|        igraph_int_t _safe_sum; \
  |  |   50|  27.3k|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 27.3k]
  |  |  ------------------
  |  |   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|  27.3k|        *(res) = _safe_sum; \
  |  |   54|  27.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded, False: 27.3k]
  |  |  ------------------
  ------------------
  402|  27.3k|    if (new_vc > IGRAPH_VCOUNT_MAX) {
  ------------------
  |  |  100|  27.3k|#define IGRAPH_VCOUNT_MAX (IGRAPH_INTEGER_MAX-1)
  |  |  ------------------
  |  |  |  |   72|  27.3k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  |  |  ------------------
  ------------------
  |  Branch (402:9): [True: 0, False: 27.3k]
  ------------------
  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|  27.3k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->os, new_vc + 1));
  ------------------
  |  |  656|  27.3k|    do { \
  |  |  657|  27.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  27.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  27.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 27.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|  27.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 27.3k]
  |  |  ------------------
  ------------------
  407|  27.3k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->is, new_vc + 1));
  ------------------
  |  |  656|  27.3k|    do { \
  |  |  657|  27.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  27.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  27.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 27.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|  27.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 27.3k]
  |  |  ------------------
  ------------------
  408|       |
  409|  27.3k|    igraph_vector_int_resize(&graph->os, new_vc + 1); /* reserved */
  410|  27.3k|    igraph_vector_int_resize(&graph->is, new_vc + 1); /* reserved */
  411|  6.26M|    for (i = graph->n + 1; i < new_vc + 1; i++) {
  ------------------
  |  Branch (411:28): [True: 6.23M, False: 27.3k]
  ------------------
  412|  6.23M|        VECTOR(graph->os)[i] = ec;
  ------------------
  |  |   60|  6.23M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  413|  6.23M|        VECTOR(graph->is)[i] = ec;
  ------------------
  |  |   60|  6.23M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  414|  6.23M|    }
  415|       |
  416|  27.3k|    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|  27.3k|    if (graph->attr) {
  ------------------
  |  Branch (422:9): [True: 0, False: 27.3k]
  ------------------
  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|  27.3k|    igraph_i_property_cache_invalidate_conditionally(
  458|  27.3k|        graph,
  459|       |        /* keep_always = */
  460|  27.3k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  461|  27.3k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  462|  27.3k|        (1 << IGRAPH_PROP_HAS_MUTUAL) |
  463|  27.3k|        (1 << IGRAPH_PROP_IS_DAG) |
  464|  27.3k|        (1 << IGRAPH_PROP_IS_FOREST),
  465|       |        /* keep_when_false = */
  466|  27.3k|        igraph_vcount(graph) >= 2 ? (
  ------------------
  |  Branch (466:9): [True: 26.5k, False: 767]
  ------------------
  467|  26.5k|            (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  468|  26.5k|            (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED)
  469|  26.5k|        ) : 0,
  470|       |        /* keep_when_true = */
  471|  27.3k|        0
  472|  27.3k|    );
  473|       |
  474|  27.3k|    return IGRAPH_SUCCESS;
  475|  27.3k|}
igraph_delete_edges:
  500|  5.02k|igraph_error_t igraph_delete_edges(igraph_t *graph, igraph_es_t edges) {
  501|  5.02k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  502|  5.02k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  503|  5.02k|    igraph_int_t edges_to_remove = 0;
  504|  5.02k|    igraph_int_t remaining_edges;
  505|  5.02k|    igraph_eit_t eit;
  506|       |
  507|  5.02k|    igraph_vector_int_t newfrom, newto;
  508|  5.02k|    igraph_vector_int_t newoi, newii;
  509|       |
  510|  5.02k|    igraph_bool_t *mark;
  511|  5.02k|    igraph_int_t i, j;
  512|       |
  513|  5.02k|    mark = IGRAPH_CALLOC(no_of_edges, igraph_bool_t);
  ------------------
  |  |   33|  5.02k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  10.0k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 5.02k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 5.02k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 5.02k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  514|  5.02k|    IGRAPH_CHECK_OOM(mark, "Cannot delete edges.");
  ------------------
  |  |  709|  5.02k|    do { \
  |  |  710|  5.02k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  5.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.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|  5.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 5.02k]
  |  |  ------------------
  ------------------
  515|  5.02k|    IGRAPH_FINALLY(igraph_free, mark);
  ------------------
  |  |  603|  5.02k|    do { \
  |  |  604|  5.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  5.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  5.02k|         * incorrect destructor function with the pointer */ \
  |  |  607|  5.02k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 5.02k]
  |  |  ------------------
  |  |  608|  5.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  5.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 5.02k]
  |  |  ------------------
  ------------------
  516|       |
  517|  5.02k|    IGRAPH_CHECK(igraph_eit_create(graph, edges, &eit));
  ------------------
  |  |  656|  5.02k|    do { \
  |  |  657|  5.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.02k]
  |  |  ------------------
  ------------------
  518|  5.02k|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  603|  5.02k|    do { \
  |  |  604|  5.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  5.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  5.02k|         * incorrect destructor function with the pointer */ \
  |  |  607|  5.02k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 5.02k]
  |  |  ------------------
  |  |  608|  5.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  5.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 5.02k]
  |  |  ------------------
  ------------------
  519|       |
  520|  60.5k|    for (IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  393|  5.02k|#define IGRAPH_EIT_RESET(eit) ((eit).pos = (eit).start)
  ------------------
                  for (IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  371|  60.5k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                  for (IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  359|  55.5k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (520:33): [True: 55.5k, False: 5.02k]
  ------------------
  521|  55.5k|        igraph_int_t e = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|  55.5k|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 51.4k, False: 4.05k]
  |  |  ------------------
  |  |  406|  55.5k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|  4.05k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  522|  55.5k|        if (! mark[e]) {
  ------------------
  |  Branch (522:13): [True: 55.5k, False: 0]
  ------------------
  523|  55.5k|            edges_to_remove++;
  524|  55.5k|            mark[e] = true;
  525|  55.5k|        }
  526|  55.5k|    }
  527|  5.02k|    remaining_edges = no_of_edges - edges_to_remove;
  528|       |
  529|       |    /* We don't need the iterator any more */
  530|  5.02k|    igraph_eit_destroy(&eit);
  531|  5.02k|    IGRAPH_FINALLY_CLEAN(1);
  532|       |
  533|  5.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newfrom, remaining_edges);
  ------------------
  |  |  119|  5.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  5.02k|    do { \
  |  |  |  |  657|  5.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  5.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  5.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, 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.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 5.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  5.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  5.02k|    do { \
  |  |  |  |  604|  5.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  5.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  5.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  5.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 5.02k]
  |  |  |  |  ------------------
  |  |  |  |  608|  5.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  5.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 5.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 5.02k]
  |  |  ------------------
  ------------------
  534|  5.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newto, remaining_edges);
  ------------------
  |  |  119|  5.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  5.02k|    do { \
  |  |  |  |  657|  5.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  5.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  5.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, 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.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 5.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  5.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  5.02k|    do { \
  |  |  |  |  604|  5.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  5.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  5.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  5.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 5.02k]
  |  |  |  |  ------------------
  |  |  |  |  608|  5.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  5.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 5.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 5.02k]
  |  |  ------------------
  ------------------
  535|       |
  536|       |    /* Actually remove the edges, move from pos i to pos j in newfrom/newto */
  537|  73.1k|    for (i = 0, j = 0; j < remaining_edges; i++) {
  ------------------
  |  Branch (537:24): [True: 68.1k, False: 5.02k]
  ------------------
  538|  68.1k|        if (! mark[i]) {
  ------------------
  |  Branch (538:13): [True: 64.0k, False: 4.07k]
  ------------------
  539|  64.0k|            VECTOR(newfrom)[j] = VECTOR(graph->from)[i];
  ------------------
  |  |   60|  64.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newfrom)[j] = VECTOR(graph->from)[i];
  ------------------
  |  |   60|  64.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  540|  64.0k|            VECTOR(newto)[j] = VECTOR(graph->to)[i];
  ------------------
  |  |   60|  64.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newto)[j] = VECTOR(graph->to)[i];
  ------------------
  |  |   60|  64.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  541|  64.0k|            j++;
  542|  64.0k|        }
  543|  68.1k|    }
  544|       |
  545|       |    /* Create index, this might require additional memory */
  546|  5.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newoi, remaining_edges);
  ------------------
  |  |  119|  5.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  5.02k|    do { \
  |  |  |  |  657|  5.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  5.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  5.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, 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.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 5.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  5.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  5.02k|    do { \
  |  |  |  |  604|  5.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  5.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  5.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  5.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 5.02k]
  |  |  |  |  ------------------
  |  |  |  |  608|  5.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  5.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 5.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 5.02k]
  |  |  ------------------
  ------------------
  547|  5.02k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newii, remaining_edges);
  ------------------
  |  |  119|  5.02k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  5.02k|    do { \
  |  |  |  |  657|  5.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  5.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  5.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, 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.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 5.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  5.02k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  5.02k|    do { \
  |  |  |  |  604|  5.02k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  5.02k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  5.02k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  5.02k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 5.02k]
  |  |  |  |  ------------------
  |  |  |  |  608|  5.02k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  5.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 5.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 5.02k]
  |  |  ------------------
  ------------------
  548|  5.02k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newfrom, &newto, &newoi, no_of_nodes));
  ------------------
  |  |  656|  5.02k|    do { \
  |  |  657|  5.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.02k]
  |  |  ------------------
  ------------------
  549|  5.02k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newto, &newfrom, &newii, no_of_nodes));
  ------------------
  |  |  656|  5.02k|    do { \
  |  |  657|  5.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.02k]
  |  |  ------------------
  ------------------
  550|       |
  551|       |    /* Edge attributes, we need an index that gives the IDs of the
  552|       |       original edges for every new edge.
  553|       |    */
  554|  5.02k|    if (graph->attr) {
  ------------------
  |  Branch (554:9): [True: 0, False: 5.02k]
  ------------------
  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|  5.02k|    igraph_vector_int_destroy(&graph->from);
  569|  5.02k|    igraph_vector_int_destroy(&graph->to);
  570|  5.02k|    igraph_vector_int_destroy(&graph->oi);
  571|  5.02k|    igraph_vector_int_destroy(&graph->ii);
  572|  5.02k|    graph->from = newfrom;
  573|  5.02k|    graph->to = newto;
  574|  5.02k|    graph->oi = newoi;
  575|  5.02k|    graph->ii = newii;
  576|  5.02k|    IGRAPH_FINALLY_CLEAN(4);
  577|       |
  578|  5.02k|    IGRAPH_FREE(mark);
  ------------------
  |  |   36|  5.02k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  579|  5.02k|    IGRAPH_FINALLY_CLEAN(1);
  580|       |
  581|       |    /* Create start vectors, no memory is needed for this */
  582|  5.02k|    igraph_i_create_start_vectors(&graph->os, &graph->from, &graph->oi, no_of_nodes);
  583|  5.02k|    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|  5.02k|    igraph_i_property_cache_invalidate_conditionally(
  599|  5.02k|        graph,
  600|  5.02k|        /* keep_always = */ 0,
  601|       |        /* keep_when_false = */
  602|  5.02k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  603|  5.02k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  604|  5.02k|        (1 << IGRAPH_PROP_HAS_MUTUAL) |
  605|  5.02k|        (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  606|  5.02k|        (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED),
  607|       |        /* keep_when_true = */
  608|  5.02k|        (1 << IGRAPH_PROP_IS_DAG) |
  609|  5.02k|        (1 << IGRAPH_PROP_IS_FOREST)
  610|  5.02k|    );
  611|       |
  612|       |    /* Nothing to deallocate... */
  613|  5.02k|    return IGRAPH_SUCCESS;
  614|  5.02k|}
igraph_delete_vertices_map:
  648|  2.36k|) {
  649|  2.36k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  650|  2.36k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  651|  2.36k|    igraph_vector_int_t edge_recoding, vertex_recoding;
  652|  2.36k|    igraph_vector_int_t *my_vertex_recoding = &vertex_recoding;
  653|  2.36k|    igraph_vit_t vit;
  654|  2.36k|    igraph_t newgraph;
  655|  2.36k|    igraph_int_t i, j;
  656|  2.36k|    igraph_int_t remaining_vertices, remaining_edges;
  657|       |
  658|  2.36k|    if (map) {
  ------------------
  |  Branch (658:9): [True: 60, False: 2.30k]
  ------------------
  659|     60|        my_vertex_recoding = map;
  660|     60|        IGRAPH_CHECK(igraph_vector_int_resize(map, no_of_nodes));
  ------------------
  |  |  656|     60|    do { \
  |  |  657|     60|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     60|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     60|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 60]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
  661|     60|        igraph_vector_int_null(map);
  662|  2.30k|    } else {
  663|  2.30k|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vertex_recoding, no_of_nodes);
  ------------------
  |  |  119|  2.30k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.30k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  664|  2.30k|    }
  665|       |
  666|  2.36k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edge_recoding, no_of_edges);
  ------------------
  |  |  119|  2.36k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.36k|    do { \
  |  |  |  |  657|  2.36k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.36k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.36k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.36k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.36k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.36k|    do { \
  |  |  |  |  604|  2.36k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.36k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.36k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.36k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.36k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.36k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.36k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.36k]
  |  |  ------------------
  ------------------
  667|       |
  668|  2.36k|    IGRAPH_CHECK(igraph_vit_create(graph, vertices, &vit));
  ------------------
  |  |  656|  2.36k|    do { \
  |  |  657|  2.36k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.36k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.36k]
  |  |  ------------------
  ------------------
  669|  2.36k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  2.36k|    do { \
  |  |  604|  2.36k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.36k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.36k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.36k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.36k]
  |  |  ------------------
  |  |  608|  2.36k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.36k]
  |  |  ------------------
  ------------------
  670|       |
  671|       |    /* mark the vertices to delete */
  672|  5.75k|    for (; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit) ) {
  ------------------
  |  |  179|  5.75k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit) ) {
  ------------------
  |  |  167|  3.38k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (672:12): [True: 3.38k, False: 2.36k]
  ------------------
  673|  3.38k|        igraph_int_t vertex = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  3.38k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 2.30k, False: 1.08k]
  |  |  ------------------
  |  |  215|  3.38k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|  1.08k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  674|  3.38k|        if (vertex < 0 || vertex >= no_of_nodes) {
  ------------------
  |  Branch (674:13): [True: 0, False: 3.38k]
  |  Branch (674:27): [True: 0, False: 3.38k]
  ------------------
  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|  3.38k|        VECTOR(*my_vertex_recoding)[vertex] = 1;
  ------------------
  |  |   60|  3.38k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  678|  3.38k|    }
  679|       |    /* create vertex recoding vector */
  680|   402k|    for (remaining_vertices = 0, i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (680:41): [True: 399k, False: 2.36k]
  ------------------
  681|   399k|        if (VECTOR(*my_vertex_recoding)[i] == 0) {
  ------------------
  |  |   60|   399k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (681:13): [True: 396k, False: 3.38k]
  ------------------
  682|   396k|            VECTOR(*my_vertex_recoding)[i] = remaining_vertices;
  ------------------
  |  |   60|   396k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  683|   396k|            remaining_vertices++;
  684|   396k|        } else {
  685|  3.38k|            VECTOR(*my_vertex_recoding)[i] = -1;
  ------------------
  |  |   60|  3.38k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  686|  3.38k|        }
  687|   399k|    }
  688|       |    /* create edge recoding vector */
  689|  62.4k|    for (remaining_edges = 0, i = 0; i < no_of_edges; i++) {
  ------------------
  |  Branch (689:38): [True: 60.0k, False: 2.36k]
  ------------------
  690|  60.0k|        igraph_int_t from = VECTOR(graph->from)[i];
  ------------------
  |  |   60|  60.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  691|  60.0k|        igraph_int_t to = VECTOR(graph->to)[i];
  ------------------
  |  |   60|  60.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  692|  60.0k|        if (VECTOR(*my_vertex_recoding)[from] >= 0 &&
  ------------------
  |  |   60|  60.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (692:13): [True: 57.0k, False: 3.03k]
  ------------------
  693|  57.0k|            VECTOR(*my_vertex_recoding)[to  ] >= 0) {
  ------------------
  |  |   60|  57.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (693:13): [True: 53.8k, False: 3.14k]
  ------------------
  694|  53.8k|            VECTOR(edge_recoding)[i] = remaining_edges + 1;
  ------------------
  |  |   60|  53.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  695|  53.8k|            remaining_edges++;
  696|  53.8k|        }
  697|  60.0k|    }
  698|       |
  699|       |    /* start creating the graph */
  700|  2.36k|    memset(&newgraph, 0, sizeof(igraph_t));
  701|  2.36k|    newgraph.n = remaining_vertices;
  702|  2.36k|    newgraph.directed = graph->directed;
  703|       |
  704|       |    /* allocate vectors */
  705|  2.36k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.from, remaining_edges);
  ------------------
  |  |  119|  2.36k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.36k|    do { \
  |  |  |  |  657|  2.36k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.36k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.36k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.36k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.36k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.36k|    do { \
  |  |  |  |  604|  2.36k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.36k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.36k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.36k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.36k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.36k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.36k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.36k]
  |  |  ------------------
  ------------------
  706|  2.36k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.to, remaining_edges);
  ------------------
  |  |  119|  2.36k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.36k|    do { \
  |  |  |  |  657|  2.36k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.36k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.36k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.36k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.36k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.36k|    do { \
  |  |  |  |  604|  2.36k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.36k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.36k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.36k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.36k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.36k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.36k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.36k]
  |  |  ------------------
  ------------------
  707|  2.36k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.oi, remaining_edges);
  ------------------
  |  |  119|  2.36k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.36k|    do { \
  |  |  |  |  657|  2.36k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.36k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.36k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.36k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.36k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.36k|    do { \
  |  |  |  |  604|  2.36k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.36k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.36k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.36k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.36k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.36k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.36k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.36k]
  |  |  ------------------
  ------------------
  708|  2.36k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.ii, remaining_edges);
  ------------------
  |  |  119|  2.36k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.36k|    do { \
  |  |  |  |  657|  2.36k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.36k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.36k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.36k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.36k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.36k|    do { \
  |  |  |  |  604|  2.36k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.36k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.36k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.36k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.36k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.36k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.36k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.36k]
  |  |  ------------------
  ------------------
  709|  2.36k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.os, remaining_vertices + 1);
  ------------------
  |  |  119|  2.36k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.36k|    do { \
  |  |  |  |  657|  2.36k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.36k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.36k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.36k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.36k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.36k|    do { \
  |  |  |  |  604|  2.36k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.36k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.36k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.36k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.36k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.36k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.36k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.36k]
  |  |  ------------------
  ------------------
  710|  2.36k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.is, remaining_vertices + 1);
  ------------------
  |  |  119|  2.36k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.36k|    do { \
  |  |  |  |  657|  2.36k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.36k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.36k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.36k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.36k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.36k|    do { \
  |  |  |  |  604|  2.36k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.36k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.36k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.36k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.36k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.36k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.36k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.36k]
  |  |  ------------------
  ------------------
  711|       |
  712|       |    /* Add the edges */
  713|  60.1k|    for (i = 0, j = 0; j < remaining_edges; i++) {
  ------------------
  |  Branch (713:24): [True: 57.7k, False: 2.36k]
  ------------------
  714|  57.7k|        if (VECTOR(edge_recoding)[i] > 0) {
  ------------------
  |  |   60|  57.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (714:13): [True: 53.8k, False: 3.88k]
  ------------------
  715|  53.8k|            igraph_int_t from = VECTOR(graph->from)[i];
  ------------------
  |  |   60|  53.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  716|  53.8k|            igraph_int_t to = VECTOR(graph->to  )[i];
  ------------------
  |  |   60|  53.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  717|  53.8k|            VECTOR(newgraph.from)[j] = VECTOR(*my_vertex_recoding)[from];
  ------------------
  |  |   60|  53.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newgraph.from)[j] = VECTOR(*my_vertex_recoding)[from];
  ------------------
  |  |   60|  53.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  718|  53.8k|            VECTOR(newgraph.to  )[j] = VECTOR(*my_vertex_recoding)[to];
  ------------------
  |  |   60|  53.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newgraph.to  )[j] = VECTOR(*my_vertex_recoding)[to];
  ------------------
  |  |   60|  53.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  719|  53.8k|            j++;
  720|  53.8k|        }
  721|  57.7k|    }
  722|       |
  723|       |    /* update oi & ii */
  724|  2.36k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newgraph.from, &newgraph.to, &newgraph.oi,
  ------------------
  |  |  656|  2.36k|    do { \
  |  |  657|  2.36k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.36k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.36k]
  |  |  ------------------
  ------------------
  725|  2.36k|                                         remaining_vertices));
  726|  2.36k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newgraph.to, &newgraph.from, &newgraph.ii,
  ------------------
  |  |  656|  2.36k|    do { \
  |  |  657|  2.36k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.36k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.36k]
  |  |  ------------------
  ------------------
  727|  2.36k|                                         remaining_vertices));
  728|       |
  729|  2.36k|    IGRAPH_CHECK(igraph_i_create_start_vectors(&newgraph.os, &newgraph.from,
  ------------------
  |  |  656|  2.36k|    do { \
  |  |  657|  2.36k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.36k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.36k]
  |  |  ------------------
  ------------------
  730|  2.36k|                                       &newgraph.oi, remaining_vertices));
  731|  2.36k|    IGRAPH_CHECK(igraph_i_create_start_vectors(&newgraph.is, &newgraph.to,
  ------------------
  |  |  656|  2.36k|    do { \
  |  |  657|  2.36k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.36k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.36k]
  |  |  ------------------
  ------------------
  732|  2.36k|                                       &newgraph.ii, remaining_vertices));
  733|       |
  734|  2.36k|    newgraph.cache = IGRAPH_CALLOC(1, igraph_i_property_cache_t);
  ------------------
  |  |   33|  2.36k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.72k|    (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.36k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  735|  2.36k|    IGRAPH_CHECK_OOM(newgraph.cache, "Cannot delete vertices.");
  ------------------
  |  |  709|  2.36k|    do { \
  |  |  710|  2.36k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.36k]
  |  |  ------------------
  ------------------
  736|  2.36k|    IGRAPH_FINALLY(igraph_free, newgraph.cache);
  ------------------
  |  |  603|  2.36k|    do { \
  |  |  604|  2.36k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.36k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.36k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.36k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.36k]
  |  |  ------------------
  |  |  608|  2.36k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.36k]
  |  |  ------------------
  ------------------
  737|  2.36k|    IGRAPH_CHECK(igraph_i_property_cache_init(newgraph.cache));
  ------------------
  |  |  656|  2.36k|    do { \
  |  |  657|  2.36k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.36k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.36k]
  |  |  ------------------
  ------------------
  738|  2.36k|    IGRAPH_FINALLY(igraph_i_property_cache_destroy, newgraph.cache);
  ------------------
  |  |  603|  2.36k|    do { \
  |  |  604|  2.36k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.36k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.36k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.36k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.36k]
  |  |  ------------------
  |  |  608|  2.36k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.36k]
  |  |  ------------------
  ------------------
  739|       |
  740|       |    /* attributes */
  741|  2.36k|    IGRAPH_CHECK(igraph_i_attribute_copy(
  ------------------
  |  |  656|  2.36k|    do { \
  |  |  657|  2.36k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.36k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.36k]
  |  |  ------------------
  ------------------
  742|  2.36k|        &newgraph, graph, /* graph= */ true, /* vertex= */ false, /* edge= */ false
  743|  2.36k|    ));
  744|       |
  745|       |    /* at this point igraph_destroy can take over the responsibility of
  746|       |     * deallocating the graph */
  747|  2.36k|    IGRAPH_FINALLY_CLEAN(8);    /* 2 for the property cache, 6 for the vectors */
  748|  2.36k|    IGRAPH_FINALLY(igraph_destroy, &newgraph);
  ------------------
  |  |  603|  2.36k|    do { \
  |  |  604|  2.36k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.36k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.36k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.36k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.36k]
  |  |  ------------------
  |  |  608|  2.36k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.36k]
  |  |  ------------------
  ------------------
  749|       |
  750|  2.36k|    if (newgraph.attr) {
  ------------------
  |  Branch (750:9): [True: 0, False: 2.36k]
  ------------------
  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.36k|    igraph_vit_destroy(&vit);
  773|  2.36k|    igraph_vector_int_destroy(&edge_recoding);
  774|  2.36k|    igraph_destroy(graph);
  775|  2.36k|    *graph = newgraph;
  776|       |
  777|  2.36k|    IGRAPH_FINALLY_CLEAN(3);
  778|       |
  779|  2.36k|    if (invmap) {
  ------------------
  |  Branch (779:9): [True: 0, False: 2.36k]
  ------------------
  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.36k|    if (!map) {
  ------------------
  |  Branch (789:9): [True: 2.30k, False: 60]
  ------------------
  790|  2.30k|        igraph_vector_int_destroy(my_vertex_recoding);
  791|  2.30k|        IGRAPH_FINALLY_CLEAN(1);
  792|  2.30k|    }
  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.36k|    igraph_i_property_cache_invalidate_conditionally(
  805|  2.36k|        graph,
  806|  2.36k|        /* keep_always = */ 0,
  807|       |        /* keep_when_false = */
  808|  2.36k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  809|  2.36k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  810|  2.36k|        (1 << IGRAPH_PROP_HAS_MUTUAL),
  811|       |        /* keep_when_true = */
  812|  2.36k|        (1 << IGRAPH_PROP_IS_DAG) |
  813|  2.36k|        (1 << IGRAPH_PROP_IS_FOREST)
  814|  2.36k|    );
  815|       |
  816|  2.36k|    return IGRAPH_SUCCESS;
  817|  2.36k|}
igraph_vcount:
  829|  8.81M|igraph_int_t igraph_vcount(const igraph_t *graph) {
  830|  8.81M|    return graph->n;
  831|  8.81M|}
igraph_ecount:
  843|   102k|igraph_int_t igraph_ecount(const igraph_t *graph) {
  844|   102k|    return igraph_vector_int_size(&graph->from);
  845|   102k|}
igraph_neighbors:
  894|  6.28M|) {
  895|       |
  896|  6.28M|#define DEDUPLICATE_IF_NEEDED(vertex, n)                                          \
  897|  6.28M|    if (should_filter_duplicates) {                                               \
  898|  6.28M|        if (vertex == pnode) {                                                    \
  899|       |            /* This is a loop edge */                                             \
  900|  6.28M|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  901|       |                /* Filtering loop edges unconditionally */                        \
  902|  6.28M|                length -= n;                                                      \
  903|  6.28M|                continue;                                                         \
  904|  6.28M|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  905|       |                /* Filtering every second endpoint of loop edges */               \
  906|  6.28M|                length -= n;                                                      \
  907|  6.28M|                last_added = -1;                                                  \
  908|  6.28M|                seen_loop = true;                                                 \
  909|  6.28M|                continue;                                                         \
  910|  6.28M|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  911|       |                /* Filtering multi-loop edges */                                  \
  912|  6.28M|                length -= n;                                                      \
  913|  6.28M|                continue;                                                         \
  914|  6.28M|            } else {                                                              \
  915|  6.28M|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  916|  6.28M|                last_added = vertex;                                              \
  917|  6.28M|            }                                                                     \
  918|  6.28M|        } else {                                                                  \
  919|       |            /* Not a loop edge */                                                 \
  920|  6.28M|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  921|       |                /* Filtering multi-edges */                                       \
  922|  6.28M|                length -= n;                                                      \
  923|  6.28M|                continue;                                                         \
  924|  6.28M|            } else {                                                              \
  925|  6.28M|                last_added = vertex;                                              \
  926|  6.28M|            }                                                                     \
  927|  6.28M|        }                                                                         \
  928|  6.28M|    }
  929|       |
  930|  6.28M|    igraph_int_t length = 0, idx = 0;
  931|  6.28M|    igraph_int_t i, j;
  932|       |
  933|  6.28M|    igraph_int_t node = pnode;
  934|  6.28M|    igraph_int_t last_added = -1;
  935|  6.28M|    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|  6.28M|    igraph_bool_t seen_loop = false;
  943|       |
  944|       |    /* normalize Boolean value to enable == comparisons below and in DEDUPLICATE_IF_NEEDED */
  945|  6.28M|    multiple = !!multiple;
  946|       |
  947|  6.28M|    if (node < 0 || node > igraph_vcount(graph) - 1) {
  ------------------
  |  Branch (947:9): [True: 0, False: 6.28M]
  |  Branch (947:21): [True: 0, False: 6.28M]
  ------------------
  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|  6.28M|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (950:9): [True: 2.50M, False: 3.78M]
  |  Branch (950:31): [True: 523k, False: 1.98M]
  |  Branch (950:52): [True: 0, False: 523k]
  ------------------
  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|  6.28M|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (954:9): [True: 0, False: 6.28M]
  ------------------
  955|      0|        mode = IGRAPH_ALL;
  956|      0|    }
  957|       |
  958|  6.28M|    if (mode != IGRAPH_ALL && loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (958:9): [True: 5.76M, False: 523k]
  |  Branch (958:31): [True: 3.86M, False: 1.89M]
  ------------------
  959|       |        /*
  960|       |        IGRAPH_ERROR("For a directed graph (with directions not ignored), "
  961|       |                     "IGRAPH_LOOPS_TWICE does not make sense.", IGRAPH_EINVAL);
  962|       |        */
  963|  3.86M|        loops = IGRAPH_LOOPS_ONCE;
  964|  3.86M|    }
  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|  6.28M|    if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (969:9): [True: 4.30M, False: 1.98M]
  ------------------
  970|  4.30M|        length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|  4.30M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|  4.30M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  971|  4.30M|    }
  972|  6.28M|    if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (972:9): [True: 2.50M, False: 3.78M]
  ------------------
  973|  2.50M|        length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|  2.50M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|  2.50M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  974|  2.50M|    }
  975|       |
  976|  6.28M|    IGRAPH_CHECK(igraph_vector_int_resize(neis, length));
  ------------------
  |  |  656|  6.28M|    do { \
  |  |  657|  6.28M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  6.28M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  6.28M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.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|  6.28M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 6.28M]
  |  |  ------------------
  ------------------
  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|  6.28M|    if (!igraph_is_directed(graph) || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (987:9): [True: 0, False: 6.28M]
  |  Branch (987:39): [True: 5.76M, False: 523k]
  ------------------
  988|       |        /* graph is undirected or we did not ask for both directions in a
  989|       |         * directed graph; this is the easy case */
  990|       |
  991|  5.76M|        should_filter_duplicates = !(multiple == IGRAPH_MULTIPLE &&
  ------------------
  |  Branch (991:38): [True: 5.74M, False: 21.8k]
  ------------------
  992|  5.74M|                ((!igraph_is_directed(graph) && loops == IGRAPH_LOOPS_TWICE) ||
  ------------------
  |  Branch (992:19): [True: 0, False: 5.74M]
  |  Branch (992:49): [True: 0, False: 0]
  ------------------
  993|  5.74M|                 (igraph_is_directed(graph) && loops != IGRAPH_NO_LOOPS)));
  ------------------
  |  Branch (993:19): [True: 5.74M, False: 0]
  |  Branch (993:48): [True: 5.55M, False: 186k]
  ------------------
  994|       |
  995|  5.76M|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (995:13): [True: 3.78M, False: 1.98M]
  ------------------
  996|  3.78M|            j = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|  3.78M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  997|  4.86M|            for (i = VECTOR(graph->os)[node]; i < j; i++) {
  ------------------
  |  |   60|  3.78M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (997:47): [True: 1.08M, False: 3.78M]
  ------------------
  998|  1.08M|                igraph_int_t to = VECTOR(graph->to)[ VECTOR(graph->oi)[i] ];
  ------------------
  |  |   60|  1.08M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_int_t to = VECTOR(graph->to)[ VECTOR(graph->oi)[i] ];
  ------------------
  |  |   60|  1.08M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  999|  1.08M|                DEDUPLICATE_IF_NEEDED(to, 1);
  ------------------
  |  |  897|  1.08M|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 104k, False: 976k]
  |  |  ------------------
  |  |  898|   104k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 23.9k, False: 80.6k]
  |  |  ------------------
  |  |  899|  23.9k|            /* This is a loop edge */                                             \
  |  |  900|  23.9k|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (900:17): [True: 23.9k, False: 0]
  |  |  ------------------
  |  |  901|  23.9k|                /* Filtering loop edges unconditionally */                        \
  |  |  902|  23.9k|                length -= n;                                                      \
  |  |  903|  23.9k|                continue;                                                         \
  |  |  904|  23.9k|            } 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|  80.6k|        } else {                                                                  \
  |  |  919|  80.6k|            /* Not a loop edge */                                                 \
  |  |  920|  80.6k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 23.5k, False: 57.1k]
  |  |  |  Branch (920:51): [True: 9.83k, False: 13.6k]
  |  |  ------------------
  |  |  921|  9.83k|                /* Filtering multi-edges */                                       \
  |  |  922|  9.83k|                length -= n;                                                      \
  |  |  923|  9.83k|                continue;                                                         \
  |  |  924|  70.8k|            } else {                                                              \
  |  |  925|  70.8k|                last_added = vertex;                                              \
  |  |  926|  70.8k|            }                                                                     \
  |  |  927|  80.6k|        }                                                                         \
  |  |  928|   104k|    }
  ------------------
 1000|  1.04M|                VECTOR(*neis)[idx++] = to;
  ------------------
  |  |   60|  1.04M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1001|  1.04M|            }
 1002|  3.78M|        }
 1003|       |
 1004|  5.76M|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1004:13): [True: 1.98M, False: 3.78M]
  ------------------
 1005|  1.98M|            j = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|  1.98M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1006|  2.45M|            for (i = VECTOR(graph->is)[node]; i < j; i++) {
  ------------------
  |  |   60|  1.98M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1006:47): [True: 476k, False: 1.98M]
  ------------------
 1007|   476k|                igraph_int_t from = VECTOR(graph->from)[ VECTOR(graph->ii)[i] ];
  ------------------
  |  |   60|   476k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_int_t from = VECTOR(graph->from)[ VECTOR(graph->ii)[i] ];
  ------------------
  |  |   60|   476k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1008|   476k|                DEDUPLICATE_IF_NEEDED(from, 1);
  ------------------
  |  |  897|   476k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 38.5k, False: 438k]
  |  |  ------------------
  |  |  898|  38.5k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 12.0k, False: 26.5k]
  |  |  ------------------
  |  |  899|  12.0k|            /* This is a loop edge */                                             \
  |  |  900|  12.0k|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (900:17): [True: 12.0k, False: 0]
  |  |  ------------------
  |  |  901|  12.0k|                /* Filtering loop edges unconditionally */                        \
  |  |  902|  12.0k|                length -= n;                                                      \
  |  |  903|  12.0k|                continue;                                                         \
  |  |  904|  12.0k|            } 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|  26.5k|        } else {                                                                  \
  |  |  919|  26.5k|            /* Not a loop edge */                                                 \
  |  |  920|  26.5k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 23.4k, False: 3.06k]
  |  |  |  Branch (920:51): [True: 10.2k, False: 13.2k]
  |  |  ------------------
  |  |  921|  10.2k|                /* Filtering multi-edges */                                       \
  |  |  922|  10.2k|                length -= n;                                                      \
  |  |  923|  10.2k|                continue;                                                         \
  |  |  924|  16.3k|            } else {                                                              \
  |  |  925|  16.3k|                last_added = vertex;                                              \
  |  |  926|  16.3k|            }                                                                     \
  |  |  927|  26.5k|        }                                                                         \
  |  |  928|  38.5k|    }
  ------------------
 1009|   454k|                VECTOR(*neis)[idx++] = from;
  ------------------
  |  |   60|   454k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1010|   454k|            }
 1011|  1.98M|        }
 1012|  5.76M|    } 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|   523k|        igraph_int_t j1 = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|   523k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1017|   523k|        igraph_int_t j2 = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|   523k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1018|   523k|        igraph_int_t i1 = VECTOR(graph->os)[node];
  ------------------
  |  |   60|   523k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1019|   523k|        igraph_int_t i2 = VECTOR(graph->is)[node];
  ------------------
  |  |   60|   523k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1020|   523k|        igraph_int_t eid1, eid2;
 1021|   523k|        igraph_int_t n1, n2;
 1022|       |
 1023|   523k|        should_filter_duplicates = !(multiple == IGRAPH_MULTIPLE &&
  ------------------
  |  Branch (1023:38): [True: 523k, False: 0]
  ------------------
 1024|   523k|                loops == IGRAPH_LOOPS_TWICE);
  ------------------
  |  Branch (1024:17): [True: 0, False: 523k]
  ------------------
 1025|       |
 1026|   601k|        while (i1 < j1 && i2 < j2) {
  ------------------
  |  Branch (1026:16): [True: 107k, False: 494k]
  |  Branch (1026:27): [True: 78.2k, False: 29.0k]
  ------------------
 1027|  78.2k|            eid1 = VECTOR(graph->oi)[i1];
  ------------------
  |  |   60|  78.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1028|  78.2k|            eid2 = VECTOR(graph->ii)[i2];
  ------------------
  |  |   60|  78.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1029|  78.2k|            n1 = VECTOR(graph->to)[eid1];
  ------------------
  |  |   60|  78.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1030|  78.2k|            n2 = VECTOR(graph->from)[eid2];
  ------------------
  |  |   60|  78.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1031|  78.2k|            if (n1 < n2) {
  ------------------
  |  Branch (1031:17): [True: 24.6k, False: 53.6k]
  ------------------
 1032|  24.6k|                i1++;
 1033|  24.6k|                DEDUPLICATE_IF_NEEDED(n1, 1);
  ------------------
  |  |  897|  24.6k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 24.6k, False: 0]
  |  |  ------------------
  |  |  898|  24.6k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 0, False: 24.6k]
  |  |  ------------------
  |  |  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|  24.6k|        } else {                                                                  \
  |  |  919|  24.6k|            /* Not a loop edge */                                                 \
  |  |  920|  24.6k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 0, False: 24.6k]
  |  |  |  Branch (920:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  921|      0|                /* Filtering multi-edges */                                       \
  |  |  922|      0|                length -= n;                                                      \
  |  |  923|      0|                continue;                                                         \
  |  |  924|  24.6k|            } else {                                                              \
  |  |  925|  24.6k|                last_added = vertex;                                              \
  |  |  926|  24.6k|            }                                                                     \
  |  |  927|  24.6k|        }                                                                         \
  |  |  928|  24.6k|    }
  ------------------
 1034|  24.6k|                VECTOR(*neis)[idx++] = n1;
  ------------------
  |  |   60|  24.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1035|  53.6k|            } else if (n1 > n2) {
  ------------------
  |  Branch (1035:24): [True: 25.1k, False: 28.5k]
  ------------------
 1036|  25.1k|                i2++;
 1037|  25.1k|                DEDUPLICATE_IF_NEEDED(n2, 1);
  ------------------
  |  |  897|  25.1k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 25.1k, False: 0]
  |  |  ------------------
  |  |  898|  25.1k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 0, False: 25.1k]
  |  |  ------------------
  |  |  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|  25.1k|        } else {                                                                  \
  |  |  919|  25.1k|            /* Not a loop edge */                                                 \
  |  |  920|  25.1k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 0, False: 25.1k]
  |  |  |  Branch (920:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  921|      0|                /* Filtering multi-edges */                                       \
  |  |  922|      0|                length -= n;                                                      \
  |  |  923|      0|                continue;                                                         \
  |  |  924|  25.1k|            } else {                                                              \
  |  |  925|  25.1k|                last_added = vertex;                                              \
  |  |  926|  25.1k|            }                                                                     \
  |  |  927|  25.1k|        }                                                                         \
  |  |  928|  25.1k|    }
  ------------------
 1038|  25.1k|                VECTOR(*neis)[idx++] = n2;
  ------------------
  |  |   60|  25.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1039|  28.5k|            } else {
 1040|  28.5k|                i1++;
 1041|  28.5k|                i2++;
 1042|  28.5k|                DEDUPLICATE_IF_NEEDED(n1, 2);
  ------------------
  |  |  897|  28.5k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 28.5k, False: 0]
  |  |  ------------------
  |  |  898|  28.5k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 17.3k, False: 11.2k]
  |  |  ------------------
  |  |  899|  17.3k|            /* This is a loop edge */                                             \
  |  |  900|  17.3k|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (900:17): [True: 17.3k, False: 0]
  |  |  ------------------
  |  |  901|  17.3k|                /* Filtering loop edges unconditionally */                        \
  |  |  902|  17.3k|                length -= n;                                                      \
  |  |  903|  17.3k|                continue;                                                         \
  |  |  904|  17.3k|            } 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|  17.3k|        } else {                                                                  \
  |  |  919|  11.2k|            /* Not a loop edge */                                                 \
  |  |  920|  11.2k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 0, False: 11.2k]
  |  |  |  Branch (920:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  921|      0|                /* Filtering multi-edges */                                       \
  |  |  922|      0|                length -= n;                                                      \
  |  |  923|      0|                continue;                                                         \
  |  |  924|  11.2k|            } else {                                                              \
  |  |  925|  11.2k|                last_added = vertex;                                              \
  |  |  926|  11.2k|            }                                                                     \
  |  |  927|  11.2k|        }                                                                         \
  |  |  928|  28.5k|    }
  ------------------
 1043|  11.2k|                VECTOR(*neis)[idx++] = n1;
  ------------------
  |  |   60|  11.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1044|  11.2k|                DEDUPLICATE_IF_NEEDED(n2, 1);
  ------------------
  |  |  897|  11.2k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 11.2k, False: 0]
  |  |  ------------------
  |  |  898|  11.2k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 0, False: 11.2k]
  |  |  ------------------
  |  |  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|  11.2k|        } else {                                                                  \
  |  |  919|  11.2k|            /* Not a loop edge */                                                 \
  |  |  920|  11.2k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 0, False: 11.2k]
  |  |  |  Branch (920:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  921|      0|                /* Filtering multi-edges */                                       \
  |  |  922|      0|                length -= n;                                                      \
  |  |  923|      0|                continue;                                                         \
  |  |  924|  11.2k|            } else {                                                              \
  |  |  925|  11.2k|                last_added = vertex;                                              \
  |  |  926|  11.2k|            }                                                                     \
  |  |  927|  11.2k|        }                                                                         \
  |  |  928|  11.2k|    }
  ------------------
 1045|  11.2k|                VECTOR(*neis)[idx++] = n2;
  ------------------
  |  |   60|  11.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1046|  11.2k|            }
 1047|  78.2k|        }
 1048|       |
 1049|   568k|        while (i1 < j1) {
  ------------------
  |  Branch (1049:16): [True: 45.3k, False: 523k]
  ------------------
 1050|  45.3k|            eid1 = VECTOR(graph->oi)[i1++];
  ------------------
  |  |   60|  45.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1051|  45.3k|            igraph_int_t to = VECTOR(graph->to)[eid1];
  ------------------
  |  |   60|  45.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1052|  45.3k|            DEDUPLICATE_IF_NEEDED(to, 1);
  ------------------
  |  |  897|  45.3k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 45.3k, False: 0]
  |  |  ------------------
  |  |  898|  45.3k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 0, False: 45.3k]
  |  |  ------------------
  |  |  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|  45.3k|        } else {                                                                  \
  |  |  919|  45.3k|            /* Not a loop edge */                                                 \
  |  |  920|  45.3k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 0, False: 45.3k]
  |  |  |  Branch (920:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  921|      0|                /* Filtering multi-edges */                                       \
  |  |  922|      0|                length -= n;                                                      \
  |  |  923|      0|                continue;                                                         \
  |  |  924|  45.3k|            } else {                                                              \
  |  |  925|  45.3k|                last_added = vertex;                                              \
  |  |  926|  45.3k|            }                                                                     \
  |  |  927|  45.3k|        }                                                                         \
  |  |  928|  45.3k|    }
  ------------------
 1053|  45.3k|            VECTOR(*neis)[idx++] = to;
  ------------------
  |  |   60|  45.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1054|  45.3k|        }
 1055|       |
 1056|   567k|        while (i2 < j2) {
  ------------------
  |  Branch (1056:16): [True: 44.7k, False: 523k]
  ------------------
 1057|  44.7k|            eid2 = VECTOR(graph->ii)[i2++];
  ------------------
  |  |   60|  44.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1058|  44.7k|            igraph_int_t from = VECTOR(graph->from)[eid2];
  ------------------
  |  |   60|  44.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1059|  44.7k|            DEDUPLICATE_IF_NEEDED(from, 1);
  ------------------
  |  |  897|  44.7k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 44.7k, False: 0]
  |  |  ------------------
  |  |  898|  44.7k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 0, False: 44.7k]
  |  |  ------------------
  |  |  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|  44.7k|        } else {                                                                  \
  |  |  919|  44.7k|            /* Not a loop edge */                                                 \
  |  |  920|  44.7k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 0, False: 44.7k]
  |  |  |  Branch (920:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  921|      0|                /* Filtering multi-edges */                                       \
  |  |  922|      0|                length -= n;                                                      \
  |  |  923|      0|                continue;                                                         \
  |  |  924|  44.7k|            } else {                                                              \
  |  |  925|  44.7k|                last_added = vertex;                                              \
  |  |  926|  44.7k|            }                                                                     \
  |  |  927|  44.7k|        }                                                                         \
  |  |  928|  44.7k|    }
  ------------------
 1060|  44.7k|            VECTOR(*neis)[idx++] = from;
  ------------------
  |  |   60|  44.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1061|  44.7k|        }
 1062|       |
 1063|   523k|    }
 1064|  6.28M|    IGRAPH_CHECK(igraph_vector_int_resize(neis, length));
  ------------------
  |  |  656|  6.28M|    do { \
  |  |  657|  6.28M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  6.28M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  6.28M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.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|  6.28M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 6.28M]
  |  |  ------------------
  ------------------
 1065|       |
 1066|  6.28M|    return IGRAPH_SUCCESS;
 1067|  6.28M|#undef DEDUPLICATE_IF_NEEDED
 1068|  6.28M|}
igraph_is_directed:
 1133|  26.4M|igraph_bool_t igraph_is_directed(const igraph_t *graph) {
 1134|  26.4M|    return graph->directed;
 1135|  26.4M|}
igraph_degree_1:
 1165|  6.90k|) {
 1166|  6.90k|    igraph_int_t loop_counter;
 1167|       |
 1168|  6.90k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1168:9): [True: 0, False: 6.90k]
  ------------------
 1169|      0|        mode = IGRAPH_ALL;
 1170|      0|    }
 1171|       |
 1172|  6.90k|    if (loops != IGRAPH_NO_LOOPS && loops != IGRAPH_LOOPS_ONCE &&
  ------------------
  |  Branch (1172:9): [True: 2.30k, False: 4.60k]
  |  Branch (1172:37): [True: 2.30k, False: 0]
  ------------------
 1173|  2.30k|        loops != IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1173:9): [True: 0, False: 2.30k]
  ------------------
 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.90k|    if (loops == IGRAPH_LOOPS_ONCE && (mode & IGRAPH_ALL) != IGRAPH_ALL) {
  ------------------
  |  Branch (1177:9): [True: 0, False: 6.90k]
  |  Branch (1177:39): [True: 0, False: 0]
  ------------------
 1178|      0|        loops = IGRAPH_LOOPS_TWICE;
 1179|      0|    }
 1180|       |
 1181|  6.90k|    *deg = 0;
 1182|  6.90k|    if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1182:9): [True: 4.60k, False: 2.30k]
  ------------------
 1183|  4.60k|        *deg += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|  4.60k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      *deg += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|  4.60k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1184|  4.60k|    }
 1185|  6.90k|    if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1185:9): [True: 2.30k, False: 4.60k]
  ------------------
 1186|  2.30k|        *deg += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|  2.30k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      *deg += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|  2.30k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1187|  2.30k|    }
 1188|       |
 1189|  6.90k|    if (loops != IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1189:9): [True: 4.60k, False: 2.30k]
  ------------------
 1190|       |        /* When loops should not be counted, we remove their contribution from the
 1191|       |         * previously computed degree. */
 1192|  4.60k|        loop_counter = 0;
 1193|  4.60k|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1193:13): [True: 2.30k, False: 2.30k]
  ------------------
 1194|  21.1k|            for (igraph_int_t i = VECTOR(graph->os)[vid]; i < VECTOR(graph->os)[vid + 1]; i++) {
  ------------------
  |  |   60|  2.30k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          for (igraph_int_t i = VECTOR(graph->os)[vid]; i < VECTOR(graph->os)[vid + 1]; i++) {
  ------------------
  |  |   60|  21.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1194:59): [True: 18.8k, False: 2.30k]
  ------------------
 1195|  18.8k|                if (VECTOR(graph->to)[ VECTOR(graph->oi)[i] ] == vid) {
  ------------------
  |  |   60|  18.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (VECTOR(graph->to)[ VECTOR(graph->oi)[i] ] == vid) {
  ------------------
  |  |   60|  18.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1195:21): [True: 10.6k, False: 8.19k]
  ------------------
 1196|  10.6k|                    loop_counter++;
 1197|  10.6k|                }
 1198|  18.8k|            }
 1199|  2.30k|        }
 1200|  4.60k|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1200:13): [True: 2.30k, False: 2.30k]
  ------------------
 1201|  5.25k|            for (igraph_int_t i = VECTOR(graph->is)[vid]; i < VECTOR(graph->is)[vid + 1]; i++) {
  ------------------
  |  |   60|  2.30k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          for (igraph_int_t i = VECTOR(graph->is)[vid]; i < VECTOR(graph->is)[vid + 1]; i++) {
  ------------------
  |  |   60|  5.25k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1201:59): [True: 2.95k, False: 2.30k]
  ------------------
 1202|  2.95k|                if (VECTOR(graph->from)[ VECTOR(graph->ii)[i] ] == vid) {
  ------------------
  |  |   60|  2.95k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (VECTOR(graph->from)[ VECTOR(graph->ii)[i] ] == vid) {
  ------------------
  |  |   60|  2.95k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1202:21): [True: 0, False: 2.95k]
  ------------------
 1203|      0|                    loop_counter++;
 1204|      0|                }
 1205|  2.95k|            }
 1206|  2.30k|        }
 1207|       |
 1208|  4.60k|        if (loops == IGRAPH_NO_LOOPS || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1208:13): [True: 4.60k, False: 0]
  |  Branch (1208:41): [True: 0, False: 0]
  ------------------
 1209|  4.60k|            *deg -= loop_counter;
 1210|  4.60k|        } else {
 1211|       |            /* loops == IGRAPH_LOOPS_ONCE && mode == IGRAPH_ALL */
 1212|      0|            *deg -= loop_counter / 2;
 1213|      0|        }
 1214|  4.60k|    }
 1215|       |
 1216|  6.90k|    return IGRAPH_SUCCESS;
 1217|  6.90k|}
igraph_degree:
 1268|  47.5k|) {
 1269|       |
 1270|  47.5k|    igraph_int_t nodes_to_calc;
 1271|  47.5k|    igraph_int_t i, j;
 1272|  47.5k|    igraph_vit_t vit;
 1273|       |
 1274|  47.5k|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|  47.5k|    do { \
  |  |  657|  47.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  47.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  47.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 47.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|  47.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 47.5k]
  |  |  ------------------
  ------------------
 1275|  47.5k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  47.5k|    do { \
  |  |  604|  47.5k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  47.5k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  47.5k|         * incorrect destructor function with the pointer */ \
  |  |  607|  47.5k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 47.5k]
  |  |  ------------------
  |  |  608|  47.5k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  47.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 47.5k]
  |  |  ------------------
  ------------------
 1276|       |
 1277|  47.5k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1277:9): [True: 23.6k, False: 23.9k]
  |  Branch (1277:31): [True: 2.59k, False: 21.0k]
  |  Branch (1277:52): [True: 0, False: 2.59k]
  ------------------
 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|  47.5k|    if (loops == IGRAPH_NO_LOOPS || loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (1281:9): [True: 8.08k, False: 39.4k]
  |  Branch (1281:37): [True: 0, False: 39.4k]
  ------------------
 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|  8.08k|        if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (1285:13): [True: 8.08k, False: 0]
  ------------------
 1286|  8.08k|            !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (1286:13): [True: 5.61k, False: 2.46k]
  ------------------
 1287|  5.61k|            loops = IGRAPH_LOOPS_TWICE;
 1288|  5.61k|        }
 1289|  8.08k|    }
 1290|       |
 1291|  47.5k|    if (loops == IGRAPH_LOOPS_ONCE && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1291:9): [True: 0, False: 47.5k]
  |  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|  47.5k|    nodes_to_calc = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|  47.5k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
 1297|  47.5k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1297:9): [True: 0, False: 47.5k]
  ------------------
 1298|      0|        mode = IGRAPH_ALL;
 1299|      0|    }
 1300|       |
 1301|  47.5k|    IGRAPH_CHECK(igraph_vector_int_resize(res, nodes_to_calc));
  ------------------
  |  |  656|  47.5k|    do { \
  |  |  657|  47.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  47.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  47.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 47.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|  47.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 47.5k]
  |  |  ------------------
  ------------------
 1302|  47.5k|    igraph_vector_int_null(res);
 1303|       |
 1304|  47.5k|    if (loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1304:9): [True: 45.1k, False: 2.46k]
  ------------------
 1305|  45.1k|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1305:13): [True: 24.8k, False: 20.2k]
  ------------------
 1306|  24.8k|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|  24.8k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1307|  4.20M|                 !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|  4.20M|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1307:18): [True: 4.17M, False: 24.8k]
  ------------------
 1308|  4.17M|                 IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|  4.17M|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1309|  4.17M|                igraph_int_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  4.17M|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 4.17M, False: 0]
  |  |  ------------------
  |  |  215|  4.17M|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1310|  4.17M|                VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|  4.17M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|  4.17M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|  4.17M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1311|  4.17M|            }
 1312|  24.8k|        }
 1313|  45.1k|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1313:13): [True: 21.9k, False: 23.1k]
  ------------------
 1314|  21.9k|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|  21.9k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1315|  3.70M|                 !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|  3.70M|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1315:18): [True: 3.68M, False: 21.9k]
  ------------------
 1316|  3.68M|                 IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|  3.68M|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1317|  3.68M|                igraph_int_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  3.68M|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 3.68M, False: 0]
  |  |  ------------------
  |  |  215|  3.68M|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1318|  3.68M|                VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|  3.68M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|  3.68M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|  3.68M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1319|  3.68M|            }
 1320|  21.9k|        }
 1321|  45.1k|    } else if (loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (1321:16): [True: 0, False: 2.46k]
  ------------------
 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.46k|    } else {
 1368|       |        /* no loops should be counted */
 1369|  2.46k|        if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (1369:13): [True: 2.46k, False: 0]
  ------------------
 1370|       |            // When calculating degree for all vertices, iterating over edges is faster
 1371|  2.46k|            igraph_int_t no_of_edges = igraph_ecount(graph);
 1372|       |
 1373|  2.46k|            if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1373:17): [True: 1.70k, False: 763]
  ------------------
 1374|  74.9k|                for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (1374:45): [True: 73.2k, False: 1.70k]
  ------------------
 1375|  73.2k|                    igraph_int_t from = IGRAPH_FROM(graph, edge);
  ------------------
  |  |  115|  73.2k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  73.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1376|  73.2k|                    if (from != IGRAPH_TO(graph, edge)) {
  ------------------
  |  |  128|  73.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  73.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1376:25): [True: 39.9k, False: 33.2k]
  ------------------
 1377|  39.9k|                        VECTOR(*res)[from]++;
  ------------------
  |  |   60|  39.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1378|  39.9k|                    }
 1379|  73.2k|                }
 1380|  1.70k|            }
 1381|  2.46k|            if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1381:17): [True: 1.70k, False: 763]
  ------------------
 1382|  74.9k|                for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (1382:45): [True: 73.2k, False: 1.70k]
  ------------------
 1383|  73.2k|                    igraph_int_t to = IGRAPH_TO(graph, edge);
  ------------------
  |  |  128|  73.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  73.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1384|  73.2k|                    if (IGRAPH_FROM(graph, edge) != to) {
  ------------------
  |  |  115|  73.2k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  73.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1384:25): [True: 39.9k, False: 33.2k]
  ------------------
 1385|  39.9k|                        VECTOR(*res)[to]++;
  ------------------
  |  |   60|  39.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1386|  39.9k|                    }
 1387|  73.2k|                }
 1388|  1.70k|            }
 1389|  2.46k|        } 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.46k|    }
 1420|       |
 1421|  47.5k|    igraph_vit_destroy(&vit);
 1422|  47.5k|    IGRAPH_FINALLY_CLEAN(1);
 1423|       |
 1424|  47.5k|    return IGRAPH_SUCCESS;
 1425|  47.5k|}
igraph_get_eid:
 1524|  3.39k|                   igraph_bool_t directed, igraph_bool_t error) {
 1525|       |
 1526|  3.39k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
 1527|       |
 1528|  3.39k|    if (from < 0 || to < 0 || from >= no_of_nodes || to >= no_of_nodes) {
  ------------------
  |  Branch (1528:9): [True: 0, False: 3.39k]
  |  Branch (1528:21): [True: 0, False: 3.39k]
  |  Branch (1528:31): [True: 0, False: 3.39k]
  |  Branch (1528:54): [True: 0, False: 3.39k]
  ------------------
 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.39k|    *eid = -1;
 1533|  3.39k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (1533:9): [True: 3.39k, False: 0]
  ------------------
 1534|       |
 1535|       |        /* Directed graph */
 1536|  3.39k|        FIND_DIRECTED_EDGE(graph, from, to, eid);
  ------------------
  |  | 1469|  3.39k|    do { \
  |  | 1470|  3.39k|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   60|  3.39k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1471|  3.39k|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   60|  3.39k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1472|  3.39k|        igraph_int_t N = end; \
  |  | 1473|  3.39k|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   60|  3.39k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1474|  3.39k|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   60|  3.39k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1475|  3.39k|        igraph_int_t N2 = end2; \
  |  | 1476|  3.39k|        igraph_int_t *nullpointer = NULL; \
  |  | 1477|  3.39k|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1477:13): [True: 371, False: 3.02k]
  |  |  ------------------
  |  | 1478|    371|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1449|    371|    do { \
  |  |  |  | 1450|    781|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 410, False: 371]
  |  |  |  |  ------------------
  |  |  |  | 1451|    410|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|    410|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    410|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|    410|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    410|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 177, False: 233]
  |  |  |  |  ------------------
  |  |  |  | 1454|    177|                (start) = mid+1; \
  |  |  |  | 1455|    233|            } else { \
  |  |  |  | 1456|    233|                (end) = mid; \
  |  |  |  | 1457|    233|            } \
  |  |  |  | 1458|    410|        } \
  |  |  |  | 1459|    371|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 200, False: 171]
  |  |  |  |  ------------------
  |  |  |  | 1460|    200|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    200|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|    200|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    200|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 26, False: 174]
  |  |  |  |  ------------------
  |  |  |  | 1462|     26|                *(result) = e; \
  |  |  |  | 1463|     26|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 0, False: 26]
  |  |  |  |  ------------------
  |  |  |  | 1464|     26|            } \
  |  |  |  | 1465|    200|        } \
  |  |  |  | 1466|    371|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 371]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1479|  3.02k|        } else { \
  |  | 1480|  3.02k|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1449|  3.02k|    do { \
  |  |  |  | 1450|  6.13k|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 3.11k, False: 3.02k]
  |  |  |  |  ------------------
  |  |  |  | 1451|  3.11k|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|  3.11k|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.11k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|  3.11k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.11k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 1.48k, False: 1.62k]
  |  |  |  |  ------------------
  |  |  |  | 1454|  1.48k|                (start) = mid+1; \
  |  |  |  | 1455|  1.62k|            } else { \
  |  |  |  | 1456|  1.62k|                (end) = mid; \
  |  |  |  | 1457|  1.62k|            } \
  |  |  |  | 1458|  3.11k|        } \
  |  |  |  | 1459|  3.02k|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 1.54k, False: 1.47k]
  |  |  |  |  ------------------
  |  |  |  | 1460|  1.54k|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.54k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|  1.54k|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.54k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 61, False: 1.48k]
  |  |  |  |  ------------------
  |  |  |  | 1462|     61|                *(result) = e; \
  |  |  |  | 1463|     61|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 0, False: 61]
  |  |  |  |  ------------------
  |  |  |  | 1464|     61|            } \
  |  |  |  | 1465|  1.54k|        } \
  |  |  |  | 1466|  3.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 3.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1481|  3.02k|        } \
  |  | 1482|  3.39k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1482:14): [Folded, False: 3.39k]
  |  |  ------------------
  ------------------
 1537|  3.39k|        if (!directed && *eid < 0) {
  ------------------
  |  Branch (1537:13): [True: 0, False: 3.39k]
  |  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.39k|    } else {
 1542|       |
 1543|       |        /* Undirected graph, they only have one mode */
 1544|      0|        FIND_UNDIRECTED_EDGE(graph, from, to, eid);
  ------------------
  |  | 1485|      0|    do { \
  |  | 1486|      0|        igraph_int_t xfrom1 = from > to ? from : to; \
  |  |  ------------------
  |  |  |  Branch (1486:31): [True: 0, False: 0]
  |  |  ------------------
  |  | 1487|      0|        igraph_int_t xto1 = from > to ? to : from; \
  |  |  ------------------
  |  |  |  Branch (1487:29): [True: 0, False: 0]
  |  |  ------------------
  |  | 1488|      0|        FIND_DIRECTED_EDGE(graph, xfrom1, xto1, 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]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1489|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1489:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1545|       |
 1546|      0|    }
 1547|       |
 1548|  3.39k|    if (*eid < 0) {
  ------------------
  |  Branch (1548:9): [True: 3.30k, False: 87]
  ------------------
 1549|  3.30k|        if (error) {
  ------------------
  |  Branch (1549:13): [True: 0, False: 3.30k]
  ------------------
 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.30k|    }
 1553|       |
 1554|  3.39k|    return IGRAPH_SUCCESS;
 1555|  3.39k|}
igraph_get_eids:
 1602|  2.27k|                    igraph_bool_t directed, igraph_bool_t error) {
 1603|       |
 1604|  2.27k|    igraph_int_t n = pairs ? igraph_vector_int_size(pairs) : 0;
  ------------------
  |  Branch (1604:22): [True: 2.27k, False: 0]
  ------------------
 1605|  2.27k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
 1606|  2.27k|    igraph_int_t i;
 1607|  2.27k|    igraph_int_t eid = -1;
 1608|       |
 1609|  2.27k|    if (n == 0) {
  ------------------
  |  Branch (1609:9): [True: 0, False: 2.27k]
  ------------------
 1610|      0|        igraph_vector_int_clear(eids);
 1611|      0|        return IGRAPH_SUCCESS;
 1612|      0|    }
 1613|       |
 1614|  2.27k|    if (n % 2 != 0) {
  ------------------
  |  Branch (1614:9): [True: 0, False: 2.27k]
  ------------------
 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.27k|    if (!igraph_vector_int_isininterval(pairs, 0, no_of_nodes - 1)) {
  ------------------
  |  Branch (1619:9): [True: 0, False: 2.27k]
  ------------------
 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.27k|    IGRAPH_CHECK(igraph_vector_int_resize(eids, n / 2));
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
 1624|       |
 1625|  2.27k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (1625:9): [True: 2.27k, False: 0]
  ------------------
 1626|  91.4k|        for (i = 0; i < n / 2; i++) {
  ------------------
  |  Branch (1626:21): [True: 89.1k, False: 2.27k]
  ------------------
 1627|  89.1k|            igraph_int_t from = VECTOR(*pairs)[2 * i];
  ------------------
  |  |   60|  89.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1628|  89.1k|            igraph_int_t to = VECTOR(*pairs)[2 * i + 1];
  ------------------
  |  |   60|  89.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1629|       |
 1630|  89.1k|            eid = -1;
 1631|  89.1k|            FIND_DIRECTED_EDGE(graph, from, to, &eid);
  ------------------
  |  | 1469|  89.1k|    do { \
  |  | 1470|  89.1k|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   60|  89.1k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1471|  89.1k|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   60|  89.1k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1472|  89.1k|        igraph_int_t N = end; \
  |  | 1473|  89.1k|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   60|  89.1k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1474|  89.1k|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   60|  89.1k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1475|  89.1k|        igraph_int_t N2 = end2; \
  |  | 1476|  89.1k|        igraph_int_t *nullpointer = NULL; \
  |  | 1477|  89.1k|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1477:13): [True: 25.5k, False: 63.5k]
  |  |  ------------------
  |  | 1478|  25.5k|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1449|  25.5k|    do { \
  |  |  |  | 1450|  94.4k|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 68.8k, False: 25.5k]
  |  |  |  |  ------------------
  |  |  |  | 1451|  68.8k|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|  68.8k|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  68.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|  68.8k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  68.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 1.75k, False: 67.1k]
  |  |  |  |  ------------------
  |  |  |  | 1454|  1.75k|                (start) = mid+1; \
  |  |  |  | 1455|  67.1k|            } else { \
  |  |  |  | 1456|  67.1k|                (end) = mid; \
  |  |  |  | 1457|  67.1k|            } \
  |  |  |  | 1458|  68.8k|        } \
  |  |  |  | 1459|  25.5k|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 24.6k, False: 948]
  |  |  |  |  ------------------
  |  |  |  | 1460|  24.6k|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  24.6k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|  24.6k|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  24.6k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 24.4k, False: 173]
  |  |  |  |  ------------------
  |  |  |  | 1462|  24.4k|                *(result) = e; \
  |  |  |  | 1463|  24.4k|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 0, False: 24.4k]
  |  |  |  |  ------------------
  |  |  |  | 1464|  24.4k|            } \
  |  |  |  | 1465|  24.6k|        } \
  |  |  |  | 1466|  25.5k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 25.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1479|  63.5k|        } else { \
  |  | 1480|  63.5k|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1449|  63.5k|    do { \
  |  |  |  | 1450|   214k|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 150k, False: 63.5k]
  |  |  |  |  ------------------
  |  |  |  | 1451|   150k|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|   150k|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   150k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|   150k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   150k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 4.01k, False: 146k]
  |  |  |  |  ------------------
  |  |  |  | 1454|  4.01k|                (start) = mid+1; \
  |  |  |  | 1455|   146k|            } else { \
  |  |  |  | 1456|   146k|                (end) = mid; \
  |  |  |  | 1457|   146k|            } \
  |  |  |  | 1458|   150k|        } \
  |  |  |  | 1459|  63.5k|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 59.3k, False: 4.18k]
  |  |  |  |  ------------------
  |  |  |  | 1460|  59.3k|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  59.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|  59.3k|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  59.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 58.7k, False: 651]
  |  |  |  |  ------------------
  |  |  |  | 1462|  58.7k|                *(result) = e; \
  |  |  |  | 1463|  58.7k|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 0, False: 58.7k]
  |  |  |  |  ------------------
  |  |  |  | 1464|  58.7k|            } \
  |  |  |  | 1465|  59.3k|        } \
  |  |  |  | 1466|  63.5k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 63.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1481|  63.5k|        } \
  |  | 1482|  89.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1482:14): [Folded, False: 89.1k]
  |  |  ------------------
  ------------------
 1632|  89.1k|            if (!directed && eid < 0) {
  ------------------
  |  Branch (1632:17): [True: 0, False: 89.1k]
  |  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|  89.1k|            VECTOR(*eids)[i] = eid;
  ------------------
  |  |   60|  89.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1637|  89.1k|            if (eid < 0 && error) {
  ------------------
  |  Branch (1637:17): [True: 5.95k, False: 83.1k]
  |  Branch (1637:28): [True: 0, False: 5.95k]
  ------------------
 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|  89.1k|        }
 1641|  2.27k|    } else {
 1642|      0|        for (i = 0; i < n / 2; i++) {
  ------------------
  |  Branch (1642:21): [True: 0, False: 0]
  ------------------
 1643|      0|            igraph_int_t from = VECTOR(*pairs)[2 * i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1644|      0|            igraph_int_t to = VECTOR(*pairs)[2 * i + 1];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1645|       |
 1646|      0|            eid = -1;
 1647|      0|            FIND_UNDIRECTED_EDGE(graph, from, to, &eid);
  ------------------
  |  | 1485|      0|    do { \
  |  | 1486|      0|        igraph_int_t xfrom1 = from > to ? from : to; \
  |  |  ------------------
  |  |  |  Branch (1486:31): [True: 0, False: 0]
  |  |  ------------------
  |  | 1487|      0|        igraph_int_t xto1 = from > to ? to : from; \
  |  |  ------------------
  |  |  |  Branch (1487:29): [True: 0, False: 0]
  |  |  ------------------
  |  | 1488|      0|        FIND_DIRECTED_EDGE(graph, xfrom1, xto1, 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]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1489|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1489:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1648|      0|            VECTOR(*eids)[i] = eid;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1649|      0|            if (eid < 0 && error) {
  ------------------
  |  Branch (1649:17): [True: 0, False: 0]
  |  Branch (1649:28): [True: 0, False: 0]
  ------------------
 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|      0|        }
 1653|      0|    }
 1654|       |
 1655|  2.27k|    return IGRAPH_SUCCESS;
 1656|  2.27k|}
igraph_get_all_eids_between:
 1718|  6.83k|) {
 1719|  6.83k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
 1720|       |
 1721|  6.83k|    if (source < 0 || source >= no_of_nodes) {
  ------------------
  |  Branch (1721:9): [True: 0, False: 6.83k]
  |  Branch (1721:23): [True: 0, False: 6.83k]
  ------------------
 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|  6.83k|    if (target < 0 || target >= no_of_nodes) {
  ------------------
  |  Branch (1725:9): [True: 0, False: 6.83k]
  |  Branch (1725:23): [True: 0, False: 6.83k]
  ------------------
 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|  6.83k|    igraph_vector_int_clear(eids);
 1730|       |
 1731|  6.83k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (1731:9): [True: 6.83k, False: 0]
  ------------------
 1732|       |        /* look in the specified direction first */
 1733|  6.83k|        FIND_ALL_DIRECTED_EDGES(graph, source, target, eids);
  ------------------
  |  | 1662|  6.83k|    do { \
  |  | 1663|  6.83k|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   60|  6.83k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1664|  6.83k|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   60|  6.83k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1665|  6.83k|        igraph_int_t N = end; \
  |  | 1666|  6.83k|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   60|  6.83k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1667|  6.83k|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   60|  6.83k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1668|  6.83k|        igraph_int_t N2 = end2; \
  |  | 1669|  6.83k|        igraph_int_t eid = -1; \
  |  | 1670|  6.83k|        igraph_int_t pos = -1; \
  |  | 1671|  6.83k|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1671:13): [True: 1.64k, False: 5.18k]
  |  |  ------------------
  |  | 1672|  1.64k|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, &eid, &pos); \
  |  |  ------------------
  |  |  |  | 1449|  1.64k|    do { \
  |  |  |  | 1450|  3.11k|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 1.47k, False: 1.64k]
  |  |  |  |  ------------------
  |  |  |  | 1451|  1.47k|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|  1.47k|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.47k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|  1.47k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.47k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 52, False: 1.42k]
  |  |  |  |  ------------------
  |  |  |  | 1454|     52|                (start) = mid+1; \
  |  |  |  | 1455|  1.42k|            } else { \
  |  |  |  | 1456|  1.42k|                (end) = mid; \
  |  |  |  | 1457|  1.42k|            } \
  |  |  |  | 1458|  1.47k|        } \
  |  |  |  | 1459|  1.64k|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 708, False: 934]
  |  |  |  |  ------------------
  |  |  |  | 1460|    708|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    708|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|    708|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    708|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 451, False: 257]
  |  |  |  |  ------------------
  |  |  |  | 1462|    451|                *(result) = e; \
  |  |  |  | 1463|    451|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 451, Folded]
  |  |  |  |  ------------------
  |  |  |  | 1464|    451|            } \
  |  |  |  | 1465|    708|        } \
  |  |  |  | 1466|  1.64k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1673|  7.07k|            while (pos >= 0 && pos < N) { \
  |  |  ------------------
  |  |  |  Branch (1673:20): [True: 5.88k, False: 1.19k]
  |  |  |  Branch (1673:32): [True: 5.56k, False: 319]
  |  |  ------------------
  |  | 1674|  5.56k|                eid = VECTOR(graph->oi)[pos++]; \
  |  |  ------------------
  |  |  |  |   60|  5.56k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1675|  5.56k|                if (VECTOR(graph->to)[eid] != xto) { break; } \
  |  |  ------------------
  |  |  |  |   60|  5.56k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  |  Branch (1675:21): [True: 132, False: 5.43k]
  |  |  ------------------
  |  | 1676|  5.56k|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  ------------------
  |  |  |  |  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]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1677|  5.43k|            } \
  |  | 1678|  5.18k|        } else { \
  |  | 1679|  5.18k|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, &eid, &pos); \
  |  |  ------------------
  |  |  |  | 1449|  5.18k|    do { \
  |  |  |  | 1450|  8.21k|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 3.02k, False: 5.18k]
  |  |  |  |  ------------------
  |  |  |  | 1451|  3.02k|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|  3.02k|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.02k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|  3.02k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.02k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 86, False: 2.94k]
  |  |  |  |  ------------------
  |  |  |  | 1454|     86|                (start) = mid+1; \
  |  |  |  | 1455|  2.94k|            } else { \
  |  |  |  | 1456|  2.94k|                (end) = mid; \
  |  |  |  | 1457|  2.94k|            } \
  |  |  |  | 1458|  3.02k|        } \
  |  |  |  | 1459|  5.18k|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 1.65k, False: 3.53k]
  |  |  |  |  ------------------
  |  |  |  | 1460|  1.65k|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.65k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|  1.65k|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.65k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 775, False: 883]
  |  |  |  |  ------------------
  |  |  |  | 1462|    775|                *(result) = e; \
  |  |  |  | 1463|    775|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 775, Folded]
  |  |  |  |  ------------------
  |  |  |  | 1464|    775|            } \
  |  |  |  | 1465|  1.65k|        } \
  |  |  |  | 1466|  5.18k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 5.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1680|  14.2k|            while (pos >= 0 && pos < N2) { \
  |  |  ------------------
  |  |  |  Branch (1680:20): [True: 9.85k, False: 4.41k]
  |  |  |  Branch (1680:32): [True: 9.32k, False: 533]
  |  |  ------------------
  |  | 1681|  9.32k|                eid = VECTOR(graph->ii)[pos++]; \
  |  |  ------------------
  |  |  |  |   60|  9.32k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1682|  9.32k|                if (VECTOR(graph->from)[eid] != xfrom) { break; } \
  |  |  ------------------
  |  |  |  |   60|  9.32k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  |  Branch (1682:21): [True: 242, False: 9.08k]
  |  |  ------------------
  |  | 1683|  9.32k|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  ------------------
  |  |  |  |  656|  9.08k|    do { \
  |  |  |  |  657|  9.08k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  9.08k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  9.08k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, 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.08k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 9.08k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1684|  9.08k|            } \
  |  | 1685|  5.18k|        } \
  |  | 1686|  6.83k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1686:14): [Folded, False: 6.83k]
  |  |  ------------------
  ------------------
 1734|  6.83k|        if (!directed) {
  ------------------
  |  Branch (1734:13): [True: 4.55k, False: 2.27k]
  ------------------
 1735|       |            /* look in the reverse direction as well */
 1736|  4.55k|            FIND_ALL_DIRECTED_EDGES(graph, target, source, eids);
  ------------------
  |  | 1662|  4.55k|    do { \
  |  | 1663|  4.55k|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   60|  4.55k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1664|  4.55k|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   60|  4.55k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1665|  4.55k|        igraph_int_t N = end; \
  |  | 1666|  4.55k|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   60|  4.55k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1667|  4.55k|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   60|  4.55k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1668|  4.55k|        igraph_int_t N2 = end2; \
  |  | 1669|  4.55k|        igraph_int_t eid = -1; \
  |  | 1670|  4.55k|        igraph_int_t pos = -1; \
  |  | 1671|  4.55k|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1671:13): [True: 721, False: 3.83k]
  |  |  ------------------
  |  | 1672|    721|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, &eid, &pos); \
  |  |  ------------------
  |  |  |  | 1449|    721|    do { \
  |  |  |  | 1450|  1.63k|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 912, False: 721]
  |  |  |  |  ------------------
  |  |  |  | 1451|    912|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|    912|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    912|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|    912|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    912|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 52, False: 860]
  |  |  |  |  ------------------
  |  |  |  | 1454|     52|                (start) = mid+1; \
  |  |  |  | 1455|    860|            } else { \
  |  |  |  | 1456|    860|                (end) = mid; \
  |  |  |  | 1457|    860|            } \
  |  |  |  | 1458|    912|        } \
  |  |  |  | 1459|    721|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 412, False: 309]
  |  |  |  |  ------------------
  |  |  |  | 1460|    412|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    412|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|    412|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    412|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 257, False: 155]
  |  |  |  |  ------------------
  |  |  |  | 1462|    257|                *(result) = e; \
  |  |  |  | 1463|    257|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 257, Folded]
  |  |  |  |  ------------------
  |  |  |  | 1464|    257|            } \
  |  |  |  | 1465|    412|        } \
  |  |  |  | 1466|    721|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 721]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1673|  4.25k|            while (pos >= 0 && pos < N) { \
  |  |  ------------------
  |  |  |  Branch (1673:20): [True: 3.79k, False: 464]
  |  |  |  Branch (1673:32): [True: 3.62k, False: 172]
  |  |  ------------------
  |  | 1674|  3.62k|                eid = VECTOR(graph->oi)[pos++]; \
  |  |  ------------------
  |  |  |  |   60|  3.62k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1675|  3.62k|                if (VECTOR(graph->to)[eid] != xto) { break; } \
  |  |  ------------------
  |  |  |  |   60|  3.62k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  |  Branch (1675:21): [True: 85, False: 3.53k]
  |  |  ------------------
  |  | 1676|  3.62k|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  ------------------
  |  |  |  |  656|  3.53k|    do { \
  |  |  |  |  657|  3.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  3.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  3.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.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|  3.53k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 3.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1677|  3.53k|            } \
  |  | 1678|  3.83k|        } else { \
  |  | 1679|  3.83k|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, &eid, &pos); \
  |  |  ------------------
  |  |  |  | 1449|  3.83k|    do { \
  |  |  |  | 1450|  6.24k|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 2.40k, False: 3.83k]
  |  |  |  |  ------------------
  |  |  |  | 1451|  2.40k|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|  2.40k|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  2.40k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|  2.40k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  2.40k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 0, False: 2.40k]
  |  |  |  |  ------------------
  |  |  |  | 1454|      0|                (start) = mid+1; \
  |  |  |  | 1455|  2.40k|            } else { \
  |  |  |  | 1456|  2.40k|                (end) = mid; \
  |  |  |  | 1457|  2.40k|            } \
  |  |  |  | 1458|  2.40k|        } \
  |  |  |  | 1459|  3.83k|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 1.32k, False: 2.50k]
  |  |  |  |  ------------------
  |  |  |  | 1460|  1.32k|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.32k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|  1.32k|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.32k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 615, False: 712]
  |  |  |  |  ------------------
  |  |  |  | 1462|    615|                *(result) = e; \
  |  |  |  | 1463|    615|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 615, Folded]
  |  |  |  |  ------------------
  |  |  |  | 1464|    615|            } \
  |  |  |  | 1465|  1.32k|        } \
  |  |  |  | 1466|  3.83k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 3.83k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1680|  11.4k|            while (pos >= 0 && pos < N2) { \
  |  |  ------------------
  |  |  |  Branch (1680:20): [True: 8.24k, False: 3.21k]
  |  |  |  Branch (1680:32): [True: 7.85k, False: 397]
  |  |  ------------------
  |  | 1681|  7.85k|                eid = VECTOR(graph->ii)[pos++]; \
  |  |  ------------------
  |  |  |  |   60|  7.85k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1682|  7.85k|                if (VECTOR(graph->from)[eid] != xfrom) { break; } \
  |  |  ------------------
  |  |  |  |   60|  7.85k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  |  Branch (1682:21): [True: 218, False: 7.63k]
  |  |  ------------------
  |  | 1683|  7.85k|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  ------------------
  |  |  |  |  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]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1684|  7.63k|            } \
  |  | 1685|  3.83k|        } \
  |  | 1686|  4.55k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1686:14): [Folded, False: 4.55k]
  |  |  ------------------
  ------------------
 1737|  4.55k|        }
 1738|  6.83k|    } else {
 1739|      0|        FIND_ALL_UNDIRECTED_EDGES(graph, source, target, eids);
  ------------------
  |  | 1689|      0|    do { \
  |  | 1690|      0|        igraph_int_t xfrom1 = from > to ? from : to; \
  |  |  ------------------
  |  |  |  Branch (1690:31): [True: 0, False: 0]
  |  |  ------------------
  |  | 1691|      0|        igraph_int_t xto1 = from > to ? to : from; \
  |  |  ------------------
  |  |  |  Branch (1691:29): [True: 0, False: 0]
  |  |  ------------------
  |  | 1692|      0|        FIND_ALL_DIRECTED_EDGES(graph, xfrom1, xto1, eidvec); \
  |  |  ------------------
  |  |  |  | 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]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1693|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1693:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1740|      0|    }
 1741|       |
 1742|  6.83k|    return IGRAPH_SUCCESS;
 1743|  6.83k|}
igraph_incident:
 1778|  2.19M|) {
 1779|  2.19M|    igraph_int_t length = 0, idx = 0;
 1780|  2.19M|    igraph_int_t i, j;
 1781|  2.19M|    igraph_int_t node = pnode;
 1782|  2.19M|    igraph_bool_t directed = igraph_is_directed(graph);
 1783|       |
 1784|  2.19M|    if (node < 0 || node > igraph_vcount(graph) - 1) {
  ------------------
  |  Branch (1784:9): [True: 0, False: 2.19M]
  |  Branch (1784:21): [True: 0, False: 2.19M]
  ------------------
 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.19M|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (1787:9): [True: 1.02M, False: 1.16M]
  |  Branch (1787:31): [True: 37.6k, False: 985k]
  ------------------
 1788|  37.6k|        mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1788:9): [True: 0, False: 37.6k]
  ------------------
 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.19M|    if (!directed) {
  ------------------
  |  Branch (1792:9): [True: 0, False: 2.19M]
  ------------------
 1793|      0|        mode = IGRAPH_ALL;
 1794|      0|    }
 1795|       |
 1796|  2.19M|    if (mode != IGRAPH_ALL && loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1796:9): [True: 2.15M, False: 37.6k]
  |  Branch (1796:31): [True: 1.96M, False: 192k]
  ------------------
 1797|       |        /*
 1798|       |        IGRAPH_ERROR("For a directed graph (with directions not ignored), "
 1799|       |                     "IGRAPH_LOOPS_TWICE does not make sense.", IGRAPH_EINVAL);
 1800|       |        */
 1801|  1.96M|        loops = IGRAPH_LOOPS_ONCE;
 1802|  1.96M|    }
 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.19M|    if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1807:9): [True: 1.20M, False: 985k]
  ------------------
 1808|  1.20M|        length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|  1.20M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|  1.20M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1809|  1.20M|    }
 1810|  2.19M|    if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1810:9): [True: 1.02M, False: 1.16M]
  ------------------
 1811|  1.02M|        length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|  1.02M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|  1.02M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1812|  1.02M|    }
 1813|       |
 1814|  2.19M|    IGRAPH_CHECK(igraph_vector_int_resize(eids, length));
  ------------------
  |  |  656|  2.19M|    do { \
  |  |  657|  2.19M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.19M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.19M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.19M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.19M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.19M]
  |  |  ------------------
  ------------------
 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.19M|    if (!directed || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1823:9): [True: 0, False: 2.19M]
  |  Branch (1823:22): [True: 2.15M, False: 37.6k]
  ------------------
 1824|       |        /* We did not ask for both directions; this is the easy case */
 1825|       |
 1826|  2.15M|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1826:13): [True: 1.16M, False: 985k]
  ------------------
 1827|  1.16M|            j = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|  1.16M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1828|  1.64M|            for (i = VECTOR(graph->os)[node]; i < j; i++) {
  ------------------
  |  |   60|  1.16M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1828:47): [True: 474k, False: 1.16M]
  ------------------
 1829|   474k|                igraph_int_t edge = VECTOR(graph->oi)[i];
  ------------------
  |  |   60|   474k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1830|   474k|                igraph_int_t other = VECTOR(graph->to)[edge];
  ------------------
  |  |   60|   474k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1831|   474k|                if (loops == IGRAPH_NO_LOOPS && other == pnode) {
  ------------------
  |  Branch (1831:21): [True: 0, False: 474k]
  |  Branch (1831:49): [True: 0, False: 0]
  ------------------
 1832|      0|                    length--;
 1833|   474k|                } else {
 1834|   474k|                    VECTOR(*eids)[idx++] = edge;
  ------------------
  |  |   60|   474k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1835|   474k|                }
 1836|   474k|            }
 1837|  1.16M|        }
 1838|       |
 1839|  2.15M|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1839:13): [True: 985k, False: 1.16M]
  ------------------
 1840|   985k|            j = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|   985k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1841|  1.27M|            for (i = VECTOR(graph->is)[node]; i < j; i++) {
  ------------------
  |  |   60|   985k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1841:47): [True: 288k, False: 985k]
  ------------------
 1842|   288k|                igraph_int_t edge = VECTOR(graph->ii)[i];
  ------------------
  |  |   60|   288k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1843|   288k|                igraph_int_t other = VECTOR(graph->from)[edge];
  ------------------
  |  |   60|   288k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1844|   288k|                if ((loops == IGRAPH_NO_LOOPS || (loops == IGRAPH_LOOPS_ONCE && !directed)) && other == pnode) {
  ------------------
  |  Branch (1844:22): [True: 0, False: 288k]
  |  Branch (1844:51): [True: 288k, False: 0]
  |  Branch (1844:81): [True: 0, False: 288k]
  |  Branch (1844:96): [True: 0, False: 0]
  ------------------
 1845|      0|                    length--;
 1846|   288k|                } else {
 1847|   288k|                    VECTOR(*eids)[idx++] = edge;
  ------------------
  |  |   60|   288k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1848|   288k|                }
 1849|   288k|            }
 1850|   985k|        }
 1851|  2.15M|    } else {
 1852|       |        /* both in- and out- neighbors in a directed graph,
 1853|       |           we need to merge the two 'vectors' */
 1854|  37.6k|        igraph_int_t j1 = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|  37.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1855|  37.6k|        igraph_int_t j2 = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|  37.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1856|  37.6k|        igraph_int_t i1 = VECTOR(graph->os)[node];
  ------------------
  |  |   60|  37.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1857|  37.6k|        igraph_int_t i2 = VECTOR(graph->is)[node];
  ------------------
  |  |   60|  37.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1858|  37.6k|        igraph_int_t eid1, eid2;
 1859|  37.6k|        igraph_int_t n1, n2;
 1860|  37.6k|        igraph_bool_t seen_loop_edge = false;
 1861|       |
 1862|  71.4k|        while (i1 < j1 && i2 < j2) {
  ------------------
  |  Branch (1862:16): [True: 51.0k, False: 20.3k]
  |  Branch (1862:27): [True: 33.8k, False: 17.2k]
  ------------------
 1863|  33.8k|            eid1 = VECTOR(graph->oi)[i1];
  ------------------
  |  |   60|  33.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1864|  33.8k|            eid2 = VECTOR(graph->ii)[i2];
  ------------------
  |  |   60|  33.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1865|  33.8k|            n1 = VECTOR(graph->to)[eid1];
  ------------------
  |  |   60|  33.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1866|  33.8k|            n2 = VECTOR(graph->from)[eid2];
  ------------------
  |  |   60|  33.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1867|  33.8k|            if (n1 < n2) {
  ------------------
  |  Branch (1867:17): [True: 14.1k, False: 19.6k]
  ------------------
 1868|  14.1k|                i1++;
 1869|  14.1k|                VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|  14.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1870|  19.6k|            } else if (n1 > n2) {
  ------------------
  |  Branch (1870:24): [True: 14.6k, False: 4.98k]
  ------------------
 1871|  14.6k|                i2++;
 1872|  14.6k|                VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|  14.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1873|  14.6k|            } else if (n1 != pnode) {
  ------------------
  |  Branch (1873:24): [True: 4.98k, False: 0]
  ------------------
 1874|       |                /* multiple edge */
 1875|  4.98k|                i1++;
 1876|  4.98k|                i2++;
 1877|  4.98k|                VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|  4.98k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1878|  4.98k|                VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|  4.98k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1879|  4.98k|            } 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|  33.8k|        }
 1899|       |
 1900|  60.3k|        while (i1 < j1) {
  ------------------
  |  Branch (1900:16): [True: 22.6k, False: 37.6k]
  ------------------
 1901|  22.6k|            eid1 = VECTOR(graph->oi)[i1++];
  ------------------
  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1902|  22.6k|            VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|  22.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1903|  22.6k|        }
 1904|       |
 1905|  59.7k|        while (i2 < j2) {
  ------------------
  |  Branch (1905:16): [True: 22.1k, False: 37.6k]
  ------------------
 1906|  22.1k|            eid2 = VECTOR(graph->ii)[i2++];
  ------------------
  |  |   60|  22.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1907|  22.1k|            VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|  22.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1908|  22.1k|        }
 1909|  37.6k|    }
 1910|  2.19M|    IGRAPH_CHECK(igraph_vector_int_resize(eids, length));
  ------------------
  |  |  656|  2.19M|    do { \
  |  |  657|  2.19M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.19M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.19M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.19M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.19M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.19M]
  |  |  ------------------
  ------------------
 1911|  2.19M|    return IGRAPH_SUCCESS;
 1912|  2.19M|}
igraph_i_reverse:
 2001|  2.30k|igraph_error_t igraph_i_reverse(igraph_t *graph) {
 2002|       |
 2003|       |    /* Nothing to do for undirected graphs. */
 2004|  2.30k|    if (! igraph_is_directed(graph)) {
  ------------------
  |  Branch (2004:9): [True: 0, False: 2.30k]
  ------------------
 2005|      0|        return IGRAPH_SUCCESS;
 2006|      0|    }
 2007|       |
 2008|  2.30k|    igraph_vector_int_swap(&graph->to, &graph->from);
 2009|  2.30k|    igraph_vector_int_swap(&graph->oi, &graph->ii);
 2010|  2.30k|    igraph_vector_int_swap(&graph->os, &graph->is);
 2011|       |
 2012|  2.30k|    return IGRAPH_SUCCESS;
 2013|  2.30k|}
type_indexededgelist.c:igraph_i_create_start_vectors:
 1076|  65.8k|        igraph_vector_int_t *iindex, igraph_int_t nodes) {
 1077|       |
 1078|  65.8k|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
 1079|       |
 1080|  65.8k|    igraph_int_t no_of_nodes;
 1081|  65.8k|    igraph_int_t no_of_edges;
 1082|  65.8k|    igraph_int_t i, j, idx;
 1083|       |
 1084|  65.8k|    no_of_nodes = nodes;
 1085|  65.8k|    no_of_edges = igraph_vector_int_size(el);
 1086|       |
 1087|       |    /* result */
 1088|       |
 1089|  65.8k|    IGRAPH_CHECK(igraph_vector_int_resize(res, nodes + 1));
  ------------------
  |  |  656|  65.8k|    do { \
  |  |  657|  65.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  65.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  65.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 65.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|  65.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 65.8k]
  |  |  ------------------
  ------------------
 1090|       |
 1091|       |    /* create the index */
 1092|       |
 1093|  65.8k|    if (no_of_edges == 0) {
  ------------------
  |  Branch (1093:9): [True: 5.09k, False: 60.7k]
  ------------------
 1094|       |        /* empty graph */
 1095|  5.09k|        igraph_vector_int_null(res);
 1096|  60.7k|    } else {
 1097|  60.7k|        idx = -1;
 1098|  3.17M|        for (i = 0; i <= EDGE(0); i++) {
  ------------------
  |  | 1078|  3.17M|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  3.17M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  3.17M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1098:21): [True: 3.11M, False: 60.7k]
  ------------------
 1099|  3.11M|            idx++; VECTOR(*res)[idx] = 0;
  ------------------
  |  |   60|  3.11M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1100|  3.11M|        }
 1101|  1.99M|        for (i = 1; i < no_of_edges; i++) {
  ------------------
  |  Branch (1101:21): [True: 1.93M, False: 60.7k]
  ------------------
 1102|  1.93M|            igraph_int_t n = EDGE(i) - EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1078|  1.93M|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  1.93M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  1.93M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                          igraph_int_t n = EDGE(i) - EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1078|  1.93M|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  1.93M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  1.93M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1103|  10.2M|            for (j = 0; j < n; j++) {
  ------------------
  |  Branch (1103:25): [True: 8.28M, False: 1.93M]
  ------------------
 1104|  8.28M|                idx++; VECTOR(*res)[idx] = i;
  ------------------
  |  |   60|  8.28M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1105|  8.28M|            }
 1106|  1.93M|        }
 1107|  60.7k|        j = EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1078|  60.7k|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  60.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  60.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1108|  4.01M|        for (i = 0; i < no_of_nodes - j; i++) {
  ------------------
  |  Branch (1108:21): [True: 3.95M, False: 60.7k]
  ------------------
 1109|  3.95M|            idx++; VECTOR(*res)[idx] = no_of_edges;
  ------------------
  |  |   60|  3.95M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1110|  3.95M|        }
 1111|  60.7k|    }
 1112|       |
 1113|       |    /* clean */
 1114|       |
 1115|  65.8k|# undef EDGE
 1116|  65.8k|    return IGRAPH_SUCCESS;
 1117|  65.8k|}

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

igraph_qsort:
  264|    626|{
  265|       |	local_qsort(a, n, es, cmp, NULL);
  266|    626|}
qsort.c:local_qsort:
  121|  3.68k|{
  122|  3.68k|	char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
  123|  3.68k|	size_t d1, d2;
  124|  3.68k|	int cmp_result;
  125|  3.68k|	int swap_cnt;
  126|       |
  127|       |    /* if there are less than 2 elements, then sorting is not needed */
  128|  3.68k|    if (IGRAPH_UNLIKELY(n < 2))
  ------------------
  |  |  612|  3.68k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  ------------------
  |  |  |  Branch (612:32): [True: 0, False: 3.68k]
  |  |  ------------------
  ------------------
  129|      0|        return;
  130|  7.41k|loop:
  131|  7.41k|	swap_cnt = 0;
  132|  7.41k|	if (n < 7) {
  ------------------
  |  Branch (132:6): [True: 3.38k, False: 4.03k]
  ------------------
  133|  13.3k|		for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
  ------------------
  |  Branch (133:29): [True: 9.97k, False: 3.38k]
  ------------------
  134|  9.97k|			for (pl = pm;
  135|  21.1k|			     pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
  ------------------
  |  |   95|  17.8k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (135:9): [True: 17.8k, False: 3.32k]
  |  Branch (135:27): [True: 11.2k, False: 6.65k]
  ------------------
  136|  11.2k|			     pl -= es)
  137|  11.2k|				swapfunc(pl, pl - es, es);
  138|  3.38k|		return;
  139|  3.38k|	}
  140|  4.03k|	pm = (char *)a + (n / 2) * es;
  141|  4.03k|	if (n > 7) {
  ------------------
  |  Branch (141:6): [True: 3.53k, False: 498]
  ------------------
  142|  3.53k|		pl = a;
  143|  3.53k|		pn = (char *)a + (n - 1) * es;
  144|  3.53k|		if (n > 40) {
  ------------------
  |  Branch (144:7): [True: 461, False: 3.07k]
  ------------------
  145|    461|			size_t d = (n / 8) * es;
  146|       |
  147|    461|			pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk);
  148|    461|			pm = med3(pm - d, pm, pm + d, cmp, thunk);
  149|    461|			pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk);
  150|    461|		}
  151|  3.53k|		pm = med3(pl, pm, pn, cmp, thunk);
  152|  3.53k|	}
  153|  4.03k|	swapfunc(a, pm, es);
  154|  4.03k|	pa = pb = (char *)a + es;
  155|       |
  156|  4.03k|	pc = pd = (char *)a + (n - 1) * es;
  157|  17.7k|	for (;;) {
  158|  40.5k|		while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) {
  ------------------
  |  |   95|  38.7k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (158:10): [True: 38.7k, False: 1.78k]
  |  Branch (158:22): [True: 22.7k, False: 16.0k]
  ------------------
  159|  22.7k|			if (cmp_result == 0) {
  ------------------
  |  Branch (159:8): [True: 0, False: 22.7k]
  ------------------
  160|      0|				swap_cnt = 1;
  161|      0|				swapfunc(pa, pb, es);
  162|      0|				pa += es;
  163|      0|			}
  164|  22.7k|			pb += es;
  165|  22.7k|		}
  166|  45.8k|		while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) {
  ------------------
  |  |   95|  41.8k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (166:10): [True: 41.8k, False: 4.03k]
  |  Branch (166:22): [True: 28.0k, False: 13.7k]
  ------------------
  167|  28.0k|			if (cmp_result == 0) {
  ------------------
  |  Branch (167:8): [True: 0, False: 28.0k]
  ------------------
  168|      0|				swap_cnt = 1;
  169|      0|				swapfunc(pc, pd, es);
  170|      0|				pd -= es;
  171|      0|			}
  172|  28.0k|			pc -= es;
  173|  28.0k|		}
  174|  17.7k|		if (pb > pc)
  ------------------
  |  Branch (174:7): [True: 4.03k, False: 13.7k]
  ------------------
  175|  4.03k|			break;
  176|  13.7k|		swapfunc(pb, pc, es);
  177|  13.7k|		swap_cnt = 1;
  178|  13.7k|		pb += es;
  179|  13.7k|		pc -= es;
  180|  13.7k|	}
  181|  4.03k|	if (swap_cnt == 0) {  /* Switch to insertion sort */
  ------------------
  |  Branch (181:6): [True: 301, False: 3.73k]
  ------------------
  182|  3.04k|		for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
  ------------------
  |  Branch (182:29): [True: 2.74k, False: 301]
  ------------------
  183|  2.74k|			for (pl = pm;
  184|  9.26k|			     pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
  ------------------
  |  |   95|  8.63k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (184:9): [True: 8.63k, False: 637]
  |  Branch (184:27): [True: 6.52k, False: 2.10k]
  ------------------
  185|  6.52k|			     pl -= es)
  186|  6.52k|				swapfunc(pl, pl - es, es);
  187|    301|		return;
  188|    301|	}
  189|       |
  190|  3.73k|	pn = (char *)a + n * es;
  191|  3.73k|	d1 = MIN(pa - (char *)a, pb - pa);
  ------------------
  |  |   69|  3.73k|#define	MIN(a, b)	((a) < (b) ? a : b)
  |  |  ------------------
  |  |  |  Branch (69:20): [True: 3.21k, False: 523]
  |  |  ------------------
  ------------------
  192|  3.73k|	vecswap(a, pb - d1, d1);
  ------------------
  |  |   88|  3.73k|	if ((n) > 0) swapfunc(a, b, n)
  |  |  ------------------
  |  |  |  Branch (88:6): [True: 3.73k, False: 0]
  |  |  ------------------
  ------------------
  193|       |	/*
  194|       |	 * Cast es to preserve signedness of right-hand side of MIN()
  195|       |	 * expression, to avoid sign ambiguity in the implied comparison.  es
  196|       |	 * is safely within [0, SSIZE_MAX].
  197|       |	 */
  198|  3.73k|	d1 = MIN(pd - pc, pn - pd - (ptrdiff_t)es);
  ------------------
  |  |   69|  3.73k|#define	MIN(a, b)	((a) < (b) ? a : b)
  |  |  ------------------
  |  |  |  Branch (69:20): [True: 0, False: 3.73k]
  |  |  ------------------
  ------------------
  199|  3.73k|	vecswap(pb, pn - d1, d1);
  ------------------
  |  |   88|  3.73k|	if ((n) > 0) swapfunc(a, b, n)
  |  |  ------------------
  |  |  |  Branch (88:6): [True: 0, False: 3.73k]
  |  |  ------------------
  ------------------
  200|       |
  201|  3.73k|	d1 = pb - pa;
  202|  3.73k|	d2 = pd - pc;
  203|  3.73k|	if (d1 <= d2) {
  ------------------
  |  Branch (203:6): [True: 2.16k, False: 1.56k]
  ------------------
  204|       |		/* Recurse on left partition, then iterate on right partition */
  205|  2.16k|		if (d1 > es) {
  ------------------
  |  Branch (205:7): [True: 1.64k, False: 523]
  ------------------
  206|  1.64k|			local_qsort(a, d1 / es, es, cmp, thunk);
  207|  1.64k|		}
  208|  2.16k|		if (d2 > es) {
  ------------------
  |  Branch (208:7): [True: 2.16k, False: 0]
  ------------------
  209|       |			/* Iterate rather than recurse to save stack space */
  210|       |			/* qsort(pn - d2, d2 / es, es, cmp); */
  211|  2.16k|			a = pn - d2;
  212|  2.16k|			n = d2 / es;
  213|  2.16k|			goto loop;
  214|  2.16k|		}
  215|  2.16k|	} else {
  216|       |		/* Recurse on right partition, then iterate on left partition */
  217|  1.56k|		if (d2 > es) {
  ------------------
  |  Branch (217:7): [True: 1.41k, False: 153]
  ------------------
  218|  1.41k|			local_qsort(pn - d2, d2 / es, es, cmp, thunk);
  219|  1.41k|		}
  220|  1.56k|		if (d1 > es) {
  ------------------
  |  Branch (220:7): [True: 1.56k, False: 0]
  ------------------
  221|       |			/* Iterate rather than recurse to save stack space */
  222|       |			/* qsort(a, d1 / es, es, cmp); */
  223|  1.56k|			n = d1 / es;
  224|  1.56k|			goto loop;
  225|  1.56k|		}
  226|  1.56k|	}
  227|  3.73k|}
qsort.c:swapfunc:
   77|  39.2k|{
   78|  39.2k|	char t;
   79|       |
   80|   314k|	do {
   81|   314k|		t = *a;
   82|   314k|		*a++ = *b;
   83|   314k|		*b++ = t;
   84|   314k|	} while (--es > 0);
  ------------------
  |  Branch (84:11): [True: 274k, False: 39.2k]
  ------------------
   85|  39.2k|}
qsort.c:med3:
  104|  4.92k|{
  105|  4.92k|	return CMP(thunk, a, b) < 0 ?
  ------------------
  |  |   95|  4.92k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (105:9): [True: 2.83k, False: 2.08k]
  ------------------
  106|  2.83k|	       (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
  ------------------
  |  |   95|  2.83k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
              	       (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
  ------------------
  |  |   95|  1.89k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (106:10): [True: 944, False: 1.89k]
  |  Branch (106:38): [True: 864, False: 1.02k]
  ------------------
  107|  4.92k|	      :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
  ------------------
  |  |   95|  2.08k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
              	      :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
  ------------------
  |  |   95|  1.40k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (107:10): [True: 681, False: 1.40k]
  |  Branch (107:38): [True: 700, False: 704]
  ------------------
  108|  4.92k|}

igraph_i_safe_vector_int_sum:
   35|  41.4k|igraph_error_t igraph_i_safe_vector_int_sum(const igraph_vector_int_t *vec, igraph_int_t *res) {
   36|  41.4k|    const igraph_int_t n = igraph_vector_int_size(vec);
   37|  41.4k|    igraph_int_t sum = 0;
   38|  7.06M|    for (igraph_int_t i=0; i < n; ++i) {
  ------------------
  |  Branch (38:28): [True: 7.02M, False: 41.4k]
  ------------------
   39|  7.02M|        IGRAPH_SAFE_ADD(sum, VECTOR(*vec)[i], &sum);
  ------------------
  |  |   47|  7.02M|    do { \
  |  |   48|  7.02M|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  7.02M|        igraph_int_t _safe_sum; \
  |  |   50|  7.02M|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 7.02M]
  |  |  ------------------
  |  |   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|  7.02M|        *(res) = _safe_sum; \
  |  |   54|  7.02M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded, False: 7.02M]
  |  |  ------------------
  ------------------
   40|  7.02M|    }
   41|  41.4k|    *res = sum;
   42|  41.4k|    return IGRAPH_SUCCESS;
   43|  41.4k|}

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

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

igraph_is_graphical:
  135|  9.20k|{
  136|       |    /* Undirected case: */
  137|  9.20k|    if (in_degrees == NULL)
  ------------------
  |  Branch (137:9): [True: 0, False: 9.20k]
  ------------------
  138|      0|    {
  139|      0|        if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW )) {
  ------------------
  |  |   26|      0|#define IGRAPH_I_MULTI_LOOPS_SW 0x04 /* 100, more than one self-loop allowed on the same vertex   */
  ------------------
  |  Branch (139:14): [True: 0, False: 0]
  |  Branch (139:56): [True: 0, False: 0]
  ------------------
  140|       |            /* Typically this case is used when multiple edges are allowed both as self-loops and
  141|       |             * between distinct vertices. However, the conditions are the same even if multi-edges
  142|       |             * are not allowed between distinct vertices (only as self-loops). Therefore, we
  143|       |             * do not test IGRAPH_I_MULTI_EDGES_SW in the if (...). */
  144|      0|            return igraph_i_is_graphical_undirected_multi_loops(out_degrees, res);
  145|      0|        }
  146|      0|        else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   25|      0|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (146:19): [True: 0, False: 0]
  |  Branch (146:63): [True: 0, False: 0]
  ------------------
  147|      0|            return igraph_i_is_graphical_undirected_loopless_multi(out_degrees, res);
  148|      0|        }
  149|      0|        else if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   26|      0|#define IGRAPH_I_MULTI_LOOPS_SW 0x04 /* 100, more than one self-loop allowed on the same vertex   */
  ------------------
                      else if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   25|      0|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (149:19): [True: 0, False: 0]
  |  Branch (149:61): [True: 0, False: 0]
  |  Branch (149:113): [True: 0, False: 0]
  ------------------
  150|      0|            return igraph_i_is_graphical_undirected_loopy_simple(out_degrees, res);
  151|      0|        }
  152|      0|        else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   25|      0|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (152:19): [True: 0, False: 0]
  |  Branch (152:63): [True: 0, False: 0]
  ------------------
  153|      0|            return igraph_i_is_graphical_undirected_simple(out_degrees, res);
  154|      0|        } else {
  155|       |            /* Remaining case:
  156|       |             *  - At most one self-loop per vertex but multi-edges between distinct vertices allowed.
  157|       |             * These cases cannot currently be requested through the documented API,
  158|       |             * so no explanatory error message for now. */
  159|      0|            return IGRAPH_UNIMPLEMENTED;
  160|      0|        }
  161|      0|    }
  162|       |    /* Directed case: */
  163|  9.20k|    else
  164|  9.20k|    {
  165|  9.20k|        if (igraph_vector_int_size(in_degrees) != igraph_vector_int_size(out_degrees)) {
  ------------------
  |  Branch (165:13): [True: 0, False: 9.20k]
  ------------------
  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|  9.20k|        if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) && (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW ) ) {
  ------------------
  |  |   25|  4.60k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
                      if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) && (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW ) ) {
  ------------------
  |  |   26|  2.30k|#define IGRAPH_I_MULTI_LOOPS_SW 0x04 /* 100, more than one self-loop allowed on the same vertex   */
  ------------------
  |  Branch (169:14): [True: 4.60k, False: 4.60k]
  |  Branch (169:56): [True: 2.30k, False: 2.30k]
  |  Branch (169:106): [True: 2.30k, False: 0]
  ------------------
  170|  2.30k|            return igraph_i_is_graphical_directed_loopy_multi(out_degrees, in_degrees, res);
  171|  2.30k|        }
  172|  6.90k|        else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   25|  4.60k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (172:19): [True: 4.60k, False: 2.30k]
  |  Branch (172:63): [True: 2.30k, False: 2.30k]
  ------------------
  173|  2.30k|            return igraph_i_is_graphical_directed_loopless_multi(out_degrees, in_degrees, res);
  174|  2.30k|        }
  175|  4.60k|        else if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   26|  2.30k|#define IGRAPH_I_MULTI_LOOPS_SW 0x04 /* 100, more than one self-loop allowed on the same vertex   */
  ------------------
                      else if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   25|  2.30k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (175:19): [True: 2.30k, False: 2.30k]
  |  Branch (175:61): [True: 2.30k, False: 0]
  |  Branch (175:113): [True: 2.30k, False: 0]
  ------------------
  176|  2.30k|            return igraph_i_is_graphical_directed_loopy_simple(out_degrees, in_degrees, res);
  177|  2.30k|        }
  178|  2.30k|        else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   25|  2.30k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (178:19): [True: 2.30k, False: 0]
  |  Branch (178:63): [True: 2.30k, False: 0]
  ------------------
  179|  2.30k|            return igraph_i_is_graphical_directed_simple(out_degrees, in_degrees, res);
  180|  2.30k|        } 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|  9.20k|    }
  189|       |
  190|       |    /* can't reach here */
  191|  9.20k|}
graphicality.c:igraph_i_is_graphical_directed_loopy_multi:
  547|  4.60k|static igraph_error_t igraph_i_is_graphical_directed_loopy_multi(const igraph_vector_int_t *out_degrees, const igraph_vector_int_t *in_degrees, igraph_bool_t *res) {
  548|  4.60k|    igraph_int_t sumdiff; /* difference between sum of in- and out-degrees */
  549|  4.60k|    igraph_int_t n = igraph_vector_int_size(out_degrees);
  550|  4.60k|    igraph_int_t i;
  551|       |
  552|  4.60k|    IGRAPH_ASSERT(igraph_vector_int_size(in_degrees) == n);
  ------------------
  |  |  924|  4.60k|    do { \
  |  |  925|  4.60k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.60k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.60k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.60k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.60k]
  |  |  ------------------
  ------------------
  553|       |
  554|  4.60k|    sumdiff = 0;
  555|   785k|    for (i = 0; i < n; ++i) {
  ------------------
  |  Branch (555:17): [True: 780k, False: 4.60k]
  ------------------
  556|   780k|        igraph_int_t dout = VECTOR(*out_degrees)[i];
  ------------------
  |  |   60|   780k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  557|   780k|        igraph_int_t din  = VECTOR(*in_degrees)[i];
  ------------------
  |  |   60|   780k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  558|       |
  559|   780k|        if (dout < 0 || din < 0) {
  ------------------
  |  Branch (559:13): [True: 0, False: 780k]
  |  Branch (559:25): [True: 0, False: 780k]
  ------------------
  560|      0|            *res = false;
  561|      0|            return IGRAPH_SUCCESS;
  562|      0|        }
  563|       |
  564|   780k|        sumdiff += din - dout;
  565|   780k|    }
  566|       |
  567|  4.60k|    *res = sumdiff == 0;
  568|       |
  569|  4.60k|    return IGRAPH_SUCCESS;
  570|  4.60k|}
graphicality.c:igraph_i_is_graphical_directed_loopless_multi:
  579|  2.30k|static igraph_error_t igraph_i_is_graphical_directed_loopless_multi(const igraph_vector_int_t *out_degrees, const igraph_vector_int_t *in_degrees, igraph_bool_t *res) {
  580|  2.30k|    igraph_int_t i, sumin, sumout, dmax;
  581|  2.30k|    igraph_int_t n = igraph_vector_int_size(out_degrees);
  582|       |
  583|  2.30k|    IGRAPH_ASSERT(igraph_vector_int_size(in_degrees) == n);
  ------------------
  |  |  924|  2.30k|    do { \
  |  |  925|  2.30k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  584|       |
  585|  2.30k|    sumin = 0; sumout = 0;
  586|  2.30k|    dmax = 0;
  587|   392k|    for (i = 0; i < n; ++i) {
  ------------------
  |  Branch (587:17): [True: 390k, False: 2.30k]
  ------------------
  588|   390k|        igraph_int_t dout = VECTOR(*out_degrees)[i];
  ------------------
  |  |   60|   390k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  589|   390k|        igraph_int_t din  = VECTOR(*in_degrees)[i];
  ------------------
  |  |   60|   390k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  590|   390k|        igraph_int_t d = dout + din;
  591|       |
  592|   390k|        if (dout < 0 || din < 0) {
  ------------------
  |  Branch (592:13): [True: 0, False: 390k]
  |  Branch (592:25): [True: 0, False: 390k]
  ------------------
  593|      0|            *res = false;
  594|      0|            return IGRAPH_SUCCESS;
  595|      0|        }
  596|       |
  597|   390k|        sumin += din; sumout += dout;
  598|       |
  599|   390k|        if (d > dmax) {
  ------------------
  |  Branch (599:13): [True: 3.46k, False: 386k]
  ------------------
  600|  3.46k|            dmax = d;
  601|  3.46k|        }
  602|   390k|    }
  603|       |
  604|  2.30k|    *res = (sumin == sumout) && (sumout >= dmax);
  ------------------
  |  Branch (604:12): [True: 2.30k, False: 0]
  |  Branch (604:33): [True: 1.90k, False: 396]
  ------------------
  605|       |
  606|  2.30k|    return IGRAPH_SUCCESS;
  607|  2.30k|}
graphicality.c:igraph_i_is_graphical_directed_loopy_simple:
  614|  2.30k|static igraph_error_t igraph_i_is_graphical_directed_loopy_simple(const igraph_vector_int_t *out_degrees, const igraph_vector_int_t *in_degrees, igraph_bool_t *res) {
  615|  2.30k|    return igraph_i_is_bigraphical_simple(out_degrees, in_degrees, res);
  616|  2.30k|}
graphicality.c:igraph_i_is_graphical_directed_simple:
  624|  2.30k|static igraph_error_t igraph_i_is_graphical_directed_simple(const igraph_vector_int_t *out_degrees, const igraph_vector_int_t *in_degrees, igraph_bool_t *res) {
  625|  2.30k|    igraph_vector_int_t in_degree_cumcounts, in_degree_counts;
  626|  2.30k|    igraph_vector_int_t sorted_in_degrees, sorted_out_degrees;
  627|  2.30k|    igraph_vector_int_t left_pq, right_pq;
  628|  2.30k|    igraph_int_t lhs, rhs, left_pq_size, right_pq_size, left_i, right_i, left_sum, right_sum;
  629|       |
  630|       |    /* The conditions from the loopy multigraph case are necessary here as well. */
  631|  2.30k|    IGRAPH_CHECK(igraph_i_is_graphical_directed_loopy_multi(out_degrees, in_degrees, res));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  632|  2.30k|    if (! *res) {
  ------------------
  |  Branch (632:9): [True: 0, False: 2.30k]
  ------------------
  633|      0|        return IGRAPH_SUCCESS;
  634|      0|    }
  635|       |
  636|  2.30k|    const igraph_int_t vcount = igraph_vector_int_size(out_degrees);
  637|  2.30k|    if (vcount == 0) {
  ------------------
  |  Branch (637:9): [True: 1, False: 2.30k]
  ------------------
  638|      1|        *res = true;
  639|      1|        return IGRAPH_SUCCESS;
  640|      1|    }
  641|       |
  642|       |
  643|  2.30k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&in_degree_cumcounts, vcount+1);
  ------------------
  |  |  119|  2.30k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.30k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  644|       |
  645|       |    /* Compute in_degree_cumcounts[d+1] to be the no. of in-degrees == d */
  646|   389k|    for (igraph_int_t v = 0; v < vcount; v++) {
  ------------------
  |  Branch (646:30): [True: 387k, False: 2.04k]
  ------------------
  647|   387k|        igraph_int_t indeg = VECTOR(*in_degrees)[v];
  ------------------
  |  |   60|   387k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  648|   387k|        igraph_int_t outdeg = VECTOR(*out_degrees)[v];
  ------------------
  |  |   60|   387k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  649|   387k|        if (indeg >= vcount || outdeg >= vcount) {
  ------------------
  |  Branch (649:13): [True: 189, False: 386k]
  |  Branch (649:32): [True: 65, False: 386k]
  ------------------
  650|    254|            *res = false;
  651|    254|            igraph_vector_int_destroy(&in_degree_cumcounts);
  652|    254|            IGRAPH_FINALLY_CLEAN(1);
  653|    254|            return IGRAPH_SUCCESS;
  654|    254|        }
  655|   386k|        VECTOR(in_degree_cumcounts)[indeg + 1]++;
  ------------------
  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  656|   386k|    }
  657|       |
  658|       |    /* Compute in_degree_cumcounts[d] to be the no. of in-degrees < d */
  659|   388k|    for (igraph_int_t indeg = 0; indeg < vcount; indeg++) {
  ------------------
  |  Branch (659:34): [True: 386k, False: 2.04k]
  ------------------
  660|   386k|        VECTOR(in_degree_cumcounts)[indeg+1] += VECTOR(in_degree_cumcounts)[indeg];
  ------------------
  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(in_degree_cumcounts)[indeg+1] += VECTOR(in_degree_cumcounts)[indeg];
  ------------------
  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  661|   386k|    }
  662|       |
  663|  2.04k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&sorted_out_degrees, vcount);
  ------------------
  |  |  119|  2.04k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.04k|    do { \
  |  |  |  |  657|  2.04k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.04k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.04k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.04k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.04k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.04k|    do { \
  |  |  |  |  604|  2.04k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.04k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.04k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.04k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.04k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.04k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.04k]
  |  |  ------------------
  ------------------
  664|  2.04k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&sorted_in_degrees, vcount);
  ------------------
  |  |  119|  2.04k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.04k|    do { \
  |  |  |  |  657|  2.04k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.04k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.04k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.04k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.04k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.04k|    do { \
  |  |  |  |  604|  2.04k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.04k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.04k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.04k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.04k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.04k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.04k]
  |  |  ------------------
  ------------------
  665|       |
  666|       |    /* In the following loop, in_degree_counts[d] keeps track of the number of vertices
  667|       |     * with in-degree d that were already placed. */
  668|  2.04k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&in_degree_counts, vcount);
  ------------------
  |  |  119|  2.04k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.04k|    do { \
  |  |  |  |  657|  2.04k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.04k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.04k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.04k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.04k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.04k|    do { \
  |  |  |  |  604|  2.04k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.04k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.04k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.04k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.04k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.04k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.04k]
  |  |  ------------------
  ------------------
  669|       |
  670|   388k|    for (igraph_int_t v = 0; v < vcount; v++) {
  ------------------
  |  Branch (670:30): [True: 386k, False: 2.04k]
  ------------------
  671|   386k|        igraph_int_t outdeg = VECTOR(*out_degrees)[v];
  ------------------
  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  672|   386k|        igraph_int_t indeg  = VECTOR(*in_degrees)[v];
  ------------------
  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  673|   386k|        igraph_int_t idx = VECTOR(in_degree_cumcounts)[indeg] + VECTOR(in_degree_counts)[indeg];
  ------------------
  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      igraph_int_t idx = VECTOR(in_degree_cumcounts)[indeg] + VECTOR(in_degree_counts)[indeg];
  ------------------
  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  674|   386k|        VECTOR(sorted_out_degrees)[vcount - idx - 1] = outdeg;
  ------------------
  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  675|   386k|        VECTOR(sorted_in_degrees)[vcount - idx - 1] = indeg;
  ------------------
  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  676|   386k|        VECTOR(in_degree_counts)[indeg]++;
  ------------------
  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  677|   386k|    }
  678|       |
  679|  2.04k|    igraph_vector_int_destroy(&in_degree_counts);
  680|  2.04k|    igraph_vector_int_destroy(&in_degree_cumcounts);
  681|  2.04k|    IGRAPH_FINALLY_CLEAN(2);
  682|       |
  683|       |    /* Be optimistic, then check whether the Fulkerson–Chen–Anstee condition
  684|       |     * holds for every k. In particular, for every k in [0; n), it must be true
  685|       |     * that:
  686|       |     *
  687|       |     * \sum_{i=0}^k indegree[i] <=
  688|       |     *     \sum_{i=0}^k min(outdegree[i], k) +
  689|       |     *     \sum_{i=k+1}^{n-1} min(outdegree[i], k + 1)
  690|       |     */
  691|       |
  692|  2.04k|#define INDEGREE(x) (VECTOR(sorted_in_degrees)[x])
  693|  2.04k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  694|       |
  695|  2.04k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&left_pq, vcount);
  ------------------
  |  |  119|  2.04k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.04k|    do { \
  |  |  |  |  657|  2.04k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.04k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.04k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.04k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.04k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.04k|    do { \
  |  |  |  |  604|  2.04k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.04k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.04k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.04k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.04k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.04k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.04k]
  |  |  ------------------
  ------------------
  696|  2.04k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&right_pq, vcount);
  ------------------
  |  |  119|  2.04k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.04k|    do { \
  |  |  |  |  657|  2.04k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.04k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.04k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.04k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.04k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.04k|    do { \
  |  |  |  |  604|  2.04k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.04k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.04k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.04k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.04k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.04k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.04k]
  |  |  ------------------
  ------------------
  697|       |
  698|  2.04k|    left_pq_size = 0;
  699|  2.04k|    right_pq_size = vcount;
  700|  2.04k|    left_i = 0;
  701|  2.04k|    right_i = 0;
  702|  2.04k|    left_sum = 0;
  703|  2.04k|    right_sum = 0;
  704|   388k|    for (igraph_int_t i = 0; i < vcount; i++) {
  ------------------
  |  Branch (704:30): [True: 386k, False: 2.04k]
  ------------------
  705|   386k|        VECTOR(right_pq)[OUTDEGREE(i)]++;
  ------------------
  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(right_pq)[OUTDEGREE(i)]++;
  ------------------
  |  |  693|   386k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  706|   386k|    }
  707|       |
  708|  2.04k|    *res = true;
  709|  2.04k|    lhs = 0;
  710|  2.04k|    rhs = 0;
  711|   316k|    for (igraph_int_t i = 0; i < vcount; i++) {
  ------------------
  |  Branch (711:30): [True: 314k, False: 1.62k]
  ------------------
  712|   314k|        lhs += INDEGREE(i);
  ------------------
  |  |  692|   314k|#define INDEGREE(x) (VECTOR(sorted_in_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|   314k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  713|       |
  714|       |        /* It is enough to check for indexes where the in-degree is about to
  715|       |         * decrease in the next step; see "Stronger condition" in the Wikipedia
  716|       |         * entry for the Fulkerson-Chen-Anstee condition. However, this does not
  717|       |         * provide any noticeable benefits for the current implementation. */
  718|       |
  719|   314k|        if (OUTDEGREE(i) < i) {
  ------------------
  |  |  693|   314k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|   314k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (719:13): [True: 311k, False: 3.48k]
  ------------------
  720|   311k|            left_sum += OUTDEGREE(i);
  ------------------
  |  |  693|   311k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|   311k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  721|   311k|        }
  722|  3.48k|        else {
  723|  3.48k|            VECTOR(left_pq)[OUTDEGREE(i)]++;
  ------------------
  |  |   60|  3.48k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(left_pq)[OUTDEGREE(i)]++;
  ------------------
  |  |  693|  3.48k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|  3.48k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  724|  3.48k|            left_pq_size++;
  725|  3.48k|        }
  726|   627k|        while (left_i < i) {
  ------------------
  |  Branch (726:16): [True: 312k, False: 314k]
  ------------------
  727|   315k|            while (VECTOR(left_pq)[left_i] > 0) {
  ------------------
  |  |   60|   315k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (727:20): [True: 3.02k, False: 312k]
  ------------------
  728|  3.02k|                VECTOR(left_pq)[left_i]--;
  ------------------
  |  |   60|  3.02k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  729|  3.02k|                left_pq_size--;
  730|  3.02k|                left_sum += left_i;
  731|  3.02k|            }
  732|   312k|            left_i++;
  733|   312k|        }
  734|       |
  735|   629k|        while (right_i < i + 1) {
  ------------------
  |  Branch (735:16): [True: 314k, False: 314k]
  ------------------
  736|   697k|            while (VECTOR(right_pq)[right_i] > 0) {
  ------------------
  |  |   60|   697k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (736:20): [True: 382k, False: 314k]
  ------------------
  737|   382k|                VECTOR(right_pq)[right_i]--;
  ------------------
  |  |   60|   382k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  738|   382k|                right_pq_size--;
  739|   382k|                right_sum += right_i;
  740|   382k|            }
  741|   314k|            right_i++;
  742|   314k|        }
  743|   314k|        if (OUTDEGREE(i) < i + 1) {
  ------------------
  |  |  693|   314k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|   314k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (743:13): [True: 313k, False: 1.69k]
  ------------------
  744|   313k|            right_sum -= OUTDEGREE(i);
  ------------------
  |  |  693|   313k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|   313k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  745|   313k|        }
  746|  1.69k|        else {
  747|  1.69k|            VECTOR(right_pq)[OUTDEGREE(i)]--;
  ------------------
  |  |   60|  1.69k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(right_pq)[OUTDEGREE(i)]--;
  ------------------
  |  |  693|  1.69k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|  1.69k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  748|  1.69k|            right_pq_size--;
  749|  1.69k|        }
  750|       |
  751|   314k|        rhs = left_sum + i * left_pq_size + right_sum + (i + 1) * right_pq_size;
  752|   314k|        if (lhs > rhs) {
  ------------------
  |  Branch (752:13): [True: 422, False: 314k]
  ------------------
  753|    422|            *res = false;
  754|    422|            break;
  755|    422|        }
  756|   314k|    }
  757|       |
  758|  2.04k|#undef INDEGREE
  759|  2.04k|#undef OUTDEGREE
  760|       |
  761|  2.04k|    igraph_vector_int_destroy(&sorted_in_degrees);
  762|  2.04k|    igraph_vector_int_destroy(&sorted_out_degrees);
  763|  2.04k|    igraph_vector_int_destroy(&left_pq);
  764|  2.04k|    igraph_vector_int_destroy(&right_pq);
  765|  2.04k|    IGRAPH_FINALLY_CLEAN(4);
  766|       |
  767|  2.04k|    return IGRAPH_SUCCESS;
  768|  2.04k|}
graphicality.c:igraph_i_is_bigraphical_multi:
  778|  2.30k|static igraph_error_t igraph_i_is_bigraphical_multi(const igraph_vector_int_t *degrees1, const igraph_vector_int_t *degrees2, igraph_bool_t *res) {
  779|  2.30k|    igraph_int_t i;
  780|  2.30k|    igraph_int_t sum1, sum2;
  781|  2.30k|    igraph_int_t n1 = igraph_vector_int_size(degrees1), n2 = igraph_vector_int_size(degrees2);
  782|       |
  783|  2.30k|    sum1 = 0;
  784|   392k|    for (i = 0; i < n1; ++i) {
  ------------------
  |  Branch (784:17): [True: 390k, False: 2.30k]
  ------------------
  785|   390k|        igraph_int_t d = VECTOR(*degrees1)[i];
  ------------------
  |  |   60|   390k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  786|       |
  787|   390k|        if (d < 0) {
  ------------------
  |  Branch (787:13): [True: 0, False: 390k]
  ------------------
  788|      0|            *res = false;
  789|      0|            return IGRAPH_SUCCESS;
  790|      0|        }
  791|       |
  792|   390k|        sum1 += d;
  793|   390k|    }
  794|       |
  795|  2.30k|    sum2 = 0;
  796|   392k|    for (i = 0; i < n2; ++i) {
  ------------------
  |  Branch (796:17): [True: 390k, False: 2.30k]
  ------------------
  797|   390k|        igraph_int_t d = VECTOR(*degrees2)[i];
  ------------------
  |  |   60|   390k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  798|       |
  799|   390k|        if (d < 0) {
  ------------------
  |  Branch (799:13): [True: 0, False: 390k]
  ------------------
  800|      0|            *res = false;
  801|      0|            return IGRAPH_SUCCESS;
  802|      0|        }
  803|       |
  804|   390k|        sum2 += d;
  805|   390k|    }
  806|       |
  807|  2.30k|    *res = (sum1 == sum2);
  808|       |
  809|  2.30k|    return IGRAPH_SUCCESS;
  810|  2.30k|}
graphicality.c:igraph_i_is_bigraphical_simple:
  818|  2.30k|static igraph_error_t igraph_i_is_bigraphical_simple(const igraph_vector_int_t *degrees1, const igraph_vector_int_t *degrees2, igraph_bool_t *res) {
  819|  2.30k|    igraph_int_t n1 = igraph_vector_int_size(degrees1), n2 = igraph_vector_int_size(degrees2);
  820|  2.30k|    igraph_vector_int_t deg_freq1, deg_freq2;
  821|  2.30k|    igraph_int_t lhs_sum, partial_rhs_sum, partial_rhs_count;
  822|  2.30k|    igraph_int_t a, b, k;
  823|       |
  824|  2.30k|    if (n1 == 0 && n2 == 0) {
  ------------------
  |  Branch (824:9): [True: 1, False: 2.30k]
  |  Branch (824:20): [True: 1, False: 0]
  ------------------
  825|      1|        *res = true;
  826|      1|        return IGRAPH_SUCCESS;
  827|      1|    }
  828|       |
  829|       |    /* The conditions from the multigraph case are necessary here as well. */
  830|  2.30k|    IGRAPH_CHECK(igraph_i_is_bigraphical_multi(degrees1, degrees2, res));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  831|  2.30k|    if (! *res) {
  ------------------
  |  Branch (831:9): [True: 0, False: 2.30k]
  ------------------
  832|      0|        return IGRAPH_SUCCESS;
  833|      0|    }
  834|       |
  835|       |    /* Ensure that degrees1 is the shorter vector as a minor optimization: */
  836|  2.30k|    if (n2 < n1) {
  ------------------
  |  Branch (836:9): [True: 0, False: 2.30k]
  ------------------
  837|      0|        const igraph_vector_int_t *tmp;
  838|      0|        igraph_int_t n;
  839|       |
  840|      0|        tmp = degrees1;
  841|      0|        degrees1 = degrees2;
  842|      0|        degrees2 = tmp;
  843|       |
  844|      0|        n = n1;
  845|      0|        n1 = n2;
  846|      0|        n2 = n;
  847|      0|    }
  848|       |
  849|       |    /* Counting sort the degrees. */
  850|       |    /* Since the graph is simple, a vertex's degree can be at most the size of the other partition. */
  851|  2.30k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&deg_freq1, n2+1);
  ------------------
  |  |  119|  2.30k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.30k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  852|  2.30k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&deg_freq2, n1+1);
  ------------------
  |  |  119|  2.30k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.30k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  853|       |
  854|   390k|    for (igraph_int_t i = 0; i < n1; ++i) {
  ------------------
  |  Branch (854:30): [True: 388k, False: 2.09k]
  ------------------
  855|   388k|        igraph_int_t degree = VECTOR(*degrees1)[i];
  ------------------
  |  |   60|   388k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  856|   388k|        if (degree > n2) {
  ------------------
  |  Branch (856:13): [True: 204, False: 388k]
  ------------------
  857|    204|            *res = false;
  858|    204|            goto bigraphical_simple_done;
  859|    204|        }
  860|   388k|        ++VECTOR(deg_freq1)[degree];
  ------------------
  |  |   60|   388k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  861|   388k|    }
  862|   389k|    for (igraph_int_t i = 0; i < n2; ++i) {
  ------------------
  |  Branch (862:30): [True: 387k, False: 2.08k]
  ------------------
  863|   387k|        igraph_int_t degree = VECTOR(*degrees2)[i];
  ------------------
  |  |   60|   387k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  864|   387k|        if (degree > n1) {
  ------------------
  |  Branch (864:13): [True: 16, False: 387k]
  ------------------
  865|     16|            *res = false;
  866|     16|            goto bigraphical_simple_done;
  867|     16|        }
  868|   387k|        ++VECTOR(deg_freq2)[degree];
  ------------------
  |  |   60|   387k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  869|   387k|    }
  870|       |
  871|       |    /*
  872|       |     * We follow the description of the Gale-Ryser theorem in:
  873|       |     *
  874|       |     * A. Berger, A note on the characterization of digraphic sequences, Discrete Math. 314, 38 (2014).
  875|       |     * https://doi.org/10.1016/j.disc.2013.09.010
  876|       |     *
  877|       |     * Gale-Ryser condition with 0-based indexing:
  878|       |     *
  879|       |     * a_i and b_i denote the degree sequences of the two partitions.
  880|       |     *
  881|       |     * Assuming that a_0 >= a_1 >= ... >= a_{n_1 - 1},
  882|       |     *
  883|       |     * \sum_{i=0}^k a_i <= \sum_{j=0}^{n_2} min(b_i, k+1)
  884|       |     *
  885|       |     * for all 0 <= k < n_1.
  886|       |     *
  887|       |     * Additionally, based on Theorem 3 in [Berger 2014], it is sufficient to do the check
  888|       |     * for k such that a_k > a_{k+1} and for k=(n_1-1).
  889|       |     */
  890|       |
  891|       |    /* While this formulation does not require sorting degree2,
  892|       |     * doing so allows for a linear-time incremental computation
  893|       |     * of the inequality's right-hand-side.
  894|       |     */
  895|       |
  896|  2.08k|    *res = true; /* be optimistic */
  897|  2.08k|    lhs_sum = 0;
  898|  2.08k|    partial_rhs_sum = 0; /* the sum of those elements in the rhs which are <= (k+1) */
  899|  2.08k|    partial_rhs_count = 0; /* number of elements in the rhs which are <= (k+1) */
  900|  2.08k|    b = 0; /* index in deg_freq2 */
  901|  2.08k|    k = -1;
  902|   381k|    for (a = n2; a >= 0; --a) {
  ------------------
  |  Branch (902:18): [True: 379k, False: 1.79k]
  ------------------
  903|   379k|        igraph_int_t acount = VECTOR(deg_freq1)[a];
  ------------------
  |  |   60|   379k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  904|   379k|        lhs_sum += a * acount;
  905|   379k|        k += acount;
  906|       |
  907|   717k|        while (b <= k + 1) {
  ------------------
  |  Branch (907:16): [True: 338k, False: 379k]
  ------------------
  908|   338k|            igraph_int_t bcount = VECTOR(deg_freq2)[b];
  ------------------
  |  |   60|   338k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  909|   338k|            partial_rhs_sum += b * bcount;
  910|   338k|            partial_rhs_count += bcount;
  911|       |
  912|   338k|            ++b;
  913|   338k|        }
  914|       |
  915|       |        /* rhs_sum for a given k is partial_rhs_sum + (n2 - partial_rhs_count) * (k+1) */
  916|   379k|        if (lhs_sum > partial_rhs_sum + (n2 - partial_rhs_count) * (k+1) ) {
  ------------------
  |  Branch (916:13): [True: 286, False: 378k]
  ------------------
  917|    286|            *res = false;
  918|    286|            break;
  919|    286|        }
  920|   379k|    }
  921|       |
  922|  2.30k|bigraphical_simple_done:
  923|  2.30k|    igraph_vector_int_destroy(&deg_freq1);
  924|  2.30k|    igraph_vector_int_destroy(&deg_freq2);
  925|  2.30k|    IGRAPH_FINALLY_CLEAN(2);
  926|       |
  927|  2.30k|    return IGRAPH_SUCCESS;
  928|  2.08k|}

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

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

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

igraph_i_rewire:
   43|  2.27k|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.27k|    const igraph_int_t no_of_edges = igraph_ecount(graph);
   45|  2.27k|    char message[256];
   46|  2.27k|    igraph_int_t a, b, c, d, dummy, num_swaps, num_successful_swaps;
   47|  2.27k|    igraph_vector_int_t eids;
   48|  2.27k|    igraph_vector_int_t edgevec, alledges;
   49|  2.27k|    const igraph_bool_t directed = igraph_is_directed(graph);
   50|  2.27k|    igraph_bool_t ok;
   51|  2.27k|    igraph_es_t es;
   52|  2.27k|    igraph_adjlist_t al;
   53|       |
   54|  2.27k|    if (no_of_edges < 2) {
  ------------------
  |  Branch (54:9): [True: 941, False: 1.33k]
  ------------------
   55|       |        /* There are no possible rewirings, return with the same graph. */
   56|    941|        return IGRAPH_SUCCESS;
   57|    941|    }
   58|       |
   59|  1.33k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&eids, 2);
  ------------------
  |  |  119|  1.33k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.33k|    do { \
  |  |  |  |  657|  1.33k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.33k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, 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.33k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.33k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.33k|    do { \
  |  |  |  |  604|  1.33k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.33k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.33k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.33k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.33k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.33k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.33k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
   60|       |
   61|  1.33k|    if (use_adjlist) {
  ------------------
  |  Branch (61:9): [True: 791, False: 545]
  ------------------
   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|    791|        IGRAPH_CHECK(igraph_adjlist_init(graph, &al, IGRAPH_OUT, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|    791|    do { \
  |  |  657|    791|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    791|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    791|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 791]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    791|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 791]
  |  |  ------------------
  ------------------
   66|    791|        IGRAPH_FINALLY(igraph_adjlist_destroy, &al);
  ------------------
  |  |  603|    791|    do { \
  |  |  604|    791|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    791|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    791|         * incorrect destructor function with the pointer */ \
  |  |  607|    791|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 791]
  |  |  ------------------
  |  |  608|    791|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    791|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 791]
  |  |  ------------------
  ------------------
   67|    791|        IGRAPH_VECTOR_INT_INIT_FINALLY(&alledges, no_of_edges * 2);
  ------------------
  |  |  119|    791|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    791|    do { \
  |  |  |  |  657|    791|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    791|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    791|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 791]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    791|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 791]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    791|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    791|    do { \
  |  |  |  |  604|    791|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    791|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    791|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    791|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 791]
  |  |  |  |  ------------------
  |  |  |  |  608|    791|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    791|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 791]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 791]
  |  |  ------------------
  ------------------
   68|    791|        IGRAPH_CHECK(igraph_get_edgelist(graph, &alledges, /*bycol=*/ false));
  ------------------
  |  |  656|    791|    do { \
  |  |  657|    791|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    791|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    791|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 791]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    791|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 791]
  |  |  ------------------
  ------------------
   69|    791|    } else {
   70|    545|        IGRAPH_VECTOR_INT_INIT_FINALLY(&edgevec, 4);
  ------------------
  |  |  119|    545|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    545|    do { \
  |  |  |  |  657|    545|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    545|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    545|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 545]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    545|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 545]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    545|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    545|    do { \
  |  |  |  |  604|    545|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    545|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    545|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    545|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 545]
  |  |  |  |  ------------------
  |  |  |  |  608|    545|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    545|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 545]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 545]
  |  |  ------------------
  ------------------
   71|    545|        es = igraph_ess_vector(&eids);
   72|    545|    }
   73|       |
   74|       |    /* We count both successful and unsuccessful rewiring trials.
   75|       |     * This is necessary for uniform sampling. */
   76|       |
   77|  1.33k|    num_swaps = num_successful_swaps = 0;
   78|  54.1k|    while (num_swaps < n) {
  ------------------
  |  Branch (78:12): [True: 52.7k, False: 1.33k]
  ------------------
   79|       |
   80|  52.7k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  52.7k|    do { \
  |  |   47|  52.7k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 52.7k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  52.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 52.7k]
  |  |  ------------------
  ------------------
   81|       |
   82|  52.7k|        if (num_swaps % 1000 == 0) {
  ------------------
  |  Branch (82:13): [True: 1.33k, False: 51.4k]
  ------------------
   83|  1.33k|            snprintf(message, sizeof(message),
   84|  1.33k|                     "Random rewiring (%.2f%% of the trials were successful)",
   85|  1.33k|                     num_swaps > 0 ? ((100.0 * num_successful_swaps) / num_swaps) : 0.0);
  ------------------
  |  Branch (85:22): [True: 0, False: 1.33k]
  ------------------
   86|  1.33k|            IGRAPH_PROGRESS(message, (100.0 * num_swaps) / n, 0);
  ------------------
  |  |  169|  1.33k|    do { \
  |  |  170|  1.33k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  1.33k|    do { \
  |  |  |  |  657|  1.33k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.33k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, 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.33k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
   87|  1.33k|        }
   88|       |
   89|  52.7k|        ok = true;
   90|       |
   91|       |        /* Choose two edges randomly */
   92|  52.7k|        VECTOR(eids)[0] = RNG_INTEGER(0, no_of_edges - 1);
  ------------------
  |  |   60|  52.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(eids)[0] = RNG_INTEGER(0, no_of_edges - 1);
  ------------------
  |  |  152|  52.7k|#define RNG_INTEGER(l,h) (igraph_rng_get_integer(igraph_rng_default(),(l),(h)))
  ------------------
   93|  54.7k|        do {
   94|  54.7k|            VECTOR(eids)[1] = RNG_INTEGER(0, no_of_edges - 1);
  ------------------
  |  |   60|  54.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(eids)[1] = RNG_INTEGER(0, no_of_edges - 1);
  ------------------
  |  |  152|  54.7k|#define RNG_INTEGER(l,h) (igraph_rng_get_integer(igraph_rng_default(),(l),(h)))
  ------------------
   95|  54.7k|        } while (VECTOR(eids)[0] == VECTOR(eids)[1]);
  ------------------
  |  |   60|  54.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      } while (VECTOR(eids)[0] == VECTOR(eids)[1]);
  ------------------
  |  |   60|  54.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (95:18): [True: 1.96k, False: 52.7k]
  ------------------
   96|       |
   97|       |        /* Get the endpoints */
   98|  52.7k|        if (use_adjlist) {
  ------------------
  |  Branch (98:13): [True: 49.9k, False: 2.82k]
  ------------------
   99|  49.9k|            a = VECTOR(alledges)[VECTOR(eids)[0] * 2];
  ------------------
  |  |   60|  49.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          a = VECTOR(alledges)[VECTOR(eids)[0] * 2];
  ------------------
  |  |   60|  49.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  100|  49.9k|            b = VECTOR(alledges)[VECTOR(eids)[0] * 2 + 1];
  ------------------
  |  |   60|  49.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          b = VECTOR(alledges)[VECTOR(eids)[0] * 2 + 1];
  ------------------
  |  |   60|  49.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  101|  49.9k|            c = VECTOR(alledges)[VECTOR(eids)[1] * 2];
  ------------------
  |  |   60|  49.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          c = VECTOR(alledges)[VECTOR(eids)[1] * 2];
  ------------------
  |  |   60|  49.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  102|  49.9k|            d = VECTOR(alledges)[VECTOR(eids)[1] * 2 + 1];
  ------------------
  |  |   60|  49.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          d = VECTOR(alledges)[VECTOR(eids)[1] * 2 + 1];
  ------------------
  |  |   60|  49.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  103|  49.9k|        } else {
  104|  2.82k|            IGRAPH_CHECK(igraph_edge(graph, VECTOR(eids)[0], &a, &b));
  ------------------
  |  |  656|  2.82k|    do { \
  |  |  657|  2.82k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.82k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.82k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.82k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.82k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.82k]
  |  |  ------------------
  ------------------
  105|  2.82k|            IGRAPH_CHECK(igraph_edge(graph, VECTOR(eids)[1], &c, &d));
  ------------------
  |  |  656|  2.82k|    do { \
  |  |  657|  2.82k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.82k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.82k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.82k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.82k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.82k]
  |  |  ------------------
  ------------------
  106|  2.82k|        }
  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|  52.7k|        if (!directed && RNG_BOOL()) {
  ------------------
  |  |  151|      0|#define RNG_BOOL()       (igraph_rng_get_bool(igraph_rng_default()))
  |  |  ------------------
  |  |  |  Branch (151:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (111:13): [True: 0, False: 52.7k]
  ------------------
  112|      0|            dummy = c; c = d; d = dummy;
  113|      0|            if (use_adjlist) {
  ------------------
  |  Branch (113:17): [True: 0, False: 0]
  ------------------
  114|       |                /* Flip the edge in the unordered edge-list, so the update later on
  115|       |                 * hits the correct end. */
  116|      0|                VECTOR(alledges)[VECTOR(eids)[1] * 2] = c;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(alledges)[VECTOR(eids)[1] * 2] = c;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  117|      0|                VECTOR(alledges)[VECTOR(eids)[1] * 2 + 1] = d;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(alledges)[VECTOR(eids)[1] * 2 + 1] = d;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  118|      0|            }
  119|      0|        }
  120|       |
  121|       |        /* If we do not touch loops, check whether a == b or c == d and disallow
  122|       |         * the swap if needed */
  123|  52.7k|        if (!loops && (a == b || c == d)) {
  ------------------
  |  Branch (123:13): [True: 52.7k, False: 0]
  |  Branch (123:24): [True: 0, False: 52.7k]
  |  Branch (123:34): [True: 0, False: 52.7k]
  ------------------
  124|      0|            ok = false;
  125|  52.7k|        } else {
  126|       |            /* Check whether they are suitable for rewiring */
  127|  52.7k|            if (a == c || b == d) {
  ------------------
  |  Branch (127:17): [True: 7.50k, False: 45.2k]
  |  Branch (127:27): [True: 5.35k, False: 39.9k]
  ------------------
  128|       |                /* Swapping would have no effect */
  129|  12.8k|                ok = false;
  130|  39.9k|            } 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|  39.9k|                ok = loops || (a != d && b != c);
  ------------------
  |  Branch (134:22): [True: 0, False: 39.9k]
  |  Branch (134:32): [True: 37.8k, False: 2.04k]
  |  Branch (134:42): [True: 35.9k, False: 1.90k]
  ------------------
  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|  39.9k|                ok = ok && (directed || a != b || c != d);
  ------------------
  |  Branch (137:22): [True: 35.9k, False: 3.94k]
  |  Branch (137:29): [True: 35.9k, False: 0]
  |  Branch (137:41): [True: 0, False: 0]
  |  Branch (137:51): [True: 0, False: 0]
  ------------------
  138|  39.9k|            }
  139|  52.7k|        }
  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|  52.7k|        if (ok) {
  ------------------
  |  Branch (143:13): [True: 35.9k, False: 16.8k]
  ------------------
  144|  35.9k|            if (use_adjlist) {
  ------------------
  |  Branch (144:17): [True: 34.2k, False: 1.72k]
  ------------------
  145|  34.2k|                if (igraph_adjlist_has_edge(&al, a, d, directed)) {
  ------------------
  |  Branch (145:21): [True: 921, False: 33.3k]
  ------------------
  146|    921|                    ok = false;
  147|    921|                }
  148|  34.2k|            } else {
  149|  1.72k|                IGRAPH_CHECK(igraph_are_adjacent(graph, a, d, &ok));
  ------------------
  |  |  656|  1.72k|    do { \
  |  |  657|  1.72k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.72k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.72k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.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|  1.72k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.72k]
  |  |  ------------------
  ------------------
  150|  1.72k|                ok = !ok;
  151|  1.72k|            }
  152|  35.9k|        }
  153|  52.7k|        if (ok) {
  ------------------
  |  Branch (153:13): [True: 34.9k, False: 17.7k]
  ------------------
  154|  34.9k|            if (use_adjlist) {
  ------------------
  |  Branch (154:17): [True: 33.3k, False: 1.67k]
  ------------------
  155|  33.3k|                if (igraph_adjlist_has_edge(&al, c, b, directed)) {
  ------------------
  |  Branch (155:21): [True: 827, False: 32.4k]
  ------------------
  156|    827|                    ok = false;
  157|    827|                }
  158|  33.3k|            } else {
  159|  1.67k|                IGRAPH_CHECK(igraph_are_adjacent(graph, c, b, &ok));
  ------------------
  |  |  656|  1.67k|    do { \
  |  |  657|  1.67k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.67k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.67k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.67k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.67k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.67k]
  |  |  ------------------
  ------------------
  160|  1.67k|                ok = !ok;
  161|  1.67k|            }
  162|  34.9k|        }
  163|       |
  164|       |        /* If we are still okay, we can perform the rewiring */
  165|  52.7k|        if (ok) {
  ------------------
  |  Branch (165:13): [True: 34.1k, False: 18.6k]
  ------------------
  166|       |            /* printf("Deleting: %" IGRAPH_PRId " -> %" IGRAPH_PRId ", %" IGRAPH_PRId " -> %" IGRAPH_PRId "\n",
  167|       |                          a, b, c, d); */
  168|  34.1k|            if (use_adjlist) {
  ------------------
  |  Branch (168:17): [True: 32.4k, False: 1.63k]
  ------------------
  169|       |                /* Replace entry in sorted adjlist: */
  170|  32.4k|                IGRAPH_CHECK(igraph_adjlist_replace_edge(&al, a, b, d, directed));
  ------------------
  |  |  656|  32.4k|    do { \
  |  |  657|  32.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  32.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  32.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 32.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  32.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 32.4k]
  |  |  ------------------
  ------------------
  171|  32.4k|                IGRAPH_CHECK(igraph_adjlist_replace_edge(&al, c, d, b, directed));
  ------------------
  |  |  656|  32.4k|    do { \
  |  |  657|  32.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  32.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  32.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 32.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  32.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 32.4k]
  |  |  ------------------
  ------------------
  172|       |                /* Also replace in unsorted edgelist: */
  173|  32.4k|                VECTOR(alledges)[VECTOR(eids)[0] * 2 + 1] = d;
  ------------------
  |  |   60|  32.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(alledges)[VECTOR(eids)[0] * 2 + 1] = d;
  ------------------
  |  |   60|  32.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  174|  32.4k|                VECTOR(alledges)[VECTOR(eids)[1] * 2 + 1] = b;
  ------------------
  |  |   60|  32.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(alledges)[VECTOR(eids)[1] * 2 + 1] = b;
  ------------------
  |  |   60|  32.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  175|  32.4k|            } else {
  176|  1.63k|                IGRAPH_CHECK(igraph_delete_edges(graph, es));
  ------------------
  |  |  656|  1.63k|    do { \
  |  |  657|  1.63k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.63k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.63k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.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|  1.63k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.63k]
  |  |  ------------------
  ------------------
  177|  1.63k|                VECTOR(edgevec)[0] = a; VECTOR(edgevec)[1] = d;
  ------------------
  |  |   60|  1.63k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(edgevec)[0] = a; VECTOR(edgevec)[1] = d;
  ------------------
  |  |   60|  1.63k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  178|  1.63k|                VECTOR(edgevec)[2] = c; VECTOR(edgevec)[3] = b;
  ------------------
  |  |   60|  1.63k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(edgevec)[2] = c; VECTOR(edgevec)[3] = b;
  ------------------
  |  |   60|  1.63k|#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.63k|                IGRAPH_CHECK(igraph_add_edges(graph, &edgevec, 0));
  ------------------
  |  |  656|  1.63k|    do { \
  |  |  657|  1.63k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.63k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.63k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.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|  1.63k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.63k]
  |  |  ------------------
  ------------------
  182|  1.63k|            }
  183|  34.1k|            num_successful_swaps++;
  184|  34.1k|        }
  185|       |
  186|  52.7k|        num_swaps++;
  187|  52.7k|    }
  188|       |
  189|  1.33k|    if (use_adjlist) {
  ------------------
  |  Branch (189:9): [True: 791, False: 545]
  ------------------
  190|       |        /* Replace graph edges with the adjlist current state */
  191|    791|        IGRAPH_CHECK(igraph_delete_edges(graph, igraph_ess_all(IGRAPH_EDGEORDER_ID)));
  ------------------
  |  |  656|    791|    do { \
  |  |  657|    791|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    791|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    791|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 791]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    791|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 791]
  |  |  ------------------
  ------------------
  192|    791|        IGRAPH_CHECK(igraph_add_edges(graph, &alledges, 0));
  ------------------
  |  |  656|    791|    do { \
  |  |  657|    791|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    791|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    791|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 791]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    791|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 791]
  |  |  ------------------
  ------------------
  193|    791|    }
  194|       |
  195|  1.33k|    IGRAPH_PROGRESS("Random rewiring: ", 100.0, 0);
  ------------------
  |  |  169|  1.33k|    do { \
  |  |  170|  1.33k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  1.33k|    do { \
  |  |  |  |  657|  1.33k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.33k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, 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.33k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
  196|       |
  197|  1.33k|    if (use_adjlist) {
  ------------------
  |  Branch (197:9): [True: 791, False: 545]
  ------------------
  198|    791|        igraph_vector_int_destroy(&alledges);
  199|    791|        igraph_adjlist_destroy(&al);
  200|    791|    } else {
  201|    545|        igraph_vector_int_destroy(&edgevec);
  202|    545|    }
  203|       |
  204|  1.33k|    igraph_vector_int_destroy(&eids);
  205|  1.33k|    IGRAPH_FINALLY_CLEAN(use_adjlist ? 3 : 2);
  ------------------
  |  Branch (205:26): [True: 791, False: 545]
  ------------------
  206|       |
  207|  1.33k|    if (stats) {
  ------------------
  |  Branch (207:9): [True: 0, False: 1.33k]
  ------------------
  208|      0|        memset(stats, 0, sizeof(igraph_rewiring_stats_t));
  209|      0|        stats->successful_swaps = num_successful_swaps;
  210|      0|    }
  211|       |
  212|  1.33k|    return IGRAPH_SUCCESS;
  213|  1.33k|}
igraph_rewire:
  258|  2.27k|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.27k|    igraph_bool_t use_adjlist = n >= REWIRE_ADJLIST_THRESHOLD;
  ------------------
  |  |   40|  2.27k|#define REWIRE_ADJLIST_THRESHOLD 10
  ------------------
  260|       |
  261|  2.27k|    if ((allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ||
  ------------------
  |  |   25|  2.27k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (261:9): [True: 0, False: 2.27k]
  ------------------
  262|  2.27k|        (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW)) {
  ------------------
  |  |   26|  2.27k|#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.27k]
  ------------------
  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.27k|    return igraph_i_rewire(graph, n, allowed_edge_types & IGRAPH_LOOPS_SW, use_adjlist, stats);
  267|  2.27k|}

igraph_simplify:
   56|  2.30k|                               const igraph_attribute_combination_t *edge_comb) {
   57|       |
   58|  2.30k|    igraph_vector_int_t edges;
   59|  2.30k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
   60|  2.30k|    igraph_int_t no_of_edges = igraph_ecount(graph);
   61|  2.30k|    igraph_int_t edge;
   62|  2.30k|    igraph_bool_t attr = edge_comb && igraph_has_attribute_table();
  ------------------
  |  Branch (62:26): [True: 0, False: 2.30k]
  |  Branch (62:39): [True: 0, False: 0]
  ------------------
   63|  2.30k|    igraph_int_t from, to, pfrom = -1, pto = -2;
   64|  2.30k|    igraph_t res;
   65|  2.30k|    igraph_es_t es;
   66|  2.30k|    igraph_eit_t eit;
   67|  2.30k|    igraph_vector_int_t mergeinto;
   68|  2.30k|    igraph_int_t actedge;
   69|       |
   70|       |    /* if we already know there are no multi-edges, they don't need to be removed */
   71|  2.30k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MULTI) &&
  ------------------
  |  Branch (71:9): [True: 2.30k, False: 0]
  ------------------
   72|  2.30k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_MULTI)) {
  ------------------
  |  Branch (72:9): [True: 1.56k, False: 735]
  ------------------
   73|  1.56k|        remove_multiple = false;
   74|  1.56k|    }
   75|       |
   76|       |    /* if we already know there are no loops, they don't need to be removed */
   77|  2.30k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (77:9): [True: 2.30k, False: 0]
  ------------------
   78|  2.30k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (78:9): [True: 1.53k, False: 763]
  ------------------
   79|  1.53k|        remove_loops = false;
   80|  1.53k|    }
   81|       |
   82|  2.30k|    if (!remove_multiple && !remove_loops)
  ------------------
  |  Branch (82:9): [True: 1.56k, False: 735]
  |  Branch (82:29): [True: 1.27k, False: 295]
  ------------------
   83|       |        /* nothing to do */
   84|  1.27k|    {
   85|  1.27k|        return IGRAPH_SUCCESS;
   86|  1.27k|    }
   87|       |
   88|  1.03k|    if (!remove_multiple) {
  ------------------
  |  Branch (88:9): [True: 295, False: 735]
  ------------------
   89|    295|        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|    295|        IGRAPH_VECTOR_INT_INIT_FINALLY(&edges_to_delete, 0);
  ------------------
  |  |  119|    295|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    295|    do { \
  |  |  |  |  657|    295|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    295|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    295|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 295]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    295|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 295]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    295|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    295|    do { \
  |  |  |  |  604|    295|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    295|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    295|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    295|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 295]
  |  |  |  |  ------------------
  |  |  |  |  608|    295|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    295|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 295]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 295]
  |  |  ------------------
  ------------------
   94|    295|        IGRAPH_CHECK(igraph_es_all(&es, IGRAPH_EDGEORDER_ID));
  ------------------
  |  |  656|    295|    do { \
  |  |  657|    295|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    295|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    295|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 295]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    295|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 295]
  |  |  ------------------
  ------------------
   95|    295|        IGRAPH_FINALLY(igraph_es_destroy, &es);
  ------------------
  |  |  603|    295|    do { \
  |  |  604|    295|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    295|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    295|         * incorrect destructor function with the pointer */ \
  |  |  607|    295|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 295]
  |  |  ------------------
  |  |  608|    295|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    295|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 295]
  |  |  ------------------
  ------------------
   96|    295|        IGRAPH_CHECK(igraph_eit_create(graph, es, &eit));
  ------------------
  |  |  656|    295|    do { \
  |  |  657|    295|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    295|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    295|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 295]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    295|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 295]
  |  |  ------------------
  ------------------
   97|    295|        IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  603|    295|    do { \
  |  |  604|    295|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    295|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    295|         * incorrect destructor function with the pointer */ \
  |  |  607|    295|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 295]
  |  |  ------------------
  |  |  608|    295|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    295|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 295]
  |  |  ------------------
  ------------------
   98|       |
   99|  8.09k|        while (!IGRAPH_EIT_END(eit)) {
  ------------------
  |  |  371|  8.09k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
  |  Branch (99:16): [True: 7.80k, False: 295]
  ------------------
  100|  7.80k|            edge = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|  7.80k|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 7.80k, False: 0]
  |  |  ------------------
  |  |  406|  7.80k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  101|  7.80k|            from = IGRAPH_FROM(graph, edge);
  ------------------
  |  |  115|  7.80k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  7.80k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  102|  7.80k|            to = IGRAPH_TO(graph, edge);
  ------------------
  |  |  128|  7.80k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  7.80k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  103|  7.80k|            if (from == to) {
  ------------------
  |  Branch (103:17): [True: 784, False: 7.01k]
  ------------------
  104|    784|                IGRAPH_CHECK(igraph_vector_int_push_back(&edges_to_delete, edge));
  ------------------
  |  |  656|    784|    do { \
  |  |  657|    784|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    784|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    784|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 784]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    784|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 784]
  |  |  ------------------
  ------------------
  105|    784|            }
  106|  7.80k|            IGRAPH_EIT_NEXT(eit);
  ------------------
  |  |  359|  7.80k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  107|  7.80k|        }
  108|       |
  109|    295|        igraph_eit_destroy(&eit);
  110|    295|        igraph_es_destroy(&es);
  111|    295|        IGRAPH_FINALLY_CLEAN(2);
  112|       |
  113|    295|        if (igraph_vector_int_size(&edges_to_delete) > 0) {
  ------------------
  |  Branch (113:13): [True: 295, False: 0]
  ------------------
  114|    295|            IGRAPH_CHECK(igraph_delete_edges(graph, igraph_ess_vector(&edges_to_delete)));
  ------------------
  |  |  656|    295|    do { \
  |  |  657|    295|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    295|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    295|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 295]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    295|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 295]
  |  |  ------------------
  ------------------
  115|    295|        }
  116|       |
  117|    295|        igraph_vector_int_destroy(&edges_to_delete);
  118|    295|        IGRAPH_FINALLY_CLEAN(1);
  119|       |
  120|    295|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, false);
  121|       |
  122|    295|        return IGRAPH_SUCCESS;
  123|    295|    }
  124|       |
  125|    735|    if (attr) {
  ------------------
  |  Branch (125:9): [True: 0, False: 735]
  ------------------
  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|    735|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, 0);
  ------------------
  |  |  119|    735|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    735|    do { \
  |  |  |  |  657|    735|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    735|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    735|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 735]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    735|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 735]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    735|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    735|    do { \
  |  |  |  |  604|    735|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    735|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    735|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    735|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 735]
  |  |  |  |  ------------------
  |  |  |  |  608|    735|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    735|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 735]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 735]
  |  |  ------------------
  ------------------
  129|    735|    IGRAPH_CHECK(igraph_vector_int_reserve(&edges, no_of_edges * 2));
  ------------------
  |  |  656|    735|    do { \
  |  |  657|    735|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    735|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    735|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 735]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    735|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 735]
  |  |  ------------------
  ------------------
  130|       |
  131|    735|    IGRAPH_CHECK(igraph_es_all(&es, IGRAPH_EDGEORDER_FROM));
  ------------------
  |  |  656|    735|    do { \
  |  |  657|    735|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    735|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    735|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 735]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    735|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 735]
  |  |  ------------------
  ------------------
  132|    735|    IGRAPH_FINALLY(igraph_es_destroy, &es);
  ------------------
  |  |  603|    735|    do { \
  |  |  604|    735|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    735|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    735|         * incorrect destructor function with the pointer */ \
  |  |  607|    735|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 735]
  |  |  ------------------
  |  |  608|    735|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    735|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 735]
  |  |  ------------------
  ------------------
  133|    735|    IGRAPH_CHECK(igraph_eit_create(graph, es, &eit));
  ------------------
  |  |  656|    735|    do { \
  |  |  657|    735|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    735|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    735|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 735]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    735|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 735]
  |  |  ------------------
  ------------------
  134|    735|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  603|    735|    do { \
  |  |  604|    735|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    735|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    735|         * incorrect destructor function with the pointer */ \
  |  |  607|    735|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 735]
  |  |  ------------------
  |  |  608|    735|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    735|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 735]
  |  |  ------------------
  ------------------
  135|       |
  136|  45.6k|    for (actedge = -1; !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  371|  45.6k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                  for (actedge = -1; !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  359|  44.9k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (136:24): [True: 44.9k, False: 735]
  ------------------
  137|  44.9k|        edge = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|  44.9k|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 0, False: 44.9k]
  |  |  ------------------
  |  |  406|  44.9k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|  44.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  138|  44.9k|        from = IGRAPH_FROM(graph, edge);
  ------------------
  |  |  115|  44.9k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  44.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  139|  44.9k|        to = IGRAPH_TO(graph, edge);
  ------------------
  |  |  128|  44.9k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  44.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  140|       |
  141|  44.9k|        if (remove_loops && from == to) {
  ------------------
  |  Branch (141:13): [True: 31.3k, False: 13.6k]
  |  Branch (141:29): [True: 12.7k, False: 18.5k]
  ------------------
  142|       |            /* Loop edge to be removed */
  143|  12.7k|            if (attr) {
  ------------------
  |  Branch (143:17): [True: 0, False: 12.7k]
  ------------------
  144|      0|                VECTOR(mergeinto)[edge] = -1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  145|      0|            }
  146|  32.1k|        } else if (remove_multiple && from == pfrom && to == pto) {
  ------------------
  |  Branch (146:20): [True: 32.1k, False: 0]
  |  Branch (146:39): [True: 19.8k, False: 12.2k]
  |  Branch (146:56): [True: 12.9k, False: 6.91k]
  ------------------
  147|       |            /* Multiple edge to be contracted */
  148|  12.9k|            if (attr) {
  ------------------
  |  Branch (148:17): [True: 0, False: 12.9k]
  ------------------
  149|      0|                VECTOR(mergeinto)[edge] = actedge;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  150|      0|            }
  151|  19.1k|        } else {
  152|       |            /* Edge to be kept */
  153|  19.1k|            igraph_vector_int_push_back(&edges, from);  /* reserved */
  154|  19.1k|            igraph_vector_int_push_back(&edges, to);  /* reserved */
  155|  19.1k|            if (attr) {
  ------------------
  |  Branch (155:17): [True: 0, False: 19.1k]
  ------------------
  156|      0|                actedge++;
  157|      0|                VECTOR(mergeinto)[edge] = actedge;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  158|      0|            }
  159|  19.1k|        }
  160|  44.9k|        pfrom = from; pto = to;
  161|  44.9k|    }
  162|       |
  163|    735|    igraph_eit_destroy(&eit);
  164|    735|    igraph_es_destroy(&es);
  165|    735|    IGRAPH_FINALLY_CLEAN(2);
  166|       |
  167|    735|    IGRAPH_CHECK(igraph_create(&res, &edges, no_of_nodes, igraph_is_directed(graph)));
  ------------------
  |  |  656|    735|    do { \
  |  |  657|    735|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    735|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    735|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 735]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    735|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 735]
  |  |  ------------------
  ------------------
  168|       |
  169|    735|    igraph_vector_int_destroy(&edges);
  170|    735|    IGRAPH_FINALLY_CLEAN(1);
  171|       |
  172|    735|    IGRAPH_FINALLY(igraph_destroy, &res);
  ------------------
  |  |  603|    735|    do { \
  |  |  604|    735|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    735|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    735|         * incorrect destructor function with the pointer */ \
  |  |  607|    735|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 735]
  |  |  ------------------
  |  |  608|    735|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    735|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 735]
  |  |  ------------------
  ------------------
  173|       |
  174|    735|    IGRAPH_CHECK(igraph_i_attribute_copy(&res, graph, true, true, /* edges= */ false));
  ------------------
  |  |  656|    735|    do { \
  |  |  657|    735|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    735|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    735|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 735]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    735|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 735]
  |  |  ------------------
  ------------------
  175|       |
  176|    735|    if (attr) {
  ------------------
  |  Branch (176:9): [True: 0, False: 735]
  ------------------
  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|    735|    IGRAPH_FINALLY_CLEAN(1);
  189|    735|    igraph_destroy(graph);
  190|    735|    *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|    735|    if (remove_loops) {
  ------------------
  |  Branch (195:9): [True: 468, False: 267]
  ------------------
  196|       |        /* Loop edges were removed so we know for sure that there aren't any
  197|       |         * loop edges now */
  198|    468|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, false);
  199|    468|    }
  200|       |
  201|    735|    if (remove_multiple) {
  ------------------
  |  Branch (201:9): [True: 735, False: 0]
  ------------------
  202|       |        /* Multi-edges were removed so we know for sure that there aren't any
  203|       |         * multi-edges now */
  204|    735|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_MULTI, false);
  205|    735|    }
  206|       |
  207|    735|    return IGRAPH_SUCCESS;
  208|    735|}

igraph_i_induced_subgraph_map:
  355|    686|                                  igraph_bool_t map_is_prepared) {
  356|       |
  357|    686|    if (impl == IGRAPH_SUBGRAPH_AUTO) {
  ------------------
  |  Branch (357:9): [True: 686, False: 0]
  ------------------
  358|    686|        IGRAPH_CHECK(igraph_i_induced_subgraph_suggest_implementation(graph, vids, &impl));
  ------------------
  |  |  656|    686|    do { \
  |  |  657|    686|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    686|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    686|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 686]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    686|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 686]
  |  |  ------------------
  ------------------
  359|    686|    }
  360|       |
  361|    686|    switch (impl) {
  362|     60|    case IGRAPH_SUBGRAPH_COPY_AND_DELETE:
  ------------------
  |  Branch (362:5): [True: 60, False: 626]
  ------------------
  363|     60|        return igraph_i_induced_subgraph_copy_and_delete(graph, res, vids, map, invmap);
  364|       |
  365|    626|    case IGRAPH_SUBGRAPH_CREATE_FROM_SCRATCH:
  ------------------
  |  Branch (365:5): [True: 626, False: 60]
  ------------------
  366|    626|        return igraph_i_induced_subgraph_create_from_scratch(graph, res, vids, map,
  367|    626|                invmap, /* map_is_prepared = */ map_is_prepared);
  368|       |
  369|      0|    default:
  ------------------
  |  Branch (369:5): [True: 0, False: 686]
  ------------------
  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|    686|    }
  372|    686|}
subgraph.c:igraph_i_induced_subgraph_suggest_implementation:
  327|    686|        igraph_subgraph_implementation_t *result) {
  328|    686|    double ratio;
  329|    686|    igraph_int_t num_vs;
  330|       |
  331|    686|    if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (331:9): [True: 0, False: 686]
  ------------------
  332|      0|        ratio = 1.0;
  333|    686|    } else {
  334|    686|        IGRAPH_CHECK(igraph_vs_size(graph, &vids, &num_vs));
  ------------------
  |  |  656|    686|    do { \
  |  |  657|    686|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    686|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    686|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 686]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    686|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 686]
  |  |  ------------------
  ------------------
  335|    686|        ratio = (igraph_real_t) num_vs / igraph_vcount(graph);
  336|    686|    }
  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|    686|    if (ratio > 0.5) {
  ------------------
  |  Branch (341:9): [True: 60, False: 626]
  ------------------
  342|     60|        *result = IGRAPH_SUBGRAPH_COPY_AND_DELETE;
  343|    626|    } else {
  344|    626|        *result = IGRAPH_SUBGRAPH_CREATE_FROM_SCRATCH;
  345|    626|    }
  346|       |
  347|    686|    return IGRAPH_SUCCESS;
  348|    686|}
subgraph.c:igraph_i_induced_subgraph_copy_and_delete:
   36|     60|        igraph_vector_int_t *map, igraph_vector_int_t *invmap) {
   37|       |
   38|     60|    const igraph_int_t no_of_nodes = igraph_vcount(graph);
   39|     60|    igraph_int_t no_of_new_nodes_estimate;
   40|     60|    igraph_vector_int_t delete;
   41|     60|    igraph_bitset_t remain;
   42|     60|    igraph_vit_t vit;
   43|       |
   44|     60|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|     60|    do { \
  |  |  657|     60|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     60|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     60|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 60]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
   45|     60|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|     60|    do { \
  |  |  604|     60|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     60|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     60|         * incorrect destructor function with the pointer */ \
  |  |  607|     60|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 60]
  |  |  ------------------
  |  |  608|     60|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     60|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
   46|       |
   47|     60|    IGRAPH_VECTOR_INT_INIT_FINALLY(&delete, 0);
  ------------------
  |  |  119|     60|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|     60|    do { \
  |  |  |  |  657|     60|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|     60|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|     60|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 60]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, 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|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 60]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|     60|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|     60|    do { \
  |  |  |  |  604|     60|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|     60|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|     60|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|     60|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 60]
  |  |  |  |  ------------------
  |  |  |  |  608|     60|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 60]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 60]
  |  |  ------------------
  ------------------
   48|     60|    IGRAPH_BITSET_INIT_FINALLY(&remain, no_of_nodes);
  ------------------
  |  |  259|     60|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  260|     60|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|     60|    do { \
  |  |  |  |  657|     60|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|     60|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|     60|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 60]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, 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|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 60]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  261|     60|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|     60|    do { \
  |  |  |  |  604|     60|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|     60|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|     60|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|     60|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 60]
  |  |  |  |  ------------------
  |  |  |  |  608|     60|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 60]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (261:62): [Folded, False: 60]
  |  |  ------------------
  ------------------
   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|     60|    no_of_new_nodes_estimate = no_of_nodes - IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|     60|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
   53|     60|    if (no_of_new_nodes_estimate < 0) {
  ------------------
  |  Branch (53:9): [True: 0, False: 60]
  ------------------
   54|      0|        no_of_new_nodes_estimate = 0;
   55|      0|    }
   56|       |
   57|     60|    IGRAPH_CHECK(igraph_vector_int_reserve(&delete, no_of_new_nodes_estimate));
  ------------------
  |  |  656|     60|    do { \
  |  |  657|     60|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     60|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     60|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 60]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
   58|       |
   59|  1.42k|    for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  201|     60|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  179|  1.42k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  167|  1.36k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (59:33): [True: 1.36k, False: 60]
  ------------------
   60|  1.36k|        IGRAPH_BIT_SET(remain, IGRAPH_VIT_GET(vit));
  ------------------
  |  |  103|  1.36k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  1.36k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  2.72k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  1.36k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:30): [True: 0, False: 1.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  2.72k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  1.36k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (66:53): [True: 0, False: 1.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   61|  1.36k|    }
   62|       |
   63|  2.50k|    for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (63:30): [True: 2.44k, False: 60]
  ------------------
   64|  2.44k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  2.44k|    do { \
  |  |   47|  2.44k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 2.44k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  2.44k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 2.44k]
  |  |  ------------------
  ------------------
   65|       |
   66|  2.44k|        if (! IGRAPH_BIT_TEST(remain, i)) {
  ------------------
  |  |  142|  2.44k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  2.44k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  2.44k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  2.44k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  2.44k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  2.44k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (66:13): [True: 1.08k, False: 1.36k]
  ------------------
   67|  1.08k|            IGRAPH_CHECK(igraph_vector_int_push_back(&delete, i));
  ------------------
  |  |  656|  1.08k|    do { \
  |  |  657|  1.08k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.08k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.08k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.08k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.08k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.08k]
  |  |  ------------------
  ------------------
   68|  1.08k|        }
   69|  2.44k|    }
   70|       |
   71|     60|    igraph_bitset_destroy(&remain);
   72|     60|    IGRAPH_FINALLY_CLEAN(1);
   73|       |
   74|     60|    IGRAPH_CHECK(igraph_copy(res, graph));
  ------------------
  |  |  656|     60|    do { \
  |  |  657|     60|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     60|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     60|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 60]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
   75|     60|    IGRAPH_FINALLY(igraph_destroy, res);
  ------------------
  |  |  603|     60|    do { \
  |  |  604|     60|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     60|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     60|         * incorrect destructor function with the pointer */ \
  |  |  607|     60|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 60]
  |  |  ------------------
  |  |  608|     60|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     60|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
   76|     60|    IGRAPH_CHECK(igraph_delete_vertices_map(res, igraph_vss_vector(&delete),
  ------------------
  |  |  656|     60|    do { \
  |  |  657|     60|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     60|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     60|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 60]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
   77|     60|                                            map, invmap));
   78|       |
   79|     60|    igraph_vector_int_destroy(&delete);
   80|     60|    igraph_vit_destroy(&vit);
   81|     60|    IGRAPH_FINALLY_CLEAN(3);
   82|       |
   83|     60|    return IGRAPH_SUCCESS;
   84|     60|}
subgraph.c:igraph_i_induced_subgraph_create_from_scratch:
   99|    626|        igraph_bool_t map_is_prepared) {
  100|       |
  101|    626|    const igraph_bool_t directed = igraph_is_directed(graph);
  102|    626|    const igraph_int_t no_of_nodes = igraph_vcount(graph);
  103|    626|    igraph_int_t no_of_new_nodes = 0;
  104|    626|    igraph_int_t n;
  105|    626|    igraph_int_t to;
  106|    626|    igraph_int_t eid;
  107|    626|    igraph_vector_int_t vids_old2new, vids_new2old;
  108|    626|    igraph_vector_int_t eids_new2old;
  109|    626|    igraph_vector_int_t vids_vec;
  110|    626|    igraph_vector_int_t nei_edges;
  111|    626|    igraph_vector_int_t new_edges;
  112|    626|    igraph_vit_t vit;
  113|    626|    igraph_vector_int_t *my_vids_old2new = &vids_old2new,
  114|    626|                        *my_vids_new2old = &vids_new2old;
  115|       |
  116|       |    /* The order of initialization is important here, they will be destroyed in the
  117|       |     * opposite order */
  118|    626|    IGRAPH_VECTOR_INT_INIT_FINALLY(&eids_new2old, 0);
  ------------------
  |  |  119|    626|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    626|    do { \
  |  |  |  |  657|    626|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    626|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    626|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 626]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    626|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 626]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    626|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    626|    do { \
  |  |  |  |  604|    626|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    626|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    626|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    626|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 626]
  |  |  |  |  ------------------
  |  |  |  |  608|    626|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    626|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 626]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 626]
  |  |  ------------------
  ------------------
  119|    626|    if (invmap) {
  ------------------
  |  Branch (119:9): [True: 0, False: 626]
  ------------------
  120|      0|        my_vids_new2old = invmap;
  121|      0|        igraph_vector_int_clear(my_vids_new2old);
  122|    626|    } else {
  123|    626|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vids_new2old, 0);
  ------------------
  |  |  119|    626|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    626|    do { \
  |  |  |  |  657|    626|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    626|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    626|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 626]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    626|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 626]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    626|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    626|    do { \
  |  |  |  |  604|    626|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    626|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    626|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    626|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 626]
  |  |  |  |  ------------------
  |  |  |  |  608|    626|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    626|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 626]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 626]
  |  |  ------------------
  ------------------
  124|    626|    }
  125|    626|    IGRAPH_VECTOR_INT_INIT_FINALLY(&new_edges, 0);
  ------------------
  |  |  119|    626|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    626|    do { \
  |  |  |  |  657|    626|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    626|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    626|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 626]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    626|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 626]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    626|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    626|    do { \
  |  |  |  |  604|    626|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    626|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    626|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    626|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 626]
  |  |  |  |  ------------------
  |  |  |  |  608|    626|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    626|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 626]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 626]
  |  |  ------------------
  ------------------
  126|    626|    IGRAPH_VECTOR_INT_INIT_FINALLY(&nei_edges, 0);
  ------------------
  |  |  119|    626|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    626|    do { \
  |  |  |  |  657|    626|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    626|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    626|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 626]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    626|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 626]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    626|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    626|    do { \
  |  |  |  |  604|    626|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    626|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    626|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    626|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 626]
  |  |  |  |  ------------------
  |  |  |  |  608|    626|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    626|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 626]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 626]
  |  |  ------------------
  ------------------
  127|    626|    if (map) {
  ------------------
  |  Branch (127:9): [True: 626, False: 0]
  ------------------
  128|    626|        my_vids_old2new = map;
  129|    626|        if (!map_is_prepared) {
  ------------------
  |  Branch (129:13): [True: 0, False: 626]
  ------------------
  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|    626|    } 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|    626|    IGRAPH_VECTOR_INT_INIT_FINALLY(&vids_vec, 0);
  ------------------
  |  |  119|    626|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    626|    do { \
  |  |  |  |  657|    626|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    626|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    626|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 626]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    626|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 626]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    626|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    626|    do { \
  |  |  |  |  604|    626|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    626|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    626|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    626|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 626]
  |  |  |  |  ------------------
  |  |  |  |  608|    626|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    626|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 626]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 626]
  |  |  ------------------
  ------------------
  138|       |
  139|    626|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|    626|    do { \
  |  |  657|    626|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    626|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    626|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 626]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    626|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 626]
  |  |  ------------------
  ------------------
  140|    626|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|    626|    do { \
  |  |  604|    626|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    626|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    626|         * incorrect destructor function with the pointer */ \
  |  |  607|    626|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 626]
  |  |  ------------------
  |  |  608|    626|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    626|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 626]
  |  |  ------------------
  ------------------
  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|    626|    IGRAPH_CHECK(igraph_vit_as_vector(&vit, &vids_vec));
  ------------------
  |  |  656|    626|    do { \
  |  |  657|    626|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    626|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    626|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 626]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    626|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 626]
  |  |  ------------------
  ------------------
  151|    626|    igraph_vit_destroy(&vit);
  152|    626|    IGRAPH_FINALLY_CLEAN(1);
  153|       |
  154|    626|    igraph_vector_int_sort(&vids_vec);
  155|    626|    n = igraph_vector_int_size(&vids_vec);
  156|  21.4k|    for (igraph_int_t i = 0; i < n; i++) {
  ------------------
  |  Branch (156:30): [True: 20.8k, False: 626]
  ------------------
  157|  20.8k|        igraph_int_t vid = VECTOR(vids_vec)[i];
  ------------------
  |  |   60|  20.8k|#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|  20.8k|        if (VECTOR(*my_vids_old2new)[vid] < 0) {
  ------------------
  |  |   60|  20.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (161:13): [True: 20.8k, False: 0]
  ------------------
  162|  20.8k|            IGRAPH_CHECK(igraph_vector_int_push_back(my_vids_new2old, vid));
  ------------------
  |  |  656|  20.8k|    do { \
  |  |  657|  20.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  20.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  20.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.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|  20.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 20.8k]
  |  |  ------------------
  ------------------
  163|  20.8k|            VECTOR(*my_vids_old2new)[vid] = no_of_new_nodes;
  ------------------
  |  |   60|  20.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  164|  20.8k|            no_of_new_nodes++;
  165|  20.8k|        }
  166|  20.8k|    }
  167|    626|    igraph_vector_int_destroy(&vids_vec);
  168|    626|    IGRAPH_FINALLY_CLEAN(1);
  169|       |
  170|       |    /* Create the new edge list */
  171|  21.4k|    for (igraph_int_t i = 0; i < no_of_new_nodes; i++) {
  ------------------
  |  Branch (171:30): [True: 20.8k, False: 626]
  ------------------
  172|  20.8k|        igraph_int_t old_vid = VECTOR(*my_vids_new2old)[i];
  ------------------
  |  |   60|  20.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  173|  20.8k|        igraph_int_t new_vid = i;
  174|  20.8k|        igraph_bool_t skip_loop_edge;
  175|       |
  176|  20.8k|        IGRAPH_CHECK(igraph_incident(graph, &nei_edges, old_vid, IGRAPH_OUT, IGRAPH_LOOPS));
  ------------------
  |  |  656|  20.8k|    do { \
  |  |  657|  20.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  20.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  20.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.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|  20.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 20.8k]
  |  |  ------------------
  ------------------
  177|  20.8k|        n = igraph_vector_int_size(&nei_edges);
  178|       |
  179|  20.8k|        if (directed) {
  ------------------
  |  Branch (179:13): [True: 20.8k, False: 0]
  ------------------
  180|       |            /* directed graph; this is easier */
  181|  50.7k|            for (igraph_int_t j = 0; j < n; j++) {
  ------------------
  |  Branch (181:38): [True: 29.8k, False: 20.8k]
  ------------------
  182|  29.8k|                eid = VECTOR(nei_edges)[j];
  ------------------
  |  |   60|  29.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  183|       |
  184|  29.8k|                to = VECTOR(*my_vids_old2new)[ IGRAPH_TO(graph, eid) ];
  ------------------
  |  |   60|  29.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              to = VECTOR(*my_vids_old2new)[ IGRAPH_TO(graph, eid) ];
  ------------------
  |  |  128|  29.8k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  29.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  185|  29.8k|                if (to < 0) {
  ------------------
  |  Branch (185:21): [True: 1.44k, False: 28.4k]
  ------------------
  186|  1.44k|                    continue;
  187|  1.44k|                }
  188|       |
  189|  28.4k|                IGRAPH_CHECK(igraph_vector_int_push_back(&new_edges, new_vid));
  ------------------
  |  |  656|  28.4k|    do { \
  |  |  657|  28.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  28.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  28.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 28.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|  28.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 28.4k]
  |  |  ------------------
  ------------------
  190|  28.4k|                IGRAPH_CHECK(igraph_vector_int_push_back(&new_edges, to));
  ------------------
  |  |  656|  28.4k|    do { \
  |  |  657|  28.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  28.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  28.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 28.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|  28.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 28.4k]
  |  |  ------------------
  ------------------
  191|  28.4k|                IGRAPH_CHECK(igraph_vector_int_push_back(&eids_new2old, eid));
  ------------------
  |  |  656|  28.4k|    do { \
  |  |  657|  28.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  28.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  28.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 28.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|  28.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 28.4k]
  |  |  ------------------
  ------------------
  192|  28.4k|            }
  193|  20.8k|        } else {
  194|       |            /* undirected graph. We need to be careful with loop edges as each
  195|       |             * loop edge will appear twice. We use a boolean flag to skip every
  196|       |             * second loop edge */
  197|      0|            skip_loop_edge = false;
  198|      0|            for (igraph_int_t j = 0; j < n; j++) {
  ------------------
  |  Branch (198:38): [True: 0, False: 0]
  ------------------
  199|      0|                eid = VECTOR(nei_edges)[j];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  200|       |
  201|      0|                if (IGRAPH_FROM(graph, eid) != old_vid) {
  ------------------
  |  |  115|      0|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (201:21): [True: 0, False: 0]
  ------------------
  202|       |                    /* avoid processing edges twice */
  203|      0|                    continue;
  204|      0|                }
  205|       |
  206|      0|                to = VECTOR(*my_vids_old2new)[ IGRAPH_TO(graph, eid) ];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              to = VECTOR(*my_vids_old2new)[ IGRAPH_TO(graph, eid) ];
  ------------------
  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  207|      0|                if (to < 0) {
  ------------------
  |  Branch (207:21): [True: 0, False: 0]
  ------------------
  208|      0|                    continue;
  209|      0|                }
  210|       |
  211|      0|                if (new_vid == to) {
  ------------------
  |  Branch (211:21): [True: 0, False: 0]
  ------------------
  212|       |                    /* this is a loop edge; check whether we need to skip it */
  213|      0|                    skip_loop_edge = !skip_loop_edge;
  214|      0|                    if (skip_loop_edge) {
  ------------------
  |  Branch (214:25): [True: 0, False: 0]
  ------------------
  215|      0|                        continue;
  216|      0|                    }
  217|      0|                }
  218|       |
  219|      0|                IGRAPH_CHECK(igraph_vector_int_push_back(&new_edges, new_vid));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  220|      0|                IGRAPH_CHECK(igraph_vector_int_push_back(&new_edges, to));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  221|      0|                IGRAPH_CHECK(igraph_vector_int_push_back(&eids_new2old, eid));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  222|      0|            }
  223|      0|        }
  224|  20.8k|    }
  225|       |
  226|       |    /* Get rid of some vectors that are not needed anymore */
  227|    626|    if (!map) {
  ------------------
  |  Branch (227:9): [True: 0, False: 626]
  ------------------
  228|      0|        igraph_vector_int_destroy(&vids_old2new);
  229|      0|        IGRAPH_FINALLY_CLEAN(1);
  230|      0|    }
  231|    626|    igraph_vector_int_destroy(&nei_edges);
  232|    626|    IGRAPH_FINALLY_CLEAN(1);
  233|       |
  234|       |    /* Create the new graph */
  235|    626|    IGRAPH_CHECK(igraph_create(res, &new_edges, no_of_new_nodes, directed));
  ------------------
  |  |  656|    626|    do { \
  |  |  657|    626|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    626|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    626|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 626]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    626|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 626]
  |  |  ------------------
  ------------------
  236|       |
  237|       |    /* Now we can also get rid of the new_edges vector */
  238|    626|    igraph_vector_int_destroy(&new_edges);
  239|    626|    IGRAPH_FINALLY_CLEAN(1);
  240|       |
  241|       |    /* Make sure that the newly created graph is destroyed if something happens from
  242|       |     * now on */
  243|    626|    IGRAPH_FINALLY(igraph_destroy, res);
  ------------------
  |  |  603|    626|    do { \
  |  |  604|    626|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    626|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    626|         * incorrect destructor function with the pointer */ \
  |  |  607|    626|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 626]
  |  |  ------------------
  |  |  608|    626|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    626|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 626]
  |  |  ------------------
  ------------------
  244|       |
  245|       |    /* Copy the graph attributes */
  246|    626|    IGRAPH_CHECK(igraph_i_attribute_copy(res, graph, true, /* vertex= */ false, /* edge= */ false));
  ------------------
  |  |  656|    626|    do { \
  |  |  657|    626|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    626|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    626|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 626]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    626|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 626]
  |  |  ------------------
  ------------------
  247|       |
  248|       |    /* Copy the vertex attributes */
  249|    626|    IGRAPH_CHECK(igraph_i_attribute_permute_vertices(graph, res, my_vids_new2old));
  ------------------
  |  |  656|    626|    do { \
  |  |  657|    626|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    626|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    626|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 626]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    626|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 626]
  |  |  ------------------
  ------------------
  250|       |
  251|       |    /* Copy the edge attributes */
  252|    626|    IGRAPH_CHECK(igraph_i_attribute_permute_edges(graph, res, &eids_new2old));
  ------------------
  |  |  656|    626|    do { \
  |  |  657|    626|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    626|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    626|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 626]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    626|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 626]
  |  |  ------------------
  ------------------
  253|       |
  254|       |    /* Get rid of the remaining stuff */
  255|    626|    if (!invmap) {
  ------------------
  |  Branch (255:9): [True: 626, False: 0]
  ------------------
  256|    626|        igraph_vector_int_destroy(my_vids_new2old);
  257|    626|        IGRAPH_FINALLY_CLEAN(1);
  258|    626|    }
  259|    626|    igraph_vector_int_destroy(&eids_new2old);
  260|    626|    IGRAPH_FINALLY_CLEAN(2);   /* 1 + 1 since we don't need to destroy res */
  261|       |
  262|    626|    return IGRAPH_SUCCESS;
  263|    626|}

igraph_get_all_shortest_paths:
  100|  2.30k|        igraph_neimode_t mode) {
  101|       |
  102|  2.30k|    if (weights == NULL) {
  ------------------
  |  Branch (102:9): [True: 2.30k, False: 0]
  ------------------
  103|       |        /* Unweighted version */
  104|  2.30k|        return igraph_i_get_all_shortest_paths_unweighted(
  105|  2.30k|            graph, vertices, edges, nrgeo, from, to, mode
  106|  2.30k|        );
  107|  2.30k|    } 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.30k|}
igraph_i_get_all_shortest_paths_unweighted:
  121|  2.30k|        igraph_neimode_t mode) {
  122|       |
  123|  2.30k|    const igraph_int_t no_of_nodes = igraph_vcount(graph);
  124|  2.30k|    igraph_int_t *geodist;
  125|  2.30k|    igraph_vector_int_list_t paths;
  126|  2.30k|    igraph_vector_int_list_t path_edge;
  127|  2.30k|    igraph_dqueue_int_t q;
  128|  2.30k|    igraph_vector_int_t *vptr;
  129|  2.30k|    igraph_vector_int_t *vptr_e;
  130|  2.30k|    igraph_vector_int_t neis;
  131|  2.30k|    igraph_vector_int_t ptrlist;
  132|  2.30k|    igraph_vector_int_t ptrhead;
  133|  2.30k|    igraph_int_t n;
  134|  2.30k|    igraph_int_t to_reach, reached = 0, maxdist = 0;
  135|       |
  136|  2.30k|    igraph_vit_t vit;
  137|       |
  138|  2.30k|    if (from < 0 || from >= no_of_nodes) {
  ------------------
  |  Branch (138:9): [True: 0, False: 2.30k]
  |  Branch (138:21): [True: 0, False: 2.30k]
  ------------------
  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.30k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (141:9): [True: 2.30k, False: 0]
  |  Branch (141:31): [True: 2.30k, False: 0]
  ------------------
  142|  2.30k|        mode != IGRAPH_ALL) {
  ------------------
  |  Branch (142:9): [True: 0, False: 2.30k]
  ------------------
  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.30k|    IGRAPH_CHECK(igraph_vit_create(graph, to, &vit));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  147|  2.30k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  2.30k|    do { \
  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  ------------------
  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  148|       |
  149|       |    /* paths will store the shortest paths during the search */
  150|  2.30k|    IGRAPH_VECTOR_INT_LIST_INIT_FINALLY(&paths, 0);
  ------------------
  |  |   58|  2.30k|    do { IGRAPH_CHECK(igraph_vector_int_list_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   59|  2.30k|        IGRAPH_FINALLY(igraph_vector_int_list_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (59:69): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  151|       |    /* path_edge will store the shortest paths during the search */
  152|  2.30k|    IGRAPH_VECTOR_INT_LIST_INIT_FINALLY(&path_edge, 0);
  ------------------
  |  |   58|  2.30k|    do { IGRAPH_CHECK(igraph_vector_int_list_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   59|  2.30k|        IGRAPH_FINALLY(igraph_vector_int_list_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (59:69): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  153|       |    /* neis is a temporary vector holding the neighbors of the
  154|       |     * node being examined */
  155|  2.30k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  119|  2.30k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.30k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  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.30k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&ptrlist, 0);
  ------------------
  |  |  119|  2.30k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.30k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  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.30k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&ptrhead, no_of_nodes);
  ------------------
  |  |  119|  2.30k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.30k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  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.30k|    geodist = IGRAPH_CALLOC(no_of_nodes, igraph_int_t);
  ------------------
  |  |   33|  2.30k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.60k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.30k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.30k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.30k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  171|  2.30k|    IGRAPH_CHECK_OOM(geodist, "Insufficient memory for calculating shortest paths.");
  ------------------
  |  |  709|  2.30k|    do { \
  |  |  710|  2.30k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  172|  2.30k|    IGRAPH_FINALLY(igraph_free, geodist);
  ------------------
  |  |  603|  2.30k|    do { \
  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  ------------------
  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  173|       |    /* dequeue to store the BFS queue -- odd elements are the vertex indices,
  174|       |     * even elements are the distances from the root */
  175|  2.30k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  2.30k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.30k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  176|       |
  177|  2.30k|    if (nrgeo) {
  ------------------
  |  Branch (177:9): [True: 2.30k, False: 0]
  ------------------
  178|  2.30k|        IGRAPH_CHECK(igraph_vector_int_resize(nrgeo, no_of_nodes));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  179|  2.30k|        igraph_vector_int_null(nrgeo);
  180|  2.30k|    }
  181|       |
  182|       |    /* use geodist to count how many vertices we have to reach */
  183|  2.30k|    to_reach = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|  2.30k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  184|   392k|    for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  201|  2.30k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  179|   392k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  167|   390k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (184:33): [True: 390k, False: 2.30k]
  ------------------
  185|   390k|        if (geodist[ IGRAPH_VIT_GET(vit) ] == 0) {
  ------------------
  |  |  214|   390k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 390k, False: 0]
  |  |  ------------------
  |  |  215|   390k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (185:13): [True: 390k, False: 0]
  ------------------
  186|   390k|            geodist[ IGRAPH_VIT_GET(vit) ] = -1;
  ------------------
  |  |  214|   390k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 390k, False: 0]
  |  |  ------------------
  |  |  215|   390k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  187|   390k|        } else {
  188|      0|            to_reach--;       /* this node was given multiple times */
  189|      0|        }
  190|   390k|    }
  191|       |
  192|  2.30k|    if (geodist[ from ] < 0) {
  ------------------
  |  Branch (192:9): [True: 2.30k, False: 0]
  ------------------
  193|  2.30k|        reached++;
  194|  2.30k|    }
  195|       |
  196|       |    /* from -> from */
  197|  2.30k|    IGRAPH_CHECK(igraph_vector_int_list_push_back_new(&paths, &vptr));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  198|  2.30k|    IGRAPH_CHECK(igraph_vector_int_push_back(vptr, from));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  199|  2.30k|    IGRAPH_CHECK(igraph_vector_int_list_push_back_new(&path_edge, &vptr_e));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  200|       |
  201|  2.30k|    geodist[from] = 1;
  202|  2.30k|    VECTOR(ptrhead)[from] = 1;
  ------------------
  |  |   60|  2.30k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  203|  2.30k|    IGRAPH_CHECK(igraph_vector_int_push_back(&ptrlist, 0));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  204|  2.30k|    if (nrgeo) {
  ------------------
  |  Branch (204:9): [True: 2.30k, False: 0]
  ------------------
  205|  2.30k|        VECTOR(*nrgeo)[from] = 1;
  ------------------
  |  |   60|  2.30k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  206|  2.30k|    }
  207|       |
  208|       |    /* Init queue */
  209|  2.30k|    IGRAPH_CHECK(igraph_dqueue_int_push(&q, from));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  210|  2.30k|    IGRAPH_CHECK(igraph_dqueue_int_push(&q, 0));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  211|  39.9k|    while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (211:12): [True: 37.8k, False: 2.08k]
  ------------------
  212|  37.8k|        igraph_int_t actnode = igraph_dqueue_int_pop(&q);
  213|  37.8k|        igraph_int_t actdist = igraph_dqueue_int_pop(&q);
  214|       |
  215|  37.8k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  37.8k|    do { \
  |  |   47|  37.8k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 37.8k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  37.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 37.8k]
  |  |  ------------------
  ------------------
  216|       |
  217|  37.8k|        if (reached >= to_reach) {
  ------------------
  |  Branch (217:13): [True: 461, False: 37.3k]
  ------------------
  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|    461|            if (actdist > maxdist) {
  ------------------
  |  Branch (222:17): [True: 212, False: 249]
  ------------------
  223|       |                /* safety check, maxdist should have been set when we reached the last node */
  224|    212|                IGRAPH_ASSERT(maxdist >= 0);
  ------------------
  |  |  924|    212|    do { \
  |  |  925|    212|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    212|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 212]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    212|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 212]
  |  |  ------------------
  ------------------
  225|    212|                break;
  226|    212|            }
  227|    461|        }
  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|  37.6k|        if (edges) {
  ------------------
  |  Branch (233:13): [True: 37.6k, False: 0]
  ------------------
  234|  37.6k|            IGRAPH_CHECK(igraph_incident(graph, &neis, actnode, mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  37.6k|    do { \
  |  |  657|  37.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  37.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  37.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 37.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|  37.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 37.6k]
  |  |  ------------------
  ------------------
  235|  37.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|  37.6k|        n = igraph_vector_int_size(&neis);
  240|   121k|        for (igraph_int_t j = 0; j < n; j++) {
  ------------------
  |  Branch (240:34): [True: 83.5k, False: 37.6k]
  ------------------
  241|  83.5k|            igraph_int_t neighbor;
  242|  83.5k|            igraph_int_t parentptr;
  243|       |
  244|  83.5k|            if (edges) {
  ------------------
  |  Branch (244:17): [True: 83.5k, 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|  83.5k|                neighbor = IGRAPH_OTHER(graph, VECTOR(neis)[j], actnode);
  ------------------
  |  |  146|  83.5k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  83.5k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  83.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  41.7k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  41.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  41.7k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  41.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 41.7k, False: 41.7k]
  |  |  ------------------
  ------------------
  248|  83.5k|            } 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|  83.5k|            if (geodist[neighbor] > 0 &&
  ------------------
  |  Branch (253:17): [True: 47.9k, False: 35.6k]
  ------------------
  254|  47.9k|                geodist[neighbor] - 1 < actdist + 1) {
  ------------------
  |  Branch (254:17): [True: 43.5k, False: 4.37k]
  ------------------
  255|       |                /* this node was reached via a shorter path before */
  256|  43.5k|                continue;
  257|  43.5k|            }
  258|       |
  259|       |            /* yay, found another shortest path to neighbor */
  260|       |
  261|  40.0k|            if (nrgeo) {
  ------------------
  |  Branch (261:17): [True: 40.0k, False: 0]
  ------------------
  262|       |                /* the number of geodesics leading to neighbor must be
  263|       |                 * increased by the number of geodesics leading to actnode */
  264|  40.0k|                VECTOR(*nrgeo)[neighbor] += VECTOR(*nrgeo)[actnode];
  ------------------
  |  |   60|  40.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*nrgeo)[neighbor] += VECTOR(*nrgeo)[actnode];
  ------------------
  |  |   60|  40.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  265|  40.0k|            }
  266|  40.0k|            if (geodist[neighbor] <= 0) {
  ------------------
  |  Branch (266:17): [True: 35.6k, False: 4.37k]
  ------------------
  267|       |                /* this node was not reached yet, push it into the queue */
  268|  35.6k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  35.6k|    do { \
  |  |  657|  35.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  35.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  35.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 35.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|  35.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 35.6k]
  |  |  ------------------
  ------------------
  269|  35.6k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, actdist + 1));
  ------------------
  |  |  656|  35.6k|    do { \
  |  |  657|  35.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  35.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  35.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 35.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|  35.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 35.6k]
  |  |  ------------------
  ------------------
  270|  35.6k|                if (geodist[neighbor] < 0) {
  ------------------
  |  Branch (270:21): [True: 35.6k, False: 0]
  ------------------
  271|  35.6k|                    reached++;
  272|  35.6k|                }
  273|  35.6k|                if (reached == to_reach) {
  ------------------
  |  Branch (273:21): [True: 212, False: 35.4k]
  ------------------
  274|    212|                    maxdist = actdist;
  275|    212|                }
  276|  35.6k|            }
  277|  40.0k|            geodist[neighbor] = actdist + 2;
  278|       |
  279|       |            /* copy all existing paths to the parent */
  280|  40.0k|            parentptr = VECTOR(ptrhead)[actnode];
  ------------------
  |  |   60|  40.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  281|  1.25M|            while (parentptr != 0) {
  ------------------
  |  Branch (281:20): [True: 1.21M, False: 40.0k]
  ------------------
  282|       |                /* allocate a new igraph_vector_int_t at the end of paths */
  283|  1.21M|                IGRAPH_CHECK(igraph_vector_int_list_push_back_new(&paths, &vptr));
  ------------------
  |  |  656|  1.21M|    do { \
  |  |  657|  1.21M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.21M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.21M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.21M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.21M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.21M]
  |  |  ------------------
  ------------------
  284|  1.21M|                IGRAPH_CHECK(igraph_vector_int_update(vptr, igraph_vector_int_list_get_ptr(&paths, parentptr - 1)));
  ------------------
  |  |  656|  1.21M|    do { \
  |  |  657|  1.21M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.21M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.21M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.21M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.21M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.21M]
  |  |  ------------------
  ------------------
  285|  1.21M|                IGRAPH_CHECK(igraph_vector_int_push_back(vptr, neighbor));
  ------------------
  |  |  656|  1.21M|    do { \
  |  |  657|  1.21M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.21M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.21M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.21M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.21M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.21M]
  |  |  ------------------
  ------------------
  286|       |
  287|  1.21M|                IGRAPH_CHECK(igraph_vector_int_list_push_back_new(&path_edge, &vptr_e));
  ------------------
  |  |  656|  1.21M|    do { \
  |  |  657|  1.21M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.21M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.21M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.21M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.21M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.21M]
  |  |  ------------------
  ------------------
  288|  1.21M|                if (actnode != from) {
  ------------------
  |  Branch (288:21): [True: 1.21M, False: 5.67k]
  ------------------
  289|       |                    /* If the previous vertex was the source then there is no edge to add*/
  290|  1.21M|                    IGRAPH_CHECK(igraph_vector_int_update(vptr_e, igraph_vector_int_list_get_ptr(&path_edge, parentptr - 1)));
  ------------------
  |  |  656|  1.21M|    do { \
  |  |  657|  1.21M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.21M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.21M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.21M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.21M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.21M]
  |  |  ------------------
  ------------------
  291|  1.21M|                }
  292|  1.21M|                IGRAPH_CHECK(igraph_vector_int_push_back(vptr_e, VECTOR(neis)[j]));
  ------------------
  |  |  656|  1.21M|    do { \
  |  |  657|  1.21M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.21M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.21M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.21M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.21M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.21M]
  |  |  ------------------
  ------------------
  293|       |
  294|  1.21M|                IGRAPH_CHECK(igraph_vector_int_push_back(&ptrlist, VECTOR(ptrhead)[neighbor]));
  ------------------
  |  |  656|  1.21M|    do { \
  |  |  657|  1.21M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.21M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.21M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.21M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.21M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.21M]
  |  |  ------------------
  ------------------
  295|  1.21M|                VECTOR(ptrhead)[neighbor] = igraph_vector_int_size(&ptrlist);
  ------------------
  |  |   60|  1.21M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  296|       |
  297|  1.21M|                parentptr = VECTOR(ptrlist)[parentptr - 1];
  ------------------
  |  |   60|  1.21M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  298|  1.21M|            }
  299|  40.0k|        }
  300|  37.6k|    }
  301|       |
  302|  2.30k|    igraph_dqueue_int_destroy(&q);
  303|  2.30k|    IGRAPH_FINALLY_CLEAN(1);
  304|       |
  305|       |    /* mark the nodes for which we need the result */
  306|  2.30k|    memset(geodist, 0, sizeof(geodist[0]) * (size_t) no_of_nodes);
  307|   392k|    for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  201|  2.30k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  179|   392k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  167|   390k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (307:33): [True: 390k, False: 2.30k]
  ------------------
  308|   390k|        geodist[ IGRAPH_VIT_GET(vit) ] = 1;
  ------------------
  |  |  214|   390k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 390k, False: 0]
  |  |  ------------------
  |  |  215|   390k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  309|   390k|    }
  310|       |
  311|  2.30k|    if (vertices) {
  ------------------
  |  Branch (311:9): [True: 2.30k, False: 0]
  ------------------
  312|  2.30k|        igraph_vector_int_list_clear(vertices);
  313|  2.30k|    }
  314|  2.30k|    if (edges) {
  ------------------
  |  Branch (314:9): [True: 2.30k, False: 0]
  ------------------
  315|  2.30k|        igraph_vector_int_list_clear(edges);
  316|  2.30k|    }
  317|       |
  318|   392k|    for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (318:30): [True: 390k, False: 2.30k]
  ------------------
  319|   390k|        igraph_int_t parentptr = VECTOR(ptrhead)[i];
  ------------------
  |  |   60|   390k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  320|       |
  321|   390k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   390k|    do { \
  |  |   47|   390k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 390k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   390k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 390k]
  |  |  ------------------
  ------------------
  322|       |
  323|       |        /* do we need the paths leading to vertex i? */
  324|   390k|        if (geodist[i] > 0) {
  ------------------
  |  Branch (324:13): [True: 390k, False: 0]
  ------------------
  325|       |            /* yes, transfer them to the result vector */
  326|  1.60M|            while (parentptr != 0) {
  ------------------
  |  Branch (326:20): [True: 1.21M, False: 390k]
  ------------------
  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.21M|                if (vertices) {
  ------------------
  |  Branch (331:21): [True: 1.21M, False: 0]
  ------------------
  332|  1.21M|                    igraph_vector_int_t *p;
  333|  1.21M|                    IGRAPH_CHECK(igraph_vector_int_list_push_back_new(vertices, &p));
  ------------------
  |  |  656|  1.21M|    do { \
  |  |  657|  1.21M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.21M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.21M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.21M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.21M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.21M]
  |  |  ------------------
  ------------------
  334|  1.21M|                    igraph_vector_int_swap(p, igraph_vector_int_list_get_ptr(&paths, parentptr - 1));
  335|  1.21M|                }
  336|  1.21M|                if (edges) {
  ------------------
  |  Branch (336:21): [True: 1.21M, False: 0]
  ------------------
  337|  1.21M|                    igraph_vector_int_t *p;
  338|  1.21M|                    IGRAPH_CHECK(igraph_vector_int_list_push_back_new(edges, &p));
  ------------------
  |  |  656|  1.21M|    do { \
  |  |  657|  1.21M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.21M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.21M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.21M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.21M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.21M]
  |  |  ------------------
  ------------------
  339|  1.21M|                    igraph_vector_int_swap(p, igraph_vector_int_list_get_ptr(&path_edge, parentptr - 1));
  340|  1.21M|                }
  341|  1.21M|                parentptr = VECTOR(ptrlist)[parentptr - 1];
  ------------------
  |  |   60|  1.21M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  342|  1.21M|            }
  343|   390k|        }
  344|   390k|    }
  345|       |
  346|  2.30k|    IGRAPH_FREE(geodist);
  ------------------
  |  |   36|  2.30k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  347|  2.30k|    igraph_vector_int_destroy(&ptrlist);
  348|  2.30k|    igraph_vector_int_destroy(&ptrhead);
  349|  2.30k|    igraph_vector_int_destroy(&neis);
  350|  2.30k|    igraph_vector_int_list_destroy(&paths);
  351|  2.30k|    igraph_vector_int_list_destroy(&path_edge);
  352|  2.30k|    igraph_vit_destroy(&vit);
  353|  2.30k|    IGRAPH_FINALLY_CLEAN(7);
  354|       |
  355|  2.30k|    return IGRAPH_SUCCESS;
  356|  2.30k|}

igraph_i_validate_distance_weights:
   37|  4.60k|        igraph_bool_t *negative_weights) {
   38|       |
   39|  4.60k|    const igraph_int_t ecount = igraph_ecount(graph);
   40|       |
   41|  4.60k|    *negative_weights = false;
   42|       |
   43|  4.60k|    if (weights) {
  ------------------
  |  Branch (43:9): [True: 0, False: 4.60k]
  ------------------
   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.60k|    return IGRAPH_SUCCESS;
   62|  4.60k|}

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

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

igraph_i_distances_unweighted_cutoff:
  107|  2.30k|        igraph_real_t cutoff) {
  108|       |
  109|  2.30k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  110|  2.30k|    igraph_int_t no_of_from, no_of_to;
  111|  2.30k|    igraph_int_t *already_counted;
  112|  2.30k|    igraph_adjlist_t adjlist;
  113|  2.30k|    igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   56|  2.30k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
  114|  2.30k|    igraph_vector_int_t *neis;
  115|  2.30k|    igraph_bool_t all_to;
  116|       |
  117|  2.30k|    igraph_int_t i, j;
  118|  2.30k|    igraph_vit_t fromvit, tovit;
  119|  2.30k|    igraph_vector_int_t indexv;
  120|       |
  121|  2.30k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (121:9): [True: 0, False: 2.30k]
  |  Branch (121:31): [True: 0, False: 0]
  ------------------
  122|      0|        mode != IGRAPH_ALL) {
  ------------------
  |  Branch (122:9): [True: 0, False: 0]
  ------------------
  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.30k|    IGRAPH_CHECK(igraph_vit_create(graph, from, &fromvit));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  127|  2.30k|    IGRAPH_FINALLY(igraph_vit_destroy, &fromvit);
  ------------------
  |  |  603|  2.30k|    do { \
  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  ------------------
  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  128|  2.30k|    no_of_from = IGRAPH_VIT_SIZE(fromvit);
  ------------------
  |  |  190|  2.30k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  129|       |
  130|  2.30k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, mode, IGRAPH_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  131|  2.30k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  2.30k|    do { \
  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  ------------------
  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  132|       |
  133|  2.30k|    already_counted = IGRAPH_CALLOC(no_of_nodes, igraph_int_t);
  ------------------
  |  |   33|  2.30k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.60k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.30k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.30k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.30k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  134|  2.30k|    IGRAPH_CHECK_OOM(already_counted, "Insufficient memory for graph distance calculation.");
  ------------------
  |  |  709|  2.30k|    do { \
  |  |  710|  2.30k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  135|  2.30k|    IGRAPH_FINALLY(igraph_free, already_counted);
  ------------------
  |  |  603|  2.30k|    do { \
  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  ------------------
  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  136|       |
  137|  2.30k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  2.30k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.30k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  138|       |
  139|  2.30k|    all_to = igraph_vs_is_all(&to);
  140|  2.30k|    if (all_to) {
  ------------------
  |  Branch (140:9): [True: 2.30k, False: 0]
  ------------------
  141|  2.30k|        no_of_to = no_of_nodes;
  142|  2.30k|    } 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.30k|    IGRAPH_CHECK(igraph_matrix_resize(res, no_of_from, no_of_to));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  158|  2.30k|    igraph_matrix_fill(res, IGRAPH_INFINITY);
  ------------------
  |  |  137|  2.30k|#define IGRAPH_INFINITY ((double)INFINITY)
  ------------------
  159|       |
  160|  2.30k|    for (IGRAPH_VIT_RESET(fromvit), i = 0;
  ------------------
  |  |  201|  2.30k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
  161|  4.60k|         !IGRAPH_VIT_END(fromvit);
  ------------------
  |  |  179|  4.60k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (161:10): [True: 2.30k, False: 2.30k]
  ------------------
  162|  2.30k|         IGRAPH_VIT_NEXT(fromvit), i++) {
  ------------------
  |  |  167|  2.30k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  163|  2.30k|        igraph_int_t reached = 0;
  164|  2.30k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, IGRAPH_VIT_GET(fromvit)));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  4.60k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 2.30k, False: 0]
  |  |  ------------------
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  165|  2.30k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, 0));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  166|  2.30k|        already_counted[ IGRAPH_VIT_GET(fromvit) ] = i + 1;
  ------------------
  |  |  214|  2.30k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 2.30k, False: 0]
  |  |  ------------------
  |  |  215|  2.30k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  167|       |
  168|  2.30k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  2.30k|    do { \
  |  |   47|  2.30k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 2.30k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  169|       |
  170|  25.8k|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (170:16): [True: 23.5k, False: 2.30k]
  ------------------
  171|  23.5k|            igraph_int_t act = igraph_dqueue_int_pop(&q);
  172|  23.5k|            igraph_int_t actdist = igraph_dqueue_int_pop(&q);
  173|       |
  174|  23.5k|            if (cutoff >= 0 && actdist > cutoff) {
  ------------------
  |  Branch (174:17): [True: 0, False: 23.5k]
  |  Branch (174:32): [True: 0, False: 0]
  ------------------
  175|      0|                continue;
  176|      0|            }
  177|       |
  178|  23.5k|            if (all_to) {
  ------------------
  |  Branch (178:17): [True: 23.5k, False: 0]
  ------------------
  179|  23.5k|                MATRIX(*res, i, act) = actdist;
  ------------------
  |  |   83|  23.5k|#define MATRIX(m,i,j) ((m).data.stor_begin[(m).nrow*(j)+(i)])
  ------------------
  180|  23.5k|            } 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|  23.5k|            neis = igraph_adjlist_get(&adjlist, act);
  ------------------
  |  |   73|  23.5k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  192|  23.5k|            igraph_int_t nei_count = igraph_vector_int_size(neis);
  193|  70.2k|            for (j = 0; j < nei_count; j++) {
  ------------------
  |  Branch (193:25): [True: 46.7k, False: 23.5k]
  ------------------
  194|  46.7k|                igraph_int_t neighbor = VECTOR(*neis)[j];
  ------------------
  |  |   60|  46.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  195|  46.7k|                if (already_counted[neighbor] == i + 1) {
  ------------------
  |  Branch (195:21): [True: 25.5k, False: 21.2k]
  ------------------
  196|  25.5k|                    continue;
  197|  25.5k|                }
  198|  21.2k|                already_counted[neighbor] = i + 1;
  199|  21.2k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  21.2k|    do { \
  |  |  657|  21.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  21.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  21.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 21.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|  21.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  200|  21.2k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, actdist + 1));
  ------------------
  |  |  656|  21.2k|    do { \
  |  |  657|  21.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  21.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  21.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 21.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|  21.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  201|  21.2k|            }
  202|  23.5k|        }
  203|  2.30k|    }
  204|       |
  205|       |    /* Clean */
  206|  2.30k|    if (!all_to) {
  ------------------
  |  Branch (206:9): [True: 0, False: 2.30k]
  ------------------
  207|      0|        igraph_vit_destroy(&tovit);
  208|      0|        igraph_vector_int_destroy(&indexv);
  209|      0|        IGRAPH_FINALLY_CLEAN(2);
  210|      0|    }
  211|       |
  212|  2.30k|    IGRAPH_FREE(already_counted);
  ------------------
  |  |   36|  2.30k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  213|  2.30k|    igraph_dqueue_int_destroy(&q);
  214|  2.30k|    igraph_vit_destroy(&fromvit);
  215|  2.30k|    igraph_adjlist_destroy(&adjlist);
  216|  2.30k|    IGRAPH_FINALLY_CLEAN(4);
  217|       |
  218|  2.30k|    return IGRAPH_SUCCESS;
  219|  2.30k|}
igraph_distances:
  278|  2.30k|        igraph_neimode_t mode) {
  279|       |
  280|  2.30k|    igraph_real_t vcount_real = igraph_vcount(graph);
  281|  2.30k|    igraph_real_t ecount_real = igraph_ecount(graph);
  282|  2.30k|    igraph_real_t ecount_threshold;
  283|  2.30k|    igraph_int_t from_size;
  284|  2.30k|    igraph_bool_t negative_weights = false;
  285|       |
  286|  2.30k|    IGRAPH_CHECK(igraph_i_validate_distance_weights(graph, weights, &negative_weights));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  287|       |
  288|  2.30k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (288:9): [True: 0, False: 2.30k]
  ------------------
  289|      0|        mode = IGRAPH_ALL;
  290|      0|    }
  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.30k|    ecount_threshold = vcount_real * vcount_real * 0.1;
  297|  2.30k|    if (ecount_threshold < 250) ecount_threshold = 250;
  ------------------
  |  Branch (297:9): [True: 509, False: 1.79k]
  ------------------
  298|       |
  299|  2.30k|    if (!weights) {
  ------------------
  |  Branch (299:9): [True: 2.30k, False: 0]
  ------------------
  300|       |        /* Unweighted case */
  301|  2.30k|        return igraph_i_distances_unweighted_cutoff(graph, res, from, to, mode, -1);
  302|  2.30k|    } 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.30k|}
igraph_get_shortest_paths:
  412|  2.30k|        igraph_vector_int_t *inbound_edges) {
  413|       |
  414|  2.30k|    igraph_bool_t negative_weights;
  415|  2.30k|    IGRAPH_CHECK(igraph_i_validate_distance_weights(graph, weights, &negative_weights));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  416|       |
  417|  2.30k|    if (weights == NULL) {
  ------------------
  |  Branch (417:9): [True: 2.30k, False: 0]
  ------------------
  418|  2.30k|        return igraph_i_get_shortest_paths_unweighted(graph, vertices, edges, from, to, mode, parents, inbound_edges);
  419|  2.30k|    } 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.30k|}
igraph_i_get_shortest_paths_unweighted:
  435|  2.30k|        igraph_vector_int_t *inbound_edges) {
  436|       |
  437|       |    /* TODO: use inclist_t if to is long (longer than 1?) */
  438|       |
  439|  2.30k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  440|  2.30k|    igraph_int_t *parent_eids;
  441|       |
  442|  2.30k|    igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   56|  2.30k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
  443|       |
  444|  2.30k|    igraph_int_t i, j, vsize;
  445|  2.30k|    igraph_vector_int_t tmp = IGRAPH_VECTOR_NULL;
  ------------------
  |  |   99|  2.30k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
  446|       |
  447|  2.30k|    igraph_vit_t vit;
  448|       |
  449|  2.30k|    igraph_int_t to_reach;
  450|  2.30k|    igraph_int_t reached = 0;
  451|       |
  452|  2.30k|    if (from < 0 || from >= no_of_nodes) {
  ------------------
  |  Branch (452:9): [True: 0, False: 2.30k]
  |  Branch (452:21): [True: 0, False: 2.30k]
  ------------------
  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.30k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (455:9): [True: 0, False: 2.30k]
  |  Branch (455:31): [True: 0, False: 0]
  ------------------
  456|      0|        mode != IGRAPH_ALL) {
  ------------------
  |  Branch (456:9): [True: 0, False: 0]
  ------------------
  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.30k|    IGRAPH_CHECK(igraph_vit_create(graph, to, &vit));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  461|  2.30k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  2.30k|    do { \
  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  ------------------
  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  462|       |
  463|  2.30k|    if (vertices) {
  ------------------
  |  Branch (463:9): [True: 2.30k, False: 0]
  ------------------
  464|  2.30k|        IGRAPH_CHECK(igraph_vector_int_list_resize(vertices, IGRAPH_VIT_SIZE(vit)));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  465|  2.30k|    }
  466|  2.30k|    if (edges) {
  ------------------
  |  Branch (466:9): [True: 2.30k, False: 0]
  ------------------
  467|  2.30k|        IGRAPH_CHECK(igraph_vector_int_list_resize(edges, IGRAPH_VIT_SIZE(vit)));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  468|  2.30k|    }
  469|       |
  470|  2.30k|    parent_eids = IGRAPH_CALLOC(no_of_nodes, igraph_int_t);
  ------------------
  |  |   33|  2.30k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.60k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.30k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.30k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.30k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  471|  2.30k|    IGRAPH_CHECK_OOM(parent_eids, "Insufficient memory for shortest path calculation.");
  ------------------
  |  |  709|  2.30k|    do { \
  |  |  710|  2.30k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  472|  2.30k|    IGRAPH_FINALLY(igraph_free, parent_eids);
  ------------------
  |  |  603|  2.30k|    do { \
  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  ------------------
  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  473|       |
  474|  2.30k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&tmp, 0);
  ------------------
  |  |  119|  2.30k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.30k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  475|  2.30k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  2.30k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.30k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  476|       |
  477|       |    /* Mark the vertices we need to reach */
  478|  2.30k|    to_reach = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|  2.30k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  479|   392k|    for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  201|  2.30k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  179|   392k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  167|   390k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (479:33): [True: 390k, False: 2.30k]
  ------------------
  480|   390k|        if (parent_eids[ IGRAPH_VIT_GET(vit) ] == 0) {
  ------------------
  |  |  214|   390k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 390k, False: 0]
  |  |  ------------------
  |  |  215|   390k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (480:13): [True: 390k, False: 0]
  ------------------
  481|   390k|            parent_eids[ IGRAPH_VIT_GET(vit) ] = -1;
  ------------------
  |  |  214|   390k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 390k, False: 0]
  |  |  ------------------
  |  |  215|   390k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  482|   390k|        } else {
  483|      0|            to_reach--;       /* this node was given multiple times */
  484|      0|        }
  485|   390k|    }
  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.30k|    IGRAPH_CHECK(igraph_dqueue_int_push(&q, from + 1));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  502|  2.30k|    if (parent_eids[ from ] < 0) {
  ------------------
  |  Branch (502:9): [True: 2.30k, False: 0]
  ------------------
  503|  2.30k|        reached++;
  504|  2.30k|    }
  505|  2.30k|    parent_eids[ from ] = 1;
  506|       |
  507|  25.6k|    while (!igraph_dqueue_int_empty(&q) && reached < to_reach) {
  ------------------
  |  Branch (507:12): [True: 23.5k, False: 2.12k]
  |  Branch (507:44): [True: 23.3k, False: 172]
  ------------------
  508|  23.3k|        igraph_int_t act = igraph_dqueue_int_pop(&q) - 1;
  509|       |
  510|  23.3k|        IGRAPH_CHECK(igraph_incident(graph, &tmp, act, mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  23.3k|    do { \
  |  |  657|  23.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  23.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  23.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.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|  23.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 23.3k]
  |  |  ------------------
  ------------------
  511|  23.3k|        vsize = igraph_vector_int_size(&tmp);
  512|  67.4k|        for (j = 0; j < vsize; j++) {
  ------------------
  |  Branch (512:21): [True: 44.1k, False: 23.3k]
  ------------------
  513|  44.1k|            igraph_int_t edge = VECTOR(tmp)[j];
  ------------------
  |  |   60|  44.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  514|  44.1k|            igraph_int_t neighbor = IGRAPH_OTHER(graph, edge, act);
  ------------------
  |  |  146|  44.1k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  44.1k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  44.1k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  10.0k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  10.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  34.0k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  34.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 10.0k, False: 34.0k]
  |  |  ------------------
  ------------------
  515|  44.1k|            if (parent_eids[neighbor] > 0) {
  ------------------
  |  Branch (515:17): [True: 22.8k, False: 21.2k]
  ------------------
  516|  22.8k|                continue;
  517|  22.8k|            } else if (parent_eids[neighbor] < 0) {
  ------------------
  |  Branch (517:24): [True: 21.2k, False: 0]
  ------------------
  518|  21.2k|                reached++;
  519|  21.2k|            }
  520|  21.2k|            parent_eids[neighbor] = edge + 2;
  521|  21.2k|            IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor + 1));
  ------------------
  |  |  656|  21.2k|    do { \
  |  |  657|  21.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  21.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  21.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 21.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|  21.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  522|  21.2k|        }
  523|  23.3k|    }
  524|       |
  525|  2.30k|    if (reached < to_reach) {
  ------------------
  |  Branch (525:9): [True: 2.12k, False: 172]
  ------------------
  526|  2.12k|        IGRAPH_WARNING("Couldn't reach some vertices");
  ------------------
  |  |  797|  2.12k|    do { \
  |  |  798|  2.12k|        igraph_warning(reason, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  799|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (799:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  527|  2.12k|    }
  528|       |
  529|       |    /* Create `parents' if needed */
  530|  2.30k|    if (parents) {
  ------------------
  |  Branch (530:9): [True: 2.30k, False: 0]
  ------------------
  531|  2.30k|        IGRAPH_CHECK(igraph_vector_int_resize(parents, no_of_nodes));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  532|       |
  533|   392k|        for (i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (533:21): [True: 390k, False: 2.30k]
  ------------------
  534|   390k|            if (parent_eids[i] <= 0) {
  ------------------
  |  Branch (534:17): [True: 366k, False: 23.5k]
  ------------------
  535|       |                /* i was not reached */
  536|   366k|                VECTOR(*parents)[i] = -2;
  ------------------
  |  |   60|   366k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  537|   366k|            } else if (parent_eids[i] == 1) {
  ------------------
  |  Branch (537:24): [True: 2.30k, False: 21.2k]
  ------------------
  538|       |                /* i is the start vertex */
  539|  2.30k|                VECTOR(*parents)[i] = -1;
  ------------------
  |  |   60|  2.30k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  540|  21.2k|            } else {
  541|       |                /* i was reached via the edge with ID = parent_eids[i] - 2 */
  542|  21.2k|                VECTOR(*parents)[i] = IGRAPH_OTHER(graph, parent_eids[i] - 2, i);
  ------------------
  |  |   60|  21.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*parents)[i] = IGRAPH_OTHER(graph, parent_eids[i] - 2, i);
  ------------------
  |  |  146|  21.2k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  21.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  21.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  21.2k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  21.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 21.2k, False: 0]
  |  |  ------------------
  ------------------
  543|  21.2k|            }
  544|   390k|        }
  545|  2.30k|    }
  546|       |
  547|       |    /* Create `inbound_edges' if needed */
  548|  2.30k|    if (inbound_edges) {
  ------------------
  |  Branch (548:9): [True: 2.30k, False: 0]
  ------------------
  549|  2.30k|        IGRAPH_CHECK(igraph_vector_int_resize(inbound_edges, no_of_nodes));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  550|       |
  551|   392k|        for (i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (551:21): [True: 390k, False: 2.30k]
  ------------------
  552|   390k|            if (parent_eids[i] <= 1) {
  ------------------
  |  Branch (552:17): [True: 369k, False: 21.2k]
  ------------------
  553|       |                /* i was not reached or i is the start vertex */
  554|   369k|                VECTOR(*inbound_edges)[i] = -1;
  ------------------
  |  |   60|   369k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  555|   369k|            } else {
  556|       |                /* i was reached via the edge with ID = parent_eids[i] - 2 */
  557|  21.2k|                VECTOR(*inbound_edges)[i] = parent_eids[i] - 2;
  ------------------
  |  |   60|  21.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  558|  21.2k|            }
  559|   390k|        }
  560|  2.30k|    }
  561|       |
  562|       |    /* Create `vertices' and `edges' if needed */
  563|  2.30k|    if (vertices || edges) {
  ------------------
  |  Branch (563:9): [True: 2.30k, False: 0]
  |  Branch (563:21): [True: 0, False: 0]
  ------------------
  564|  2.30k|        for (IGRAPH_VIT_RESET(vit), j = 0;
  ------------------
  |  |  201|  2.30k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
  565|   392k|             !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|   392k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (565:14): [True: 390k, False: 2.30k]
  ------------------
  566|   390k|             IGRAPH_VIT_NEXT(vit), j++) {
  ------------------
  |  |  167|   390k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  567|   390k|            igraph_int_t node = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|   390k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 390k, False: 0]
  |  |  ------------------
  |  |  215|   390k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  568|   390k|            igraph_vector_int_t *vvec = 0, *evec = 0;
  569|   390k|            if (vertices) {
  ------------------
  |  Branch (569:17): [True: 390k, False: 0]
  ------------------
  570|   390k|                vvec = igraph_vector_int_list_get_ptr(vertices, j);
  571|   390k|                igraph_vector_int_clear(vvec);
  572|   390k|            }
  573|   390k|            if (edges) {
  ------------------
  |  Branch (573:17): [True: 390k, False: 0]
  ------------------
  574|   390k|                evec = igraph_vector_int_list_get_ptr(edges, j);
  575|   390k|                igraph_vector_int_clear(evec);
  576|   390k|            }
  577|       |
  578|   390k|            IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   390k|    do { \
  |  |   47|   390k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 390k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   390k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 390k]
  |  |  ------------------
  ------------------
  579|       |
  580|   390k|            if (parent_eids[node] > 0) {
  ------------------
  |  Branch (580:17): [True: 23.5k, False: 366k]
  ------------------
  581|  23.5k|                igraph_int_t act = node;
  582|  23.5k|                igraph_int_t size = 0;
  583|  23.5k|                igraph_int_t edge;
  584|   363k|                while (parent_eids[act] > 1) {
  ------------------
  |  Branch (584:24): [True: 340k, False: 23.5k]
  ------------------
  585|   340k|                    size++;
  586|   340k|                    edge = parent_eids[act] - 2;
  587|   340k|                    act = IGRAPH_OTHER(graph, edge, act);
  ------------------
  |  |  146|   340k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   340k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   340k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|   340k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   340k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 340k, False: 0]
  |  |  ------------------
  ------------------
  588|   340k|                }
  589|  23.5k|                if (vvec) {
  ------------------
  |  Branch (589:21): [True: 23.5k, False: 0]
  ------------------
  590|  23.5k|                    IGRAPH_CHECK(igraph_vector_int_resize(vvec, size + 1));
  ------------------
  |  |  656|  23.5k|    do { \
  |  |  657|  23.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  23.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  23.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.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|  23.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 23.5k]
  |  |  ------------------
  ------------------
  591|  23.5k|                    VECTOR(*vvec)[size] = node;
  ------------------
  |  |   60|  23.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  592|  23.5k|                }
  593|  23.5k|                if (evec) {
  ------------------
  |  Branch (593:21): [True: 23.5k, False: 0]
  ------------------
  594|  23.5k|                    IGRAPH_CHECK(igraph_vector_int_resize(evec, size));
  ------------------
  |  |  656|  23.5k|    do { \
  |  |  657|  23.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  23.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  23.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.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|  23.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 23.5k]
  |  |  ------------------
  ------------------
  595|  23.5k|                }
  596|  23.5k|                act = node;
  597|   363k|                while (parent_eids[act] > 1) {
  ------------------
  |  Branch (597:24): [True: 340k, False: 23.5k]
  ------------------
  598|   340k|                    size--;
  599|   340k|                    edge = parent_eids[act] - 2;
  600|   340k|                    act = IGRAPH_OTHER(graph, edge, act);
  ------------------
  |  |  146|   340k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   340k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   340k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|   340k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   340k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 340k, False: 0]
  |  |  ------------------
  ------------------
  601|   340k|                    if (vvec) {
  ------------------
  |  Branch (601:25): [True: 340k, False: 0]
  ------------------
  602|   340k|                        VECTOR(*vvec)[size] = act;
  ------------------
  |  |   60|   340k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  603|   340k|                    }
  604|   340k|                    if (evec) {
  ------------------
  |  Branch (604:25): [True: 340k, False: 0]
  ------------------
  605|   340k|                        VECTOR(*evec)[size] = edge;
  ------------------
  |  |   60|   340k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  606|   340k|                    }
  607|   340k|                }
  608|  23.5k|            }
  609|   390k|        }
  610|  2.30k|    }
  611|       |
  612|       |    /* Clean */
  613|  2.30k|    IGRAPH_FREE(parent_eids);
  ------------------
  |  |   36|  2.30k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  614|  2.30k|    igraph_dqueue_int_destroy(&q);
  615|  2.30k|    igraph_vector_int_destroy(&tmp);
  616|  2.30k|    igraph_vit_destroy(&vit);
  617|  2.30k|    IGRAPH_FINALLY_CLEAN(4);
  618|       |
  619|  2.30k|    return IGRAPH_SUCCESS;
  620|  2.30k|}

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

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

igraph_maxdegree:
   59|  2.30k|) {
   60|       |
   61|  2.30k|    igraph_vector_int_t tmp;
   62|       |
   63|  2.30k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&tmp, 0);
  ------------------
  |  |  119|  2.30k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.30k|    do { \
  |  |  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.30k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.30k|    do { \
  |  |  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.30k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
   64|       |
   65|  2.30k|    IGRAPH_CHECK(igraph_degree(graph, &tmp, vids, mode, loops));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
   66|  2.30k|    if (igraph_vector_int_size(&tmp) == 0) {
  ------------------
  |  Branch (66:9): [True: 1, False: 2.30k]
  ------------------
   67|      1|        *res = 0;
   68|  2.30k|    } else {
   69|  2.30k|        *res = igraph_vector_int_max(&tmp);
   70|  2.30k|    }
   71|       |
   72|  2.30k|    igraph_vector_int_destroy(&tmp);
   73|  2.30k|    IGRAPH_FINALLY_CLEAN(1);
   74|       |
   75|  2.30k|    return IGRAPH_SUCCESS;
   76|  2.30k|}
igraph_strength:
  619|  4.60k|) {
  620|       |
  621|  4.60k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  622|  4.60k|    igraph_vit_t vit;
  623|  4.60k|    igraph_int_t no_vids;
  624|  4.60k|    igraph_vector_int_t degrees;
  625|  4.60k|    igraph_vector_int_t neis;
  626|       |
  627|  4.60k|    if (! weights) {
  ------------------
  |  Branch (627:9): [True: 4.60k, False: 0]
  ------------------
  628|  4.60k|        IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  119|  4.60k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  4.60k|    do { \
  |  |  |  |  657|  4.60k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.60k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.60k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.60k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.60k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.60k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  4.60k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.60k|    do { \
  |  |  |  |  604|  4.60k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.60k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.60k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.60k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.60k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.60k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.60k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.60k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 4.60k]
  |  |  ------------------
  ------------------
  629|  4.60k|        IGRAPH_CHECK(igraph_vector_resize(res, no_of_nodes));
  ------------------
  |  |  656|  4.60k|    do { \
  |  |  657|  4.60k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.60k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.60k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.60k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.60k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.60k]
  |  |  ------------------
  ------------------
  630|  4.60k|        IGRAPH_CHECK(igraph_degree(graph, &degrees, vids, mode, loops));
  ------------------
  |  |  656|  4.60k|    do { \
  |  |  657|  4.60k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.60k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.60k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.60k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.60k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.60k]
  |  |  ------------------
  ------------------
  631|   785k|        for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (631:34): [True: 780k, False: 4.60k]
  ------------------
  632|   780k|            VECTOR(*res)[i] = VECTOR(degrees)[i];
  ------------------
  |  |   60|   780k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[i] = VECTOR(degrees)[i];
  ------------------
  |  |   60|   780k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  633|   780k|        }
  634|  4.60k|        igraph_vector_int_destroy(&degrees);
  635|  4.60k|        IGRAPH_FINALLY_CLEAN(1);
  636|  4.60k|        return IGRAPH_SUCCESS;
  637|  4.60k|    }
  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_has_loop:
   48|  2.30k|igraph_error_t igraph_has_loop(const igraph_t *graph, igraph_bool_t *res) {
   49|  2.30k|    igraph_int_t i, m = igraph_ecount(graph);
   50|       |
   51|  2.30k|    IGRAPH_RETURN_IF_CACHED_BOOL(graph, IGRAPH_PROP_HAS_LOOP, res);
  ------------------
  |  |   97|  2.30k|    do { \
  |  |   98|  2.30k|        if (igraph_i_property_cache_has((graphptr), (prop))) { \
  |  |  ------------------
  |  |  |  Branch (98:13): [True: 2.30k, False: 1]
  |  |  ------------------
  |  |   99|  2.30k|            *(resptr) = igraph_i_property_cache_get_bool((graphptr), (prop)); \
  |  |  100|  2.30k|            return IGRAPH_SUCCESS; \
  |  |  101|  2.30k|        } \
  |  |  102|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (102:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
   52|       |
   53|      1|    *res = false;
   54|       |
   55|      1|    for (i = 0; i < m; i++) {
  ------------------
  |  Branch (55:17): [True: 0, False: 1]
  ------------------
   56|      0|        if (IGRAPH_FROM(graph, i) == IGRAPH_TO(graph, i)) {
  ------------------
  |  |  115|      0|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                      if (IGRAPH_FROM(graph, i) == IGRAPH_TO(graph, i)) {
  ------------------
  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (56:13): [True: 0, False: 0]
  ------------------
   57|      0|            *res = true;
   58|      0|            break;
   59|      0|        }
   60|      0|    }
   61|       |
   62|      1|    igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, *res);
   63|       |
   64|      1|    return IGRAPH_SUCCESS;
   65|  2.30k|}
igraph_is_loop:
   86|  2.30k|                              igraph_es_t es) {
   87|  2.30k|    igraph_eit_t eit;
   88|  2.30k|    igraph_bool_t found_loop = false;
   89|       |
   90|  2.30k|    IGRAPH_CHECK(igraph_eit_create(graph, es, &eit));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
   91|  2.30k|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  603|  2.30k|    do { \
  |  |  604|  2.30k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.30k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.30k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.30k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.30k]
  |  |  ------------------
  |  |  608|  2.30k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
   92|       |
   93|  2.30k|    IGRAPH_CHECK(igraph_vector_bool_resize(res, IGRAPH_EIT_SIZE(eit)));
  ------------------
  |  |  656|  2.30k|    do { \
  |  |  657|  2.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
   94|       |
   95|  2.30k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (95:9): [True: 0, False: 2.30k]
  ------------------
   96|      0|        ! igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (96:9): [True: 0, False: 0]
  ------------------
   97|      0|        igraph_vector_bool_null(res);
   98|      0|        goto done;
   99|      0|    }
  100|       |
  101|  86.2k|    for (igraph_int_t i = 0; !IGRAPH_EIT_END(eit); i++, IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  371|  86.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|  83.9k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (101:30): [True: 83.9k, False: 2.30k]
  ------------------
  102|  83.9k|        igraph_int_t e = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|  83.9k|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 0, False: 83.9k]
  |  |  ------------------
  |  |  406|  83.9k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|  83.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  103|  83.9k|        igraph_bool_t is_loop = (IGRAPH_FROM(graph, e) == IGRAPH_TO(graph, e));
  ------------------
  |  |  115|  83.9k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  83.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                      igraph_bool_t is_loop = (IGRAPH_FROM(graph, e) == IGRAPH_TO(graph, e));
  ------------------
  |  |  128|  83.9k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  83.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  104|  83.9k|        VECTOR(*res)[i] = is_loop;
  ------------------
  |  |   60|  83.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  105|  83.9k|        if (is_loop) {
  ------------------
  |  Branch (105:13): [True: 13.5k, False: 70.3k]
  ------------------
  106|  13.5k|            found_loop = true;
  107|  13.5k|        }
  108|  83.9k|    }
  109|       |
  110|  2.30k|    if (found_loop) {
  ------------------
  |  Branch (110:9): [True: 763, False: 1.53k]
  ------------------
  111|    763|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, true);
  112|  1.53k|    } else if (igraph_es_is_all(&es)) {
  ------------------
  |  Branch (112:16): [True: 0, False: 1.53k]
  ------------------
  113|      0|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, false);
  114|      0|    }
  115|       |
  116|  2.30k|done:
  117|  2.30k|    igraph_eit_destroy(&eit);
  118|  2.30k|    IGRAPH_FINALLY_CLEAN(1);
  119|       |
  120|  2.30k|    return IGRAPH_SUCCESS;
  121|  2.30k|}
igraph_count_loops:
  137|  2.30k|igraph_error_t igraph_count_loops(const igraph_t *graph, igraph_int_t *loop_count) {
  138|  2.30k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  139|  2.30k|    igraph_int_t count;
  140|       |
  141|       |    /* Nothing to do if we know that there are no loops. */
  142|  2.30k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (142:9): [True: 763, False: 1.53k]
  ------------------
  143|    763|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (143:9): [True: 0, False: 763]
  ------------------
  144|      0|        *loop_count = 0;
  145|      0|        return IGRAPH_SUCCESS;
  146|      0|    }
  147|       |
  148|  2.30k|    count = 0;
  149|  86.2k|    for (igraph_int_t e=0; e < no_of_edges; e++) {
  ------------------
  |  Branch (149:28): [True: 83.9k, False: 2.30k]
  ------------------
  150|  83.9k|        if (IGRAPH_FROM(graph, e) == IGRAPH_TO(graph, e)) {
  ------------------
  |  |  115|  83.9k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  83.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                      if (IGRAPH_FROM(graph, e) == IGRAPH_TO(graph, e)) {
  ------------------
  |  |  128|  83.9k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  83.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (150:13): [True: 13.5k, False: 70.3k]
  ------------------
  151|  13.5k|            count++;
  152|  13.5k|        }
  153|  83.9k|    }
  154|       |
  155|       |    /* We already checked for loops, so take the opportunity to set the cache. */
  156|  2.30k|    igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, count > 0);
  157|       |
  158|  2.30k|    *loop_count = count;
  159|       |
  160|  2.30k|    return IGRAPH_SUCCESS;
  161|  2.30k|}

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

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

igraph_rng_default:
  188|   107k|igraph_rng_t *igraph_rng_default(void) {
  189|   107k|    return igraph_i_rng_default_ptr;
  190|   107k|}
igraph_rng_bits:
  277|   107k|igraph_int_t igraph_rng_bits(const igraph_rng_t* rng) {
  278|   107k|    return rng->type->bits;
  279|   107k|}
igraph_rng_get_integer:
  593|   107k|) {
  594|   107k|    const igraph_rng_type_t *type = rng->type;
  595|   107k|    igraph_uint_t range;
  596|       |
  597|   107k|    assert(h >= l);
  ------------------
  |  Branch (597:5): [True: 0, False: 107k]
  |  Branch (597:5): [True: 107k, False: 0]
  ------------------
  598|       |
  599|   107k|    if (h == l) {
  ------------------
  |  Branch (599:9): [True: 0, False: 107k]
  ------------------
  600|      0|        return l;
  601|      0|    }
  602|       |
  603|   107k|    if (type->get_int) {
  ------------------
  |  Branch (603:9): [True: 0, False: 107k]
  ------------------
  604|      0|        return type->get_int(rng->state, l, h);
  605|      0|    }
  606|       |
  607|   107k|    if (IGRAPH_UNLIKELY(l == IGRAPH_INTEGER_MIN && h == IGRAPH_INTEGER_MAX)) {
  ------------------
  |  |  612|   107k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  ------------------
  |  |  |  Branch (612:32): [True: 0, False: 107k]
  |  |  |  Branch (612:52): [True: 0, False: 107k]
  |  |  |  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|   107k|    } else if (l >= 0 || h < 0) {
  ------------------
  |  Branch (611:16): [True: 107k, False: 0]
  |  Branch (611:26): [True: 0, False: 0]
  ------------------
  612|       |        /* this is okay, (h - l) will not overflow an igraph_int_t */
  613|   107k|        range = (igraph_uint_t)(h - l) + 1;
  614|   107k|    } 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|   107k|    return l + igraph_i_rng_get_uint_bounded(rng, range);
  622|   107k|}
random.c:igraph_i_rng_get_random_bits:
  336|   107k|static igraph_uint_t igraph_i_rng_get_random_bits(igraph_rng_t *rng, uint8_t bits) {
  337|   107k|    const igraph_rng_type_t *type = rng->type;
  338|   107k|    igraph_int_t rng_bitwidth = igraph_rng_bits(rng);
  339|   107k|    igraph_uint_t result;
  340|       |
  341|   107k|    if (rng_bitwidth >= bits) {
  ------------------
  |  Branch (341:9): [True: 107k, False: 0]
  ------------------
  342|       |        /* keep the high bits as RNGs sometimes tend to have lower entropy in
  343|       |         * low bits than in high bits */
  344|   107k|        result = type->get(rng->state) >> (rng_bitwidth - bits);
  345|   107k|    } 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|   107k|    return result;
  357|   107k|}
random.c:igraph_i_rng_get_uint_bounded:
  532|   107k|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|   107k|    if (range <= UINT32_MAX) {
  ------------------
  |  Branch (541:9): [True: 107k, False: 0]
  ------------------
  542|   107k|        return igraph_i_rng_get_uint32_bounded(rng, range);
  543|   107k|    } else {
  544|      0|        return igraph_i_rng_get_uint64_bounded(rng, range);
  545|      0|    }
  546|   107k|#endif
  547|   107k|}
random.c:igraph_i_rng_get_uint32_bounded:
  428|   107k|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|   107k|    uint32_t x, l, t = (-range) % range;
  432|   107k|    uint64_t m;
  433|   107k|    do {
  434|   107k|        x = igraph_i_rng_get_uint32(rng);
  435|   107k|        m = (uint64_t)(x) * (uint64_t)(range);
  436|   107k|        l = (uint32_t)m;
  437|   107k|    } while (l < t);
  ------------------
  |  Branch (437:14): [True: 0, False: 107k]
  ------------------
  438|   107k|    return m >> 32;
  439|   107k|}
random.c:igraph_i_rng_get_uint32:
  416|   107k|static uint32_t igraph_i_rng_get_uint32(igraph_rng_t *rng) {
  417|   107k|    return igraph_i_rng_get_random_bits(rng, 32);
  418|   107k|}

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

